forked from dredknight/H5_DLL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVengefulLight.cpp
38 lines (30 loc) · 1003 Bytes
/
VengefulLight.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "pch.h"
// New skill that has the effect of Vessel of Elrath spec
// and move Eternal Light to Master of Abjuration
void VengefulLightFork();
int VengefulLight_fork = 0x00BBEDA5;
int VengefulLight_return = 0x00BBEDB3;
int VengefulLight_end = 0x00BBEDC1;
void VengefulLight_init(pugi::xml_document& doc) {
assembly_patches.push_back({ PATCH_WRTE, 0x004E4629, 1, nullptr, 0, 0, 0, "32" });
assembly_patches.push_back({ PATCH_HOOK, VengefulLight_fork, 14, VengefulLightFork, 0, 0, 0 });
}
__declspec(naked) void VengefulLightFork() {
__asm
{
mov ecx, edi
push 0x52
call dword ptr [eax + 0x294]
test al, al
jnz VENGEFUL_LIGHT_RETURN
mov eax, dword ptr [edi]
mov ecx, edi
push 0xA5
call dword ptr [eax + 0x290]
test al, al
jnz VENGEFUL_LIGHT_RETURN
jmp[VengefulLight_end]
VENGEFUL_LIGHT_RETURN:
jmp[VengefulLight_return]
}
}