Olly -> Search for all constants -> 11CCFD9 :P
I'll leave A LOT out, heading straight to the combopoints, this is not a good example of how to do it properly. :-P
Code:
.text:006A39A0 GetComboPoints
first interesting thing:
Code:
.text:006A39B5 test eax, eax
.text:006A39B7 jnz short loc_6A39CE
If eax is 0, the function will clean up and exit -> not interesting for us,
so we land here:
Code:
.text:006A39CE loc_6A39CE:
Some lua stuff I don't feel like reversing..
until:
Code:
.text:006A3A09 call sub_7B7C20
What does this function do?
Gets the object manager, then:
Code:
mov eax, [ecx+0C0h]
mov edx, [ecx+0C4h]
retn
[s_curMgr+0xC0] = lp_guid_low
[s_curMgr+0xC4] = lp_guid_high
So this function gives us the localplayer guid (on eax,edx)
or twice 0 if something bad happened.
Code:
jnz short loc_6A3A62
One way leads to GetObjectByGuid ( with our guid ), the other, well I didn't look, because getting the localplayer sounds interesting.
Then it compares the result with EDI, and then either continues or jumps to
Code:
loc_6A3A4A:
mov ecx, [ebp+var_4]
mov edx, [ebp+var_8]
push ecx
push edx
call 0x6E1D40 ; interesting
movzx eax, al
mov [ebp+var_4], eax
fild [ebp+var_4]
jmp short loc_6A3A91
after that it jumps to the end of the function, does a pushnumber (woot) and returns.
let's take a closer look at this:
call 0x6E1D40
Code:
006E1D40 /$ 55 PUSH EBP
006E1D41 |. 8BEC MOV EBP,ESP
006E1D43 |. 8B45 08 MOV EAX,[ARG.1] ; Wow.<ModuleEntryPoint>
006E1D46 |. 8B4D 0C MOV ECX,[ARG.2]
006E1D49 |. 8BD0 MOV EDX,EAX
006E1D4B |. 0BD1 OR EDX,ECX
006E1D4D |. 75 0B JNZ SHORT Wow.006E1D5A
006E1D4F |. A1 38CF1C01 MOV EAX,DWORD PTR DS:[11CCF38]
006E1D54 |. 8B0D 3CCF1C01 MOV ECX,DWORD PTR DS:[11CCF3C]
006E1D5A |> 3B05 28D01C01 CMP EAX,DWORD PTR DS:[11CD028]
006E1D60 |. 75 0F JNZ SHORT Wow.006E1D71
006E1D62 |. 3B0D 2CD01C01 CMP ECX,DWORD PTR DS:[11CD02C]
006E1D68 |. 75 07 JNZ SHORT Wow.006E1D71
006E1D6A |. A0 D9CF1C01 MOV AL,BYTE PTR DS:[11CCFD9]
006E1D6F |. 5D POP EBP ; kernel32.7C817077
006E1D70 |. C3 RETN
006E1D71 |> 32C0 XOR AL,AL
006E1D73 |. 5D POP EBP ; kernel32.7C817077
006E1D74 \. C3 RETN
As you can see, every jump taken ( except for the first ) leads to:
xor al,al
However if no jump is taken:
Code:
006E1D6A |. A0 D9CF1C01 MOV AL,BYTE PTR DS:[11CCFD9]
006E1D6F |. 5D POP EBP ; kernel32.7C817077
006E1D70 |. C3 RETN
There you go. I left out A LOT..
a) because I didn't care (got what I wanted)
b) luaengine is creepy