All pastes #87402 Raw Edit

Cody Brocious

public text v1 · immutable
·published 2006-07-13 22:47 UTC
rendered paste body
hotfix:
        pop eax                 ; Pop return address into eax                                                      
        call locfind
locfind:
        pop ebx                 ; Get address of function + pop + call                                             
        push #addr              ; Address of the new function                                                      
        push ebx                ; Pass callee address to hotfixer                                                  
        push eax                ; Pass caller address to hotfixer                                                  
        call hotfixer           ; Call hotfixer to patch caller                                                    
        jmp #addr               ; Jump into hotfixed routine