Blizzhackers

Return of the Jedi

* Login   * Register    * FAQ    * Search

Join us on IRC: #bh@irc.synirc.net (or Mibbit Web IRC)


MuleFactory


It is currently Wed Jun 19, 2013 1:07 am


All times are UTC [ DST ]





Post new topic Reply to topic  [ 94 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon Nov 29, 2010 2:10 pm 
 
Moderator
Moderator
User avatar

Joined: Thu Apr 30, 2009 12:31 pm
Location: %scrdir%
vxsw wrote:
can anybody tell me, how I can find "last buff" offset?
I can find it "manually", but this address and link on it not fixed((

p.s. sorry for my english.
there is no such thing, states are stored in a bit array anyways

_________________
Learn C++, not Crap++ http://tinyurl.com/so-cxxbooks
Hackito Ergo Sum
Cthulhon: No, I am a dancer. I am in charge of popping and locking.

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon Nov 29, 2010 9:03 pm 
 
User
User

Joined: Mon Nov 29, 2010 11:22 am
I dont know array it's or not, but I can't see principal different. it's just structured data block in memory and it's must have begin somewhere, and somewhere else must be a reference link on a start address of this block (may be with some offset). I already can find "reference link" and get all needed data from this block (i.e. buff id, buff effects, finish time, next/previous buff...), but this "reference link" some times may simple change offset (in high bytes only, for sample from 0x010760BC to 0x010860BC). and this offsets may not change on one PC, but may be different on another, may change after restart PC, or may not. and I can't understand this changes, or may be this link as part of some else structured block for which I can't find "reference link".

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Tue Nov 30, 2010 12:17 pm 
 
Moderator
Moderator
User avatar

Joined: Thu Apr 30, 2009 12:31 pm
Location: %scrdir%
vxsw wrote:
I dont know array it's or not, but I can't see principal different. it's just structured data block in memory and it's must have begin somewhere, and somewhere else must be a reference link on a start address of this block (may be with some offset). I already can find "reference link" and get all needed data from this block (i.e. buff id, buff effects, finish time, next/previous buff...), but this "reference link" some times may simple change offset (in high bytes only, for sample from 0x010760BC to 0x010860BC). and this offsets may not change on one PC, but may be different on another, may change after restart PC, or may not. and I can't understand this changes, or may be this link as part of some else structured block for which I can't find "reference link".
what your refering to is the stat list nodes of the player, accessed via pPlayer->pStatlist->pActive

_________________
Learn C++, not Crap++ http://tinyurl.com/so-cxxbooks
Hackito Ergo Sum
Cthulhon: No, I am a dancer. I am in charge of popping and locking.

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Wed Dec 01, 2010 2:52 pm 
 
User
User

Joined: Mon Nov 29, 2010 11:22 am
TheUnknownSoldier wrote:
...accessed via pPlayer->pStatlist->pActive

sorry, but I do not quite understand. it's for injection only? I try to get it via only read memory, without injection. where (or how) I can get this "stat list"?

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Wed Dec 01, 2010 3:57 pm 
 
Moderator
Moderator
User avatar

Joined: Thu Apr 30, 2009 12:31 pm
Location: %scrdir%
See my tutorial on read player stats, and use the same principal on the other statlist members

_________________
Learn C++, not Crap++ http://tinyurl.com/so-cxxbooks
Hackito Ergo Sum
Cthulhon: No, I am a dancer. I am in charge of popping and locking.

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Thu Dec 02, 2010 2:07 pm 
 
User
User

Joined: Mon Nov 29, 2010 11:22 am
sorry man, I'm not a "cool programmer" and don't know c++. I found c++ builder, install it, read and compile your project... but i can't understand your method and can't get something useful for myself. and it display only hp/mp and counts of some stats.
I think I found another way, and it looks as works. but thanks anyway for your attempts.

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Sun Feb 06, 2011 11:00 pm 
 
BHDev
BHDev
User avatar

Joined: Sun Apr 29, 2007 6:58 pm
DWORD D2RGB[] = {

   {0x00000000}, {0xFF240000}, {0xFF1C1808}, {0xFF2C2410},
   {0xFF3C3418}, {0xFF5C0000}, {0xFF484020}, {0xFF544828},
   {0xFF900000}, {0xFF8C4810}, {0xFFBC0000}, {0xFFD08420},
   {0xFFF4C46C}, {0xFF8C7C50}, {0xFFAC9C64}, {0xFF0C0C08},
   {0xFF141010}, {0xFF1C1C1C}, {0xFF28241C}, {0xFF2C2C2C},
   {0xFF3C3830}, {0xFF383838}, {0xFF484848}, {0xFF585048},
   {0xFF645834}, {0xFF585858}, {0xFF74643C}, {0xFF646464},
   {0xFF7C7470}, {0xFF848484}, {0xFF9C9894}, {0xFFC4C4C4},
   {0xFFF4F4F4}, {0xFF080404}, {0xFF100400}, {0xFF180804},
   {0xFF181008}, {0xFF1C1410}, {0xFF240C04}, {0xFF20180C},
   {0xFF201814}, {0xFF2C1008}, {0xFF241C10}, {0xFF28200C},
   {0xFF380804}, {0xFF301C10}, {0xFF302814}, {0xFF40140C},
   {0xFF382810}, {0xFF480C04}, {0xFF38281C}, {0xFF4C200C},
   {0xFF442C14}, {0xFF402C20}, {0xFF581008}, {0xFF483420},
   {0xFF443428}, {0xFF54281C}, {0xFF5C1C14}, {0xFF5C2408},
   {0xFF543818}, {0xFF543824}, {0xFF6C1810}, {0xFF682C10},
   {0xFF5C4424}, {0xFF702418}, {0xFF683C24}, {0xFF7C2C0C},
   {0xFF644C2C}, {0xFF704808}, {0xFF802818}, {0xFF745028},
   {0xFF883024}, {0xFF6C5040}, {0xFF8C340C}, {0xFF702068},
   {0xFF785844}, {0xFF8C4040}, {0xFF845C30}, {0xFF9C3424},
   {0xFFA42818}, {0xFFA44814}, {0xFF8C6440}, {0xFF8C7038},
   {0xFF8C6850}, {0xFFB04434}, {0xFFB44C20}, {0xFF987058},
   {0xFFA07840}, {0xFFBC601C}, {0xFF9C8448}, {0xFFC45454},
   {0xFFC86C20}, {0xFFAC7C58}, {0xFFB08848}, {0xFFC87C54},
   {0xFFE07020}, {0xFFB89C54}, {0xFFFC2C00}, {0xFFC08C70},
   {0xFFCC9850}, {0xFFE48430}, {0xFFE07070}, {0xFFD09878},
   {0xFFF8883C}, {0xFFECA038}, {0xFFD8B864}, {0xFFE0A484},
   {0xFFF0B444}, {0xFFF4C04C}, {0xFFF0B08C}, {0xFFFCD45C},
   {0xFFFCB0B0}, {0xFF042410}, {0xFF142418}, {0xFF203C18},
   {0xFF18480C}, {0xFF004430}, {0xFF186408}, {0xFF245C24},
   {0xFF385C24}, {0xFF086C44}, {0xFF287C14}, {0xFF407434},
   {0xFF587830}, {0xFF349C1C}, {0xFF708438}, {0xFF48A034},
   {0xFF58904C}, {0xFF44BC28}, {0xFF849848}, {0xFF60B84C},
   {0xFF18FC00}, {0xFF74DC5C}, {0xFF8CD07C}, {0xFFA0FC88},
   {0xFF0C0C28}, {0xFF181848}, {0xFF000058}, {0xFF381444},
   {0xFF102468}, {0xFF283C64}, {0xFF282878}, {0xFF4C1080},
   {0xFF384C84}, {0xFF303094}, {0xFF48608C}, {0xFF385CA0},
   {0xFF5050AC}, {0xFF4C6CAC}, {0xFF5478BC}, {0xFF2460D8},
   {0xFF6478D0}, {0xFF6490E0}, {0xFF80A0DC}, {0xFFA420FC},
   {0xFF8484F0}, {0xFFA0A0FC}, {0xFF90B8FC}, {0xFF588C90},
   {0xFF68A0A4}, {0xFF84C0C4}, {0xFF98D0D4}, {0xFFA8CCFC},
   {0xFFCCF4F4}, {0xFFC0A080}, {0xFFC4C0A8}, {0xFFE0C494},
   {0xFFFCE874}, {0xFFC4FCB0}, {0xFFFCE4A4}, {0xFFFCFCC4},
   {0xFF040404}, {0xFF080808}, {0xFF0C0C0C}, {0xFF101010},
   {0xFF141414}, {0xFF181818}, {0xFF241C18}, {0xFF202020},
   {0xFF242424}, {0xFF282828}, {0xFF302820}, {0xFF303030},
   {0xFF383028}, {0xFF343434}, {0xFF34383C}, {0xFF443834},
   {0xFF3C3C3C}, {0xFF4C3C30}, {0xFF404040}, {0xFF44403C},
   {0xFF444444}, {0xFF50483C}, {0xFF584438}, {0xFF4C4C4C},
   {0xFF604C3C}, {0xFF34585C}, {0xFF505050}, {0xFF545454},
   {0xFF5C5C5C}, {0xFF685C50}, {0xFF606060}, {0xFF447074},
   {0xFF7C6450}, {0xFF686868}, {0xFF6C6C6C}, {0xFF786C60},
   {0xFF707070}, {0xFF747474}, {0xFF7C7C7C}, {0xFF948064},
   {0xFF908474}, {0xFFAC8870}, {0xFF909090}, {0xFF9C9484},
   {0xFF8094B8}, {0xFFA0A0A0}, {0xFFB0AC98}, {0xFFACACAC},
   {0xFFB8B8B8}, {0xFFCCCCCC}, {0xFFD8D8D8}, {0xFFCCCCFC},
   {0xFFE4E4E4}, {0xFF000010}, {0xFF000014}, {0xFF000018},
   {0xFF00001C}, {0xFF000420}, {0xFF080C20}, {0xFF000028},
   {0xFF000428}, {0xFF00002C}, {0xFF00082C}, {0xFF04102C},
   {0xFF000030}, {0xFF0C1430}, {0xFF000838}, {0xFF101834},
   {0xFF081438}, {0xFF04103C}, {0xFF041440}, {0xFF141C3C},
   {0xFF081844}, {0xFF182440}, {0xFF142044}, {0xFF101C48},
   {0xFF14244C}, {0xFF202C48}, {0xFF182850}, {0xFF1C2C50},
   {0xFF203054}, {0xFF283450}, {0xFF2C3854}, {0xFFFFFFFF},
   
};


Found this D2Col8bit to RGB table on my hd, which I dumped once from the d2 memory.
Maybe it's useful for someone who's messing with D2 textures and higher color modes in d3d or ogl.
I remember using it to display d2 in d3d9 mode was frustrating to draw every information from scratch but it was fun especially with shader access hah :D.

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon Feb 07, 2011 7:34 am 
 
Moderator
Moderator
User avatar

Joined: Thu Apr 30, 2009 12:31 pm
Location: %scrdir%
Gnarmock wrote:
Found this D2Col8bit to RGB table on my hd, which I dumped once from the d2 memory.
Maybe it's useful for someone who's messing with D2 textures and higher color modes in d3d or ogl.
I remember using it to display d2 in d3d9 mode was frustrating to draw every information from scratch but it was fun especially with shader access hah :D.
D2 uses multiple color palettes, all available from the mpq's under the palletes folder(the are plain RGBA colors). there are some global pallettes in d2cmp/d2win as well, loaded from pl2 files

_________________
Learn C++, not Crap++ http://tinyurl.com/so-cxxbooks
Hackito Ergo Sum
Cthulhon: No, I am a dancer. I am in charge of popping and locking.

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon Feb 07, 2011 3:49 pm 
 
BHDev
BHDev
User avatar

Joined: Sun Apr 29, 2007 6:58 pm
TheUnknownSoldier wrote:
Gnarmock wrote:
Found this D2Col8bit to RGB table on my hd, which I dumped once from the d2 memory.
Maybe it's useful for someone who's messing with D2 textures and higher color modes in d3d or ogl.
I remember using it to display d2 in d3d9 mode was frustrating to draw every information from scratch but it was fun especially with shader access hah :D.
D2 uses multiple color palettes, all available from the mpq's under the palletes folder(the are plain RGBA colors). there are some global pallettes in d2cmp/d2win as well, loaded from pl2 files


Never looked into the mpq files though. Think I was focusing on the d2d3d module. You're right I've used the pallettes before using this table for the texture creation, from this old code I can see I exported the pallete function in CVideo + 0x5C ( think it was the first exportable in the video mode modules );

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Wed Apr 06, 2011 9:42 pm 
 
User
User
User avatar

Joined: Thu Jul 16, 2009 9:52 am
Location: ger
FUNCPTR(D2CLIENT, GetSuperuniqueTxt, SuperuniqueTxt * __stdcall, (), 0x113AB0)


i have no idea if its the correct form for c++ but it works in c# with this offset

_________________
Image

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon May 23, 2011 4:43 am 
 
Section Leader
Section Leader

Joined: Fri Jul 05, 2002 8:51 pm
Location: /sbin/
10 seconds of looking at D2NET_ReceivePacket_I told me whoever updated it is a moron:

FUNCPTR(D2NET, FindPacketSize, void __fastcall, (BYTE *buffer, DWORD buflen, DWORD* packetSize), -10033)


This function may not be of actual use to anyone, but: buffer is the actual packet, buflen is the length of buffer in bytes, packetSize is an out variable that tells you how long the actual packet (as considered by D2) is. This function has very little to do with actually receiving a packet and more to do with figuring out how to parse said packet.

_________________
D2BS
Programming motherfuckers... DO YOU SPEAK IT?!
I, for one, welcome our new black overlo... I mean, president!
  1. Create signature generator.
  2. ???
  3. Profit!

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon May 23, 2011 3:41 pm 
 
User
User
User avatar

Joined: Thu Apr 09, 2009 4:31 pm
Actually other packet receiving func is wrong too :P
FUNCPTR(D2NET, ReceivePacket, void __stdcall, (BYTE *aPacket, DWORD aLen), 0x6BD0)


there is one more argument passed by ECX, and it's a pointer in which is passed as third arg of -10033, skipping it can cause to unexpected errors
If you are lazy you can use following macro
FUNCPTR(D2NET, ReceivePacket, void __fastcall, (DWORD* pExpectedSize, void _1, BYTE *aPacket, DWORD aLen), 0x6BD0)

or use wrapper
FUNCPTR(D2NET, ReceivePacket, BOOL __fastcall, (DWORD* pExpectedSize, BYTE *aPacket, DWORD aLen), 0x63C0)

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon May 23, 2011 10:02 pm 
 
BHDev
BHDev
User avatar

Joined: Sun Apr 29, 2007 6:58 pm
FUNCPTR(D2WIN, CreateButton,Control * __fastcall, (unsigned long xPos,unsigned long yPos,unsigned long width,unsigned long height, unsigned long cell,bool (__fastcall *pCallback)(unsigned long arg,unsigned long arg2,unsigned long arg3),unsigned long Unk1,unsigned long Unk2, unsigned long clickbox,unsigned long Unk4,unsigned long Unk5), -10068)
FUNCPTR(D2WIN, CreateList,Control * __fastcall, ( unsigned long xPos,unsigned long yPos,unsigned long width,unsigned long height,unsigned long unk1,unsigned long unk2, unsigned long cell,bool (__fastcall *pCallback)(unsigned long arg,unsigned long arg2,unsigned long arg3),unsigned long type,ControlFont *cp, ListScroll *ls ), -10204)
FUNCPTR(D2WIN, AddListText, void __fastcall, ( Control *pCtrl, char *text ) , -10167)
FUNCPTR(D2WIN, AddListChildText, void __fastcall, ( Control *pCtrl, char *text , unsigned long textposition, unsigned long listposition ) , -10186)
FUNCPTR(D2WIN, SetListChilds, void __fastcall, ( Control *pCtrl, unsigned long childs ) , -10036)
FUNCPTR(D2WIN, SetListChildTextDistance, void __fastcall, ( Control *pCtrl, unsigned long child,unsigned long width ) , -10015)
FUNCPTR(D2WIN, SetListPosition, void __fastcall, ( Control *pCtrl, unsigned long pos ) , -10037)
FUNCPTR(D2WIN, GetCurrentListPosition, unsigned long __fastcall ,( Control *pCtrl ), -10027)
FUNCPTR(D2WIN, GetCurrentListText, wchar_t * __fastcall, (Control *pCtrl) , -10114)
FUNCPTR(D2WIN, TerminateControl, void __stdcall, (Control **pCtrl), -10050)
FUNCPTR(D2WIN, CreateControl, Control * __stdcall, (unsigned long *pArgs),-10098)
FUNCPTR(D2WIN, DestroyButton, void __fastcall, ( Control *pCtrl ), -10155)
FUNCPTR(D2WIN, LoadCellFile, unsigned long __fastcall, (char *Path,unsigned long unk), -10111)
FUNCPTR(D2WIN, SplitText, Split * __fastcall, (wchar_t *text,unsigned long *splits,unsigned long length),-10059) // +0x00 = wchar_t; +0x04 pNext;

VARPTR(D2GDI,Backbuffer,unsigned char*,0xCAA8)

VARPTR(D2GFX,GfxTable,unsigned long*,0x11268)

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon Sep 12, 2011 10:03 pm 
 
BHDev
BHDev
User avatar

Joined: Mon Jul 13, 2009 5:13 pm
Location: Denmark
struct ItemTxt { //sizeof 0x1A8
   wchar_t szName2[0x40];         //0x00
   union {
      DWORD dwCode;
      char szCode[4];
   };                        //0x40
   BYTE _2[0x70];               //0x84
   WORD nLocaleTxtNo;            //0xF4
   BYTE _2a[0x19];               //0xF7
   BYTE xSize;                  //0xFC
   BYTE ySize;                  //0xFD
   BYTE _2b[13];               //0xFE
   BYTE nType;                  //0x11E
   BYTE _3[0x0d];               //0x11F
   BYTE fQuest;               //0x12A
   BYTE _4[0x7D]               //0x12B
};

struct PlayerRelation {
   DWORD dwPlayerId;
   DWORD dwFlags; //dwFlags & 8 = rosterunit hostiled towards dwPlayerID
   PlayerRelation * pNext;
};

struct RosterUnit {
   char szName[16];            //0x00
   DWORD dwUnitId;               //0x10
   DWORD dwPartyLife;            //0x14
   DWORD _1;                  //0x18
   DWORD dwClassId;                //0x1C
   WORD wLevel;               //0x20
   WORD wPartyId;              //0x22
   DWORD dwLevelId;                //0x24
   DWORD Xpos;                  //0x28
   DWORD Ypos;                  //0x2C
   DWORD dwPartyFlags;            //0x30
   PlayerRelation ** pPlayerRelations;   //0x34
   DWORD _6[11];               //0x38
   WORD _7;                  //0x64
   char szName2[16];            //0x66
   WORD _8;                  //0x76
   DWORD _9[2];               //0x78
   RosterUnit * pNext;            //0x80
};

VARPTR(D2Common, ItemTextList, ItemTxt *, 0x9FB98)

//these are a bit random
VARPTR(D2CLIENT, LevelId, unsigned char,0x1234B0)
VARPTR(D2CLIENT, LastChatMsg, wchar_t **,0x113AB0)
VARPTR(D2WIN, ItemDescBuffer, wchar_t, 0xC9E58) //bufsize = 800

_________________
Autumn, Itemdumper & D2ExtraImage

Top
 Profile  
 Post subject: Re: 1.13c Diablo II Information: Function Pointers & Structs
PostPosted: Mon Sep 12, 2011 10:47 pm 
 
BHDev
BHDev

Joined: Thu Feb 08, 2007 8:21 pm
struct Skill {
   SkillInfo *pSkillInfo;         //0x00
   Skill *pNextSkill;            //0x04
   DWORD _1[8];            //0x08
   DWORD dwSkillLevel;         //0x28
   DWORD _2[2];            //0x2C
   DWORD ItemId;            //0x34 0xFFFFFFFF if not a charge
   DWORD ChargesLeft;         //0x38
   DWORD IsCharge;            //0x3C 1 for charge, else 0
};//size = 0x40

struct AttackStruct {
   DWORD dwClickFlags;      //0x00
   UnitAny* lpPlayerUnit;      //0x04
   UnitAny* lpTargetUnit;      //0x08
   DWORD dwTargetX;      //0x0C
   DWORD dwTargetY;      //0x10
   DWORD _1;            //0x14
   DWORD _2;            //0x18
   Skill* pSkill;            //0x1C
};

_________________
whiteevil @ jsp
1.13d AutoTele

Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 94 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron