任何人都可以分解此汇编代码的作用吗?

问题描述

以下代码是旧赛车游戏中的一些基本计算。它的模型下压力,通过检查汽车的当前速度。有一个下压力系数(我在第三行向下追踪),它在某处乘以汽车的速度,这会增加轮胎上的垂直力。我认为这适用于两个前轮胎。

有人能帮我把等式分解成简单的术语吗?我只是部分了解我在看什么...

GAME.exe+58620C - 8B 54 24 0C           - mov edx,[esp+0C]
GAME.exe+586210 - 8B 44 24 04           - mov eax,[esp+04]
GAME.exe+586214 - D9 04 90              - fld dword ptr [eax+edx*4]
GAME.exe+586217 - 8B CA                 - mov ecx,edx
GAME.exe+586219 - 6B C9 34              - imul ecx,ecx,34
GAME.exe+58621C - 8D 4C 01 08           - lea ecx,[ecx+eax+08]
GAME.exe+586220 - 8B 01                 - mov eax,[ecx]
GAME.exe+586222 - 85 C0                 - test eax,eax
GAME.exe+586224 - 74 46                 - je GAME.exe+58626C
GAME.exe+586226 - 83 F8 01              - cmp eax,01 { 1 }
GAME.exe+586229 - D9 44 24 10           - fld dword ptr [esp+10]
GAME.exe+58622D - 75 0F                 - jne GAME.exe+58623E
GAME.exe+58622F - D9 05 C8975300        - fld dword ptr [GAME.exe+1397C8] { (0.00) }
GAME.exe+586235 - D8D9                  - fcomp st(0),st(1)
GAME.exe+586237 - DFE0                  - fnstsw ax
GAME.exe+586239 - F6 C4 41              - test ah,41 { 65 }
GAME.exe+58623C - 7A 2C                 - jp GAME.exe+58626A
GAME.exe+58623E - D8 51 1C              - fcom dword ptr [ecx+1C]
GAME.exe+586241 - DFE0                  - fnstsw ax
GAME.exe+586243 - F6 C4 41              - test ah,41 { 65 }
GAME.exe+586246 - 75 07                 - jne GAME.exe+58624F
GAME.exe+586248 - DDD8                  - fstp st(0)
GAME.exe+58624A - D9 41 1C              - fld dword ptr [ecx+1C]
GAME.exe+58624D - EB 0F                 - jmp GAME.exe+58625E
GAME.exe+58624F - D8 51 18              - fcom dword ptr [ecx+18]
GAME.exe+586252 - DFE0                  - fnstsw ax
GAME.exe+586254 - F6 C4 05              - test ah,05 { 5 }
GAME.exe+586257 - 7A 05                 - jp GAME.exe+58625E
GAME.exe+586259 - DDD8                  - fstp st(0)
GAME.exe+58625B - D9 41 18              - fld dword ptr [ecx+18]
GAME.exe+58625E - D8 49 14              - fmul dword ptr [ecx+14]
GAME.exe+586261 - D8 41 10              - fadd dword ptr [ecx+10]
GAME.exe+586264 - D8 49 04              - fmul dword ptr [ecx+04]
GAME.exe+586267 - DEC1                  - faddp 
GAME.exe+586269 - C3                    - ret 
GAME.exe+58626A - DDD8                  - fstp st(0)
GAME.exe+58626C - C3                    - ret 

解决方法

有些代码没有透露,其中很多使用了未记录的 Windows 内核偏移量,例如:

1.mov edx,[esp+0C] / mov eax,[esp+04]
2.je GAME.exe+58626C / jne GAME.exe+58623E / jp GAME.exe+58626A etc
3.fld dword ptr [eax+edx*4]

99% 的代码是隐藏的,没有人可以帮你提供完整的代码

注意:地址只是在运行时放在你的代码中,它没有帮助

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...