PROCEDURE MageGuildBackground; ASSEMBLER; {$FRAME-} ASM PUSHAD// Push all registers CMP DWORD [$887668], -1 // Compare -1 with v1 JZ @@Leave MOV EAX, DWORD [$887668] // Move v1 to EAX MOV DWORD [$5CCED7], $8B0C85 // Change opcode MOV DWORD [$5CCED8], $68A36C // Change parameter POPAD // Restore all registers @@Leave: POPAD // Restore all registers PROCEDURE HOOK_MageGuildEnter; ASSEMBLER; {$FRAME-} ASM PUSHAD // Push all registers CALL MageGuildBackground PUSH 90003 // Push function number MOV EAX, $74CE30 // Move $74CE30 to EAX CALL EAX // Call ERM-function ADD ESP, 4 // Add 4 to ESP POPAD // Restore all registers PUSH EBP // Push EBP MOV EBP, ESP // Move ESP to EBP PUSH -1 // Push -1 PUSH $5CCD85 // Push $5CCD85 END; // .PROCEDURE HOOK_MageGuildEnter BEGIN HookCode(POINTER($5CCD80), @HOOK_MageGuildEnter, C_HOOKTYPE_JUMP); // 90003 END.