This repository has been archived by the owner on Nov 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 159
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
4 changed files
with
72 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#include "TeethingRing.h" | ||
|
||
bool TeethingRing::attach_function() | ||
{ | ||
// https://vndb.org/v5635 | ||
// キミとボクとエデンの林檎 | ||
// HSF932#-C@85FB0:EDEN.exe | ||
BYTE bytes[] = { | ||
0x8B,0x0A,0x8B,0xC1,0x83,0xF8,0x20 , | ||
0x0F,0x8F,XX4, | ||
0x0F,0x84,XX4, | ||
0x48 , | ||
0xBE,0x0F,0x00,0x00,0x00,0x3B,0xC6 , | ||
0x77,XX, | ||
}; | ||
auto addr=MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress); | ||
if(addr==0)return false; | ||
BYTE sehstart[]={ | ||
0x6a,0xff, | ||
0x68,XX4, | ||
0x64,0xa1,0,0,0,0 | ||
}; | ||
addr=reverseFindBytes(sehstart,sizeof(sehstart),addr-0x100,addr); | ||
if(addr==0)return false; | ||
HookParam hp; | ||
hp.address = addr;//0x84C70+(DWORD)GetModuleHandle(0); | ||
hp.type=USING_STRING|NO_CONTEXT|FULL_STRING; | ||
hp.text_fun = [](hook_stack *stack, HookParam *hp, uintptr_t *data, uintptr_t *split, size_t *len) | ||
{ | ||
auto _this = (void *)stack->THISCALLTHIS; | ||
auto a2 = (DWORD *)stack->ARG1; | ||
|
||
auto v2 = *a2; | ||
if ((int)*a2 <= 32) | ||
{ | ||
if (*a2 != 32) | ||
{ | ||
switch (v2) | ||
{ | ||
|
||
case 16: | ||
auto v4 = (char *)(*(int(__thiscall **)(void *, DWORD))(*(DWORD *)_this + 60))(_this, a2[1]); | ||
*data = (uintptr_t)v4; | ||
*len = strlen(v4); | ||
} | ||
} | ||
} | ||
}; | ||
hp.filter_fun=[](void* data, size_t* len, HookParam* hp){ | ||
//#F【琉星】#F | ||
if(all_ascii((char*)data,*len))return false; | ||
auto str=std::string((char*)data,*len); | ||
strReplace(str,"#F",""); | ||
return write_string_overwrite(data,len,str); | ||
}; | ||
return NewHook(hp, "TeethingRing"); | ||
} |
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,11 @@ | ||
|
||
|
||
class TeethingRing:public ENGINE{ | ||
public: | ||
TeethingRing(){ | ||
|
||
check_by=CHECK_BY::RESOURCE_STR; | ||
check_by_target=L"TeethingRing"; | ||
}; | ||
bool attach_function(); | ||
}; |
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