-
Notifications
You must be signed in to change notification settings - Fork 18
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
Showing
13 changed files
with
333 additions
and
13 deletions.
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
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,26 @@ | ||
#include <Windows.h> | ||
#pragma once | ||
|
||
// Direct ASM injection | ||
namespace AsmEdition | ||
{ | ||
// Jump back to the code flow from donating guild points | ||
static DWORD jmpAddr_DonateGP = 0x005C413A; | ||
// Handler to catch guild point increasing hook and edit directly with asm | ||
static _declspec(naked) void OnDonateGuildPoints() | ||
{ | ||
// Rebuild asm | ||
__asm | ||
{ | ||
mov ecx, dword ptr[eax + 0x3c] // rebuild | ||
add ecx, esi // rebuild | ||
cmp ecx, 0x7FFFFFFF // compare ecx with int.MaxValue | ||
jbe _continue // go to _continue if ecx <= int.MaxValue | ||
mov ecx, 0x7FFFFFFF // set ecx as int.MaxValue | ||
jmp _continue // go to _continue | ||
} | ||
// Contine code flow | ||
_continue: | ||
__asm jmp jmpAddr_DonateGP; | ||
} | ||
} |
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
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
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
Oops, something went wrong.