mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +08:00
.
This commit is contained in:
parent
e5e483721f
commit
c374a881ed
@ -1,21 +1,23 @@
|
|||||||
#include"littlecheese.h"
|
#include "littlecheese.h"
|
||||||
|
|
||||||
bool littlecheese::attach_function() {
|
bool littlecheese::attach_function()
|
||||||
//黒と金の開かない鍵
|
{
|
||||||
|
// 黒と金の開かない鍵
|
||||||
/*if ( a3 == 33088 )
|
/*if ( a3 == 33088 )
|
||||||
cmp edx, 8140h*/
|
cmp edx, 8140h*/
|
||||||
const BYTE bytes81[] = {
|
const BYTE bytes81[] = {
|
||||||
0x81,0xFA,0x40,0x81,0x00,0x00,0x75
|
0x81, 0xFA, 0x40, 0x81, 0x00, 0x00, 0x75};
|
||||||
};
|
|
||||||
auto addr = MemDbg::findBytes(bytes81, sizeof(bytes81), processStartAddress, processStopAddress);
|
auto addr = MemDbg::findBytes(bytes81, sizeof(bytes81), processStartAddress, processStopAddress);
|
||||||
if (addr == 0)return false;
|
if (addr == 0)
|
||||||
const BYTE align[] = { 0x83,0xC4 };//add esp xxx
|
return false;
|
||||||
|
const BYTE align[] = {0x83, 0xC4}; // add esp xxx
|
||||||
addr = reverseFindBytes(align, sizeof(align), addr - 0x100, addr);
|
addr = reverseFindBytes(align, sizeof(align), addr - 0x100, addr);
|
||||||
if (addr == 0)return false;
|
if (addr == 0)
|
||||||
|
return false;
|
||||||
HookParam hp;
|
HookParam hp;
|
||||||
hp.address = addr;
|
hp.address = addr;
|
||||||
ConsoleOutput("%p", addr);
|
hp.offset = regoffset(ecx);
|
||||||
hp.offset =regoffset(ecx);
|
hp.split = regoffset(edx);
|
||||||
hp.type |= CODEC_ANSI_BE;
|
hp.type = USING_CHAR | CODEC_ANSI_BE | USING_SPLIT;
|
||||||
return NewHook(hp, "littlecheese");
|
return NewHook(hp, "littlecheese");
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user