好友
阅读权限10
听众
最后登录1970-1-1
|
楼主|
dnz
发表于 2020-3-22 21:15
比如这一段的call调用
0048653C /$ 53 PUSH EBX
0048653D |. 56 PUSH ESI
0048653E |. 57 PUSH EDI
0048653F |. 55 PUSH EBP
00486540 |. 83C4 F8 ADD ESP,-0x8
00486543 |. 884C24 04 MOV BYTE PTR SS:[ESP+0x4],CL
00486547 |. 891424 MOV DWORD PTR SS:[ESP],EDX
0048654A |. 8BD8 MOV EBX,EAX
0048654C |. 33C0 XOR EAX,EAX
0048654E |. 8B73 14 MOV ESI,DWORD PTR DS:[EBX+0x14]
00486551 |. 85F6 TEST ESI,ESI ; 如果角色血量为0则跳出函数
00486553 |. 74 41 JE SHORT RPG_RT.00486596
00486555 |. 8BFE MOV EDI,ESI ; 当前角色血量
00486557 |. 8BC3 MOV EAX,EBX ; 当前角色指针
00486559 |. 8B10 MOV EDX,DWORD PTR DS:[EAX] ; 某个函数地址
0048655B |. FF52 28 CALL DWORD PTR DS:[EDX+0x28] ; RPG_RT.00488410
0048655E |. 8BC8 MOV ECX,EAX
00486560 |. 8BC6 MOV EAX,ESI
00486562 |. 2B0424 SUB EAX,DWORD PTR SS:[ESP]
00486565 |. 33D2 XOR EDX,EDX
00486567 |. E8 4480FDFF CALL RPG_RT.0045E5B0
0048656C |. 8BE8 MOV EBP,EAX
0048656E |. 896B 14 MOV DWORD PTR DS:[EBX+0x14],EBP ; 在此进行扣血
00486571 |. 85ED TEST EBP,EBP
00486573 |. 75 1C JNZ SHORT RPG_RT.00486591
00486575 |. 807C24 04 00 CMP BYTE PTR SS:[ESP+0x4],0x0
0048657A |. 74 0E JE SHORT RPG_RT.0048658A
0048657C |. BA 01000000 MOV EDX,0x1
00486581 |. 8BC3 MOV EAX,EBX
00486583 |. E8 80050000 CALL RPG_RT.00486B08
00486588 |. EB 07 JMP SHORT RPG_RT.00486591
0048658A |> C743 14 010000>MOV DWORD PTR DS:[EBX+0x14],0x1
00486591 |> 8BC7 MOV EAX,EDI
00486593 |. 2B43 14 SUB EAX,DWORD PTR DS:[EBX+0x14]
00486596 |> 59 POP ECX
00486597 |. 5A POP EDX
00486598 |. 5D POP EBP
00486599 |. 5F POP EDI
0048659A |. 5E POP ESI
0048659B |. 5B POP EBX
0048659C \. C3 RETN
|
|