How's __RTC_CheckEsp implemented?

后端 未结 2 981
Happy的楠姐
Happy的楠姐 2021-01-04 21:06

__RTC_CheckEsp is a call that verifies the correctness of the esp, stack, register. It is called to ensure that the value of the esp w

2条回答
  •  温柔的废话
    2021-01-04 21:33

    If you're any good at asm, maybe this helps:

    jne (Jump if Not Equal) - jumps if the ZERO flag is NZ (NotZero)

    _RTC_CheckEsp:
    004C8690  jne         esperror (4C8693h) 
    004C8692  ret              
    esperror:
    004C8693  push        ebp  
    004C8694  mov         ebp,esp 
    004C8696  sub         esp,0 
    004C8699  push        eax  
    004C869A  push        edx  
    004C869B  push        ebx  
    004C869C  push        esi  
    004C869D  push        edi  
    004C869E  mov         eax,dword ptr [ebp+4] 
    004C86A1  push        0    
    004C86A3  push        eax  
    004C86A4  call        _RTC_Failure (4550F8h) 
    004C86A9  add         esp,8 
    004C86AC  pop         edi  
    004C86AD  pop         esi  
    004C86AE  pop         ebx  
    004C86AF  pop         edx  
    004C86B0  pop         eax  
    004C86B1  mov         esp,ebp 
    004C86B3  pop         ebp  
    004C86B4  ret              
    004C86B5  int         3    
    004C86B6  int         3    
    004C86B7  int         3    
    004C86B8  int         3    
    004C86B9  int         3    
    004C86BA  int         3    
    004C86BB  int         3    
    004C86BC  int         3    
    004C86BD  int         3    
    004C86BE  int         3    
    004C86BF  int         3   
    

提交回复
热议问题