I am currently working on a old 90's video game to try to correct/modify unrealistic behaviors.
I managed to almost complete my list, but it remains my main objective...
It is a management game, and if you are a poor manager, your boss simply fire you, sometimes for debatable reasons. I found where the "You are fired" pannel is launched, but I have some difficulties to understand the mecanism. Could someone help me to understand the below code?
Note that according to IDA it is a 16 bits application.
mov eax, dword_5F94E0 // copy the content of dword in eax mov ecx, eax // copy eax in ecx lea edx, [eax+eax*4] // ?? lea eax, [edx+edx*8] // ?? shl eax, 8 // ?? add eax, ecx // add ecx to eax lea edx, [eax+eax*2] // ?? mov eax, dword_9FB922[ecx+edx*2] // ?? lea ecx, dword_9ECB20[ecx+edx*2] // ?? sub eax, 2C5h // remove 709 from eax cmp eax, 0Dh // compare eax to 13 ja short loc_42D480 // jump if eax > 13 (not fired) else fired
I know there is the easy way to change the behavior of the last line.But it seems it is more complicated: doing so only prevent the "You are fired" panel to be displayed, but you are still sacked.