mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
.
This commit is contained in:
parent
e21a5dbf18
commit
3b133a7688
@ -1,32 +1,69 @@
|
|||||||
#include"EntisGLS.h"
|
#include "EntisGLS.h"
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
bool h2()
|
||||||
|
{
|
||||||
|
// 神学校 DL
|
||||||
|
const uint8_t bytes1[] = {
|
||||||
|
0x55,
|
||||||
|
0x8b, 0xec,
|
||||||
|
0x83, 0xec, 0x0c,
|
||||||
|
0x8b, 0xc8,
|
||||||
|
0x0f, 0xb7, 0x00,
|
||||||
|
0x57,
|
||||||
|
0x8b, 0x7d, 0x0c,
|
||||||
|
0x89, 0x55, 0xfc,
|
||||||
|
0x66, 0x85, 0xc0,
|
||||||
|
0x74, XX,
|
||||||
|
0xeb, 0x07,
|
||||||
|
0x8d, 0xa4, 0x24, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x83, 0xc1, 0x02,
|
||||||
|
0x89, 0x4d, 0xf4,
|
||||||
|
0x66, 0x83, 0xf8, 0x0d};
|
||||||
|
auto addr = MemDbg::findBytes(bytes1, sizeof(bytes1), processStartAddress, processStopAddress);
|
||||||
|
|
||||||
bool EntisGLS::attach_function() {
|
if (!addr)
|
||||||
|
return false;
|
||||||
|
HookParam hp;
|
||||||
|
hp.address = addr;
|
||||||
|
hp.offset = regoffset(eax);
|
||||||
|
hp.type = USING_STRING | CODEC_UTF16;
|
||||||
|
return NewHook(hp, "EntisGLS");
|
||||||
|
}
|
||||||
|
bool h1()
|
||||||
|
{
|
||||||
|
|
||||||
|
// それは舞い散る桜のように-完全版-
|
||||||
|
// int __thiscall sub_4BB5D0(_BYTE *this, LPCWCH lpWideCharStr)
|
||||||
|
const uint8_t bytes1[] = {
|
||||||
|
0x66, 0x83, 0xF9, 0x41,
|
||||||
|
0x72, 0x06,
|
||||||
|
0x66, 0x83, 0xF9, 0x5a,
|
||||||
|
0x76, 0x0C,
|
||||||
|
0x66, 0x83, 0xF9, 0x61,
|
||||||
|
0x72, 0x12,
|
||||||
|
0x66, 0x83, 0xF9, 0x7a,
|
||||||
|
0x77, 0x0c
|
||||||
|
|
||||||
//それは舞い散る桜のように-完全版-
|
};
|
||||||
//int __thiscall sub_4BB5D0(_BYTE *this, LPCWCH lpWideCharStr)
|
auto addr = MemDbg::findBytes(bytes1, sizeof(bytes1), processStartAddress, processStopAddress);
|
||||||
const uint8_t bytes1[]={
|
|
||||||
0x66,0x83,0xF9,0x41 ,
|
|
||||||
0x72,0x06,
|
|
||||||
0x66,0x83,0xF9,0x5a ,
|
|
||||||
0x76,0x0C,
|
|
||||||
0x66,0x83,0xF9,0x61 ,
|
|
||||||
0x72,0x12,
|
|
||||||
0x66,0x83,0xF9,0x7a ,
|
|
||||||
0x77,0x0c
|
|
||||||
|
|
||||||
};
|
if (!addr)
|
||||||
auto addr=MemDbg::findBytes(bytes1, sizeof(bytes1), processStartAddress, processStopAddress);
|
return false;
|
||||||
|
addr = MemDbg::findEnclosingAlignedFunction(addr);
|
||||||
|
if (!addr)
|
||||||
|
return false;
|
||||||
|
HookParam hp;
|
||||||
|
hp.address = addr;
|
||||||
|
hp.offset = stackoffset(1);
|
||||||
|
hp.embed_hook_font = F_GetGlyphOutlineW;
|
||||||
|
hp.type = USING_STRING | CODEC_UTF16 | EMBED_ABLE | EMBED_AFTER_NEW;
|
||||||
|
|
||||||
if (!addr) return false;
|
return NewHook(hp, "EntisGLS");
|
||||||
addr=MemDbg::findEnclosingAlignedFunction(addr);
|
}
|
||||||
if (!addr) return false;
|
|
||||||
HookParam hp;
|
|
||||||
hp.address = addr ;
|
|
||||||
hp.offset=stackoffset(1);
|
|
||||||
hp.embed_hook_font=F_GetGlyphOutlineW;
|
|
||||||
hp.type = USING_STRING|CODEC_UTF16|EMBED_ABLE|EMBED_AFTER_NEW;
|
|
||||||
|
|
||||||
return NewHook(hp, "EntisGLS");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
bool EntisGLS::attach_function()
|
||||||
|
{
|
||||||
|
return h1() || h2();
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
set(VERSION_MAJOR 6)
|
set(VERSION_MAJOR 6)
|
||||||
set(VERSION_MINOR 15)
|
set(VERSION_MINOR 15)
|
||||||
set(VERSION_PATCH 0)
|
set(VERSION_PATCH 1)
|
||||||
set(VERSION_REVISION 0)
|
set(VERSION_REVISION 0)
|
||||||
set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}")
|
set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}")
|
||||||
add_library(VERSION_DEF ${CMAKE_CURRENT_LIST_DIR}/version_def.cpp)
|
add_library(VERSION_DEF ${CMAKE_CURRENT_LIST_DIR}/version_def.cpp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user