Paddy
June 28th, 2001, 18:04
I am a newbie trying to deepen my understanding of assembly by delving more deeply into a protection scheme I have already cracked using some NOPs.
Immediately before the crucial jump in the programme I have found the following code
FCOMP REAL8 PTR [EBP-00C0]
FSTSW AX
TEST AH,40
The programme jumps to the 'good guy' code when 4000h is in the AX register. According to the Intel web site FCOMP compares the value in the first register of the FPU with the memory location [ebp-00C0] and if the two values are identical 4000h is placed in AX.
What puzzles me is that just before I F10 the FCOMP line the bottom right hand side of the register window shows the contents of EBP-00C0 to be 00000000 while the contents of ST0 is shown as 8 but FCOMP still (ultimately) places 4000h in the AX register.
What is going on here?
Paddy.
Immediately before the crucial jump in the programme I have found the following code
FCOMP REAL8 PTR [EBP-00C0]
FSTSW AX
TEST AH,40
The programme jumps to the 'good guy' code when 4000h is in the AX register. According to the Intel web site FCOMP compares the value in the first register of the FPU with the memory location [ebp-00C0] and if the two values are identical 4000h is placed in AX.
What puzzles me is that just before I F10 the FCOMP line the bottom right hand side of the register window shows the contents of EBP-00C0 to be 00000000 while the contents of ST0 is shown as 8 but FCOMP still (ultimately) places 4000h in the AX register.
What is going on here?
Paddy.