This shows the memory map for the first unit placed on my map (a tank, with 150 hp). I used artmoney (under memory editor).
You'll note that 0x59ccb1 is 96, which corresponds to the 150 hp. Looking at the memory and the unitnode reference we can now see that 0x59cca8 is the start of the unit, and corresponds to the previous unit (00 00 00 00). The next 4 bytes is the next unit (00 00 00 00, I only have one unit on the map). There's a few others:
+0x64 - WORD wUnitID
is 0x59CD0C, and is 05 00, which is a siege tank's unitid.
+0xDC - DWORD dwStatus
0x59CD84 reads 01 00 13 00
That means it has numerous flags checked:1 0011 0000 0000 0000 0001. Note the 3rd byte is 13, which is 10011 in binary.
this is the first byte
yes 00000001(0x1) - Is Completed
no 00000010(0x2) - Is on ground? or is it is unit...
no 00000100(0x4) - Is in air
no 00001000(0x8) - Checked for disabled, if it is 00001000, then the unit is disabled(/unpowered?)
no 00010000(0x10) - Checked for burrowing purposes, if it is 00010000, then the unit is burrowed
no 00100000(0x20) - Unit is entering a building
no 01000000(0x40) - unit is entering a transport
no 10000000(0x80) -
This is the 2nd byte
no 00000001(0x100) - Checked for invisible purposes, if it is 00000001, then the unit requires a detector?
no 00000010(0x200) - checked for cloak?
no 00000100(0x400) - deals with doodad states? if set, is disabled
no 00001000(0x800) - Unit cloaking doesn't need energy decrease
no 00010000(0x1000) - Unit is in unbreakable code section? Cannot receive orders
no 00100000(0x2000) - Set by nobrkcodestart
no 01000000(0x4000) -
no 10000000(0x8000) - cannot attack if set
This is the 3rd byte
yes 00000001(0x10000)
yes 00000010(0x20000) - Is a Building?
no 00000100(0x4000000) - Invincible
yes 00001000(0x8000000)
no 00010000(0x10000000) - Speed upgrade
no 00100000(0x20000000) - cooldown upgrade
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"