forked from jewalky/srvmgr
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9191b90
commit 91bb5e2
Showing
3 changed files
with
116 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#define FTOL 0x005BF1AC | ||
void __declspec(naked) fix_spell_duration_overflow_0053973E() | ||
{ // 0053973E | ||
__asm | ||
{ | ||
cmp eax, 0xFFFF | ||
jle short ret_point1 | ||
mov eax, 0xFFFF | ||
ret_point1: | ||
// restore overridden code begin | ||
mov edx, [ebp-0xC] | ||
mov [edx+10h], ax | ||
// restore overridden code | ||
// jump back | ||
mov edx, 0x00539745 | ||
jmp edx | ||
} | ||
} | ||
// FUNCTIONS BELOW ARE DIFFERENT | ||
void __declspec(naked) fix_spell_duration_overflow() | ||
{ // 53BF9C | ||
__asm | ||
{ | ||
mov eax, FTOL | ||
call eax | ||
cmp eax, 0xFFFF | ||
jle short ret_point | ||
mov eax, 0xFFFF | ||
ret_point: | ||
ret | ||
} | ||
} | ||
// FUNCTIONS BELOW ARE DIFFERENT | ||
void __declspec(naked) fix_spell_duration_overflow_0053BFA1() | ||
{ // 0053BFA1 | ||
__asm | ||
{ | ||
cmp eax, 0xFFFF | ||
jle short ret_point2 | ||
mov eax, 0xFFFF | ||
ret_point2: | ||
// restore overridden code begin | ||
mov edx, [ebp-0x44] | ||
mov [edx+0x42], ax | ||
// restore overridden code | ||
// jump back | ||
mov edx, 0x0053BFA8 | ||
jmp edx | ||
} | ||
} | ||
|
||
void __declspec(naked) fix_spell_duration_overflow_0053C0E1() | ||
{ // 0053C0E1 | ||
__asm | ||
{ | ||
cmp eax, 0xFFFF | ||
jle short ret_point3 | ||
mov eax, 0xFFFF | ||
ret_point3: | ||
// restore overridden code begin | ||
mov edx, [ebp-0x44] | ||
mov [edx+0x42], ax | ||
// restore overridden code | ||
// jump back | ||
mov edx, 0x0053C0E8 | ||
jmp edx | ||
} | ||
} | ||
|
||
void __declspec(naked) fix_spell_duration_overflow_0053C21E() | ||
{ // 0053C21E | ||
__asm | ||
{ | ||
cmp eax, 0xFFFF | ||
jle short ret_point4 | ||
mov eax, 0xFFFF | ||
ret_point4: | ||
// restore overridden code begin | ||
mov edx, [ebp-0x44] | ||
mov [edx+0x42], ax | ||
// restore overridden code | ||
// jump back | ||
mov edx, 0x0053C225 | ||
jmp edx | ||
} | ||
} | ||
|
||
void __declspec(naked) fix_spell_duration_overflow_0053C52A() | ||
{ // 0053C52A | ||
__asm | ||
{ | ||
cmp eax, 0xFFFF | ||
jle short ret_point5 | ||
mov eax, 0xFFFF | ||
ret_point5: | ||
// restore overridden code begin | ||
mov edx, [ebp-0x44] | ||
mov [edx+0x42], ax | ||
// restore overridden code | ||
// jump back | ||
mov edx, 0x0053C531 | ||
jmp edx | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters