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
69 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,50 @@ | ||
#include"VALKYRIA.h" | ||
|
||
bool VALKYRIA::attach_function() { | ||
auto addr=findiatcallormov((DWORD)GetTextExtentPoint32A,processStartAddress,processStartAddress, processStopAddress); | ||
ConsoleOutput("%p",addr); | ||
if(addr==0)return false; | ||
BYTE sehstart[]={ | ||
0x6a,0xff, | ||
0x68,XX4, | ||
0x64,0xa1,0,0,0,0, | ||
0x50, | ||
0x81,0xec,XX4, | ||
0xa1,XX4 | ||
}; | ||
addr=reverseFindBytes(sehstart,sizeof(sehstart),addr-0x400,addr,0,true); | ||
if(addr==0)return false; | ||
HookParam hp; | ||
hp.address=addr; | ||
hp.type=USING_STRING; | ||
hp.offset=get_stack(5); | ||
hp.filter_fun=[](void* data, size_t* len, HookParam* hp){ | ||
//实际上是单字符 | ||
auto str=std::string((char*)data,*len); | ||
if(str=="\\r"||str=="\\R") | ||
write_string_overwrite(data,len,"\n"); | ||
return true; | ||
// switch ( v12 ) | ||
// { | ||
// case 'U': | ||
// case 'u': | ||
// String[0] = strtol(a6 + 2, 0, 16); | ||
// String[1] = 0; | ||
// HIBYTE(v92) = v14; | ||
// LOWORD(v92) = a4; | ||
// BYTE2(v92) = BYTE2(a4); | ||
// return sub_454C40(a2, a3, v92, a5, String, (int)lprcDst, a8); | ||
// case 'R': | ||
// case 'r': | ||
// sub_453E20(); | ||
// return 0; | ||
// case '\\': | ||
// wcscpy(String, L"\\"); | ||
// HIBYTE(v91) = HIBYTE(this); | ||
// LOWORD(v91) = a4; | ||
// BYTE2(v91) = BYTE2(a4); | ||
// return sub_454C40(a2, a3, v91, a5, String, (int)a7, a8); | ||
// } | ||
}; | ||
return NewHook(hp,"VALKYRIA"); | ||
} |
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,15 @@ | ||
|
||
|
||
class VALKYRIA:public ENGINE{ | ||
public: | ||
VALKYRIA(){ | ||
|
||
check_by=CHECK_BY::CUSTOM; | ||
is_engine_certain=true; | ||
check_by_target=[](){ | ||
return Util::SearchResourceString(L"Copyright(C)VALKYRIA") && Util::CheckFile(L"data0*-00.dat"); | ||
|
||
}; | ||
} | ||
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