forked from Public-Mirror/Textractor
horkeye pattern update
This commit is contained in:
parent
d307b7af2e
commit
4adf820d58
@ -13527,6 +13527,171 @@ bool InsertExpHook()
|
||||
* http://www.hongfire.com/forum/showthread.php/36807-AGTH-text-extraction-tool-for-games-translation/page753
|
||||
* /HA-4@552B5:姉小路直子と銀色の死<EFBFBD>exe
|
||||
* If this hook no longer works, try that one instead.
|
||||
|
||||
|
||||
* Artikash 10/14/2018: Old HorkEye hook can't be found in shukusei no girlfriend https://vndb.org/v22880
|
||||
* This function can be used instead
|
||||
00FABC30 - 83 EC 34 - sub esp,34 { 52 }
|
||||
00FABC33 - A1 F4701701 - mov eax,[011770F4] { [9E005B76] }
|
||||
00FABC38 - 33 C4 - xor eax,esp
|
||||
00FABC3A - 89 44 24 30 - mov [esp+30],eax
|
||||
00FABC3E - 83 3D C4541701 00 - cmp dword ptr [011754C4],00 { 0 }
|
||||
00FABC45 - 0F84 C8010000 - je 00FABE13
|
||||
00FABC4B - 83 3D 0CBF7F01 00 - cmp dword ptr [017FBF0C],00 { 0 }
|
||||
00FABC52 - 66 A1 DCD00F01 - mov ax,[010FD0DC] { [00003264] }
|
||||
00FABC58 - F3 0F7E 05 D4D00F01 - movq xmm0,[010FD0D4] { ["lookahead2"] }
|
||||
00FABC60 - 66 A3 C0B97F01 - mov [017FB9C0],ax { [00545000] }
|
||||
00FABC66 - A0 DED00F01 - mov al,[010FD0DE] { [0] }
|
||||
00FABC6B - A2 C2B97F01 - mov [017FB9C2],al { [84] }
|
||||
00FABC70 - A1 E0D00F01 - mov eax,[010FD0E0] { ["vo/000/"] }
|
||||
00FABC75 - 66 0FD6 05 B8B97F01 - movq [017FB9B8],xmm0 { [00006669] }
|
||||
00FABC7D - 0F57 C0 - xorps xmm0,xmm0
|
||||
00FABC80 - 89 44 24 10 - mov [esp+10],eax
|
||||
00FABC84 - A1 E4D00F01 - mov eax,[010FD0E4] { [002F3030] }
|
||||
00FABC89 - 89 44 24 14 - mov [esp+14],eax
|
||||
00FABC8D - 0F11 44 24 18 - movups [esp+18],xmm0
|
||||
00FABC92 - 66 0FD6 44 24 28 - movq [esp+28],xmm0
|
||||
00FABC98 - 74 0B - je 00FABCA5
|
||||
00FABC9A - A1 9CE27F01 - mov eax,[017FE29C] { [0EC90D98] }
|
||||
00FABC9F - 8B 00 - mov eax,[eax]
|
||||
00FABCA1 - 8B 00 - mov eax,[eax]
|
||||
00FABCA3 - EB 05 - jmp 00FABCAA
|
||||
00FABCA5 - A1 F8BE7F01 - mov eax,[017FBEF8] { [00000640] }
|
||||
00FABCAA - 40 - inc eax
|
||||
00FABCAB - 55 - push ebp
|
||||
00FABCAC - 8B 2D 00602801 - mov ebp,[01286000] { [00D07890] }
|
||||
00FABCB2 - 89 44 24 04 - mov [esp+04],eax
|
||||
00FABCB6 - B8 ABAAAA2A - mov eax,2AAAAAAB { 715827883 }
|
||||
00FABCBB - 8B 4D 1C - mov ecx,[ebp+1C]
|
||||
00FABCBE - 2B 4D 18 - sub ecx,[ebp+18]
|
||||
00FABCC1 - F7 E9 - imul ecx
|
||||
00FABCC3 - D1 FA - sar edx,1
|
||||
00FABCC5 - 8B C2 - mov eax,edx
|
||||
00FABCC7 - C1 E8 1F - shr eax,1F { 31 }
|
||||
00FABCCA - 03 C2 - add eax,edx
|
||||
00FABCCC - 8B 54 24 04 - mov edx,[esp+04]
|
||||
00FABCD0 - 89 44 24 10 - mov [esp+10],eax
|
||||
00FABCD4 - 3B D0 - cmp edx,eax
|
||||
00FABCD6 - 0F83 36010000 - jae 00FABE12
|
||||
00FABCDC - 53 - push ebx
|
||||
00FABCDD - 8D 0C 52 - lea ecx,[edx+edx*2]
|
||||
00FABCE0 - C1 E1 02 - shl ecx,02 { 2 }
|
||||
00FABCE3 - 56 - push esi
|
||||
00FABCE4 - 89 4C 24 10 - mov [esp+10],ecx
|
||||
00FABCE8 - 57 - push edi
|
||||
00FABCE9 - 0F1F 80 00000000 - nop [eax+00000000]
|
||||
00FABCF0 - 8B 45 18 - mov eax,[ebp+18]
|
||||
00FABCF3 - 8B 3C 01 - mov edi,[ecx+eax]
|
||||
00FABCF6 - 8B 4F 14 - mov ecx,[edi+14] ; Hook here - edi currently is char** to text
|
||||
00FABCF9 - 83 F9 10 - cmp ecx,10 { 16 }
|
||||
00FABCFC - 72 04 - jb 00FABD02
|
||||
00FABCFE - 8B 07 - mov eax,[edi]
|
||||
00FABD00 - EB 02 - jmp 00FABD04
|
||||
00FABD02 - 8B C7 - mov eax,edi
|
||||
00FABD04 - 8A 10 - mov dl,[eax]
|
||||
00FABD06 - 0FB6 C2 - movzx eax,dl
|
||||
00FABD09 - 80 B8 20FA0F01 00 - cmp byte ptr [eax+010FFA20],00 { 0 }
|
||||
00FABD10 - 0F85 AD000000 - jne 00FABDC3
|
||||
00FABD16 - 80 B8 20041001 00 - cmp byte ptr [eax+01100420],00 { 0 }
|
||||
00FABD1D - 0F85 A0000000 - jne 00FABDC3
|
||||
00FABD23 - 80 FA 81 - cmp dl,-7F { 129 }
|
||||
00FABD26 - 0F85 E3000000 - jne 00FABE0F
|
||||
00FABD2C - 83 F9 10 - cmp ecx,10 { 16 }
|
||||
00FABD2F - 72 04 - jb 00FABD35
|
||||
00FABD31 - 8B 07 - mov eax,[edi]
|
||||
00FABD33 - EB 02 - jmp 00FABD37
|
||||
00FABD35 - 8B C7 - mov eax,edi
|
||||
00FABD37 - 80 78 01 79 - cmp byte ptr [eax+01],79 { 121 }
|
||||
00FABD3B - 0F85 CE000000 - jne 00FABE0F
|
||||
00FABD41 - 8B 47 10 - mov eax,[edi+10]
|
||||
00FABD44 - 33 DB - xor ebx,ebx
|
||||
00FABD46 - 89 44 24 18 - mov [esp+18],eax
|
||||
00FABD4A - 8D 73 02 - lea esi,[ebx+02]
|
||||
00FABD4D - 3B C6 - cmp eax,esi
|
||||
00FABD4F - 76 72 - jna 00FABDC3
|
||||
00FABD51 - 8B E8 - mov ebp,eax
|
||||
00FABD53 - 8B 57 14 - mov edx,[edi+14]
|
||||
00FABD56 - 83 FA 10 - cmp edx,10 { 16 }
|
||||
00FABD59 - 72 04 - jb 00FABD5F
|
||||
00FABD5B - 8B 07 - mov eax,[edi]
|
||||
00FABD5D - EB 02 - jmp 00FABD61
|
||||
00FABD5F - 8B C7 - mov eax,edi
|
||||
00FABD61 - 8A 0C 30 - mov cl,[eax+esi]
|
||||
00FABD64 - 0FB6 C1 - movzx eax,cl
|
||||
00FABD67 - 80 B8 20FF0F01 00 - cmp byte ptr [eax+010FFF20],00 { 0 }
|
||||
00FABD6E - 74 1A - je 00FABD8A
|
||||
00FABD70 - 80 F9 81 - cmp cl,-7F { 129 }
|
||||
00FABD73 - 75 12 - jne 00FABD87
|
||||
00FABD75 - 83 FA 10 - cmp edx,10 { 16 }
|
||||
00FABD78 - 72 04 - jb 00FABD7E
|
||||
00FABD7A - 8B 07 - mov eax,[edi]
|
||||
00FABD7C - EB 02 - jmp 00FABD80
|
||||
00FABD7E - 8B C7 - mov eax,edi
|
||||
00FABD80 - 80 7C 30 01 7A - cmp byte ptr [eax+esi+01],7A { 122 }
|
||||
00FABD85 - 74 32 - je 00FABDB9
|
||||
00FABD87 - 46 - inc esi
|
||||
00FABD88 - EB 28 - jmp 00FABDB2
|
||||
00FABD8A - 80 F9 2C - cmp cl,2C { 44 }
|
||||
00FABD8D - 75 23 - jne 00FABDB2
|
||||
00FABD8F - 85 DB - test ebx,ebx
|
||||
00FABD91 - 74 1C - je 00FABDAF
|
||||
00FABD93 - 8B C6 - mov eax,esi
|
||||
00FABD95 - 8B CF - mov ecx,edi
|
||||
00FABD97 - 2B C3 - sub eax,ebx
|
||||
00FABD99 - 50 - push eax
|
||||
00FABD9A - E8 C1DFFAFF - call 00F59D60
|
||||
00FABD9F - 03 C3 - add eax,ebx
|
||||
00FABDA1 - 50 - push eax
|
||||
00FABDA2 - 8D 44 24 28 - lea eax,[esp+28]
|
||||
00FABDA6 - 50 - push eax
|
||||
00FABDA7 - E8 F4BB0100 - call 00FC79A0
|
||||
00FABDAC - 83 C4 0C - add esp,0C { 12 }
|
||||
00FABDAF - 8D 5E 01 - lea ebx,[esi+01]
|
||||
00FABDB2 - 46 - inc esi
|
||||
00FABDB3 - 3B F5 - cmp esi,ebp
|
||||
00FABDB5 - 72 9C - jb 00FABD53
|
||||
00FABDB7 - EB 04 - jmp 00FABDBD
|
||||
00FABDB9 - 85 DB - test ebx,ebx
|
||||
00FABDBB - 75 37 - jne 00FABDF4
|
||||
00FABDBD - 8B 2D 00602801 - mov ebp,[01286000] { [00D07890] }
|
||||
00FABDC3 - 8B 54 24 10 - mov edx,[esp+10]
|
||||
00FABDC7 - 8B 4C 24 14 - mov ecx,[esp+14]
|
||||
00FABDCB - 42 - inc edx
|
||||
00FABDCC - 83 C1 0C - add ecx,0C { 12 }
|
||||
00FABDCF - 89 54 24 10 - mov [esp+10],edx
|
||||
00FABDD3 - 89 4C 24 14 - mov [esp+14],ecx
|
||||
00FABDD7 - 3B 54 24 1C - cmp edx,[esp+1C]
|
||||
00FABDDB - 0F82 0FFFFFFF - jb 00FABCF0
|
||||
00FABDE1 - 5F - pop edi
|
||||
00FABDE2 - 5E - pop esi
|
||||
00FABDE3 - 5B - pop ebx
|
||||
00FABDE4 - 5D - pop ebp
|
||||
00FABDE5 - 8B 4C 24 30 - mov ecx,[esp+30]
|
||||
00FABDE9 - 33 CC - xor ecx,esp
|
||||
00FABDEB - E8 16C61000 - call 010B8406
|
||||
00FABDF0 - 83 C4 34 - add esp,34 { 52 }
|
||||
00FABDF3 - C3 - ret
|
||||
00FABDF4 - 83 FA 10 - cmp edx,10 { 16 }
|
||||
00FABDF7 - 72 02 - jb 00FABDFB
|
||||
00FABDF9 - 8B 3F - mov edi,[edi]
|
||||
00FABDFB - 2B F3 - sub esi,ebx
|
||||
00FABDFD - 8D 04 1F - lea eax,[edi+ebx]
|
||||
00FABE00 - 56 - push esi
|
||||
00FABE01 - 50 - push eax
|
||||
00FABE02 - 8D 44 24 28 - lea eax,[esp+28]
|
||||
00FABE06 - 50 - push eax
|
||||
00FABE07 - E8 94BB0100 - call 00FC79A0
|
||||
00FABE0C - 83 C4 0C - add esp,0C { 12 }
|
||||
00FABE0F - 5F - pop edi
|
||||
00FABE10 - 5E - pop esi
|
||||
00FABE11 - 5B - pop ebx
|
||||
00FABE12 - 5D - pop ebp
|
||||
00FABE13 - 8B 4C 24 30 - mov ecx,[esp+30]
|
||||
00FABE17 - 33 CC - xor ecx,esp
|
||||
00FABE19 - E8 E8C51000 - call 010B8406
|
||||
00FABE1E - 83 C4 34 - add esp,34 { 52 }
|
||||
00FABE21 - C3 - ret
|
||||
|
||||
*/
|
||||
// Skip text between "," and "<22>, and remove [n]
|
||||
// ex:【夏偾,S005_B_0002】「バーッ<E383BC>ク
|
||||
@ -13563,20 +13728,39 @@ bool InsertHorkEyeHook()
|
||||
0x8a,0x0c,0x1a // 013cdb0d 8a0c1a mov cl,byte ptr ds:[edx+ebx] jichi: here
|
||||
};
|
||||
enum { addr_offset = sizeof(bytes) - 3 }; // 8a0c1a
|
||||
ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
|
||||
if (!addr) {
|
||||
ConsoleOutput("vnreng:HorkEye: pattern not found");
|
||||
return false;
|
||||
}
|
||||
|
||||
;
|
||||
if (ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress)) {
|
||||
HookParam hp = {};
|
||||
hp.address = addr + addr_offset;
|
||||
hp.offset = pusha_ebx_off -4;
|
||||
hp.type = USING_STRING|NO_CONTEXT|FIXING_SPLIT; // floating address
|
||||
hp.offset = pusha_ebx_off - 4;
|
||||
hp.type = USING_STRING | NO_CONTEXT | FIXING_SPLIT; // floating address
|
||||
hp.filter_fun = HorkEyeFilter;
|
||||
ConsoleOutput("vnreng: INSERT HorkEye");
|
||||
NewHook(hp, "HorkEye");
|
||||
return true;
|
||||
}
|
||||
|
||||
const BYTE bytes2[] =
|
||||
{
|
||||
0x8b, 0x45, 0x18,
|
||||
0x8b, 0x3c, 0x01
|
||||
};
|
||||
|
||||
if (DWORD addr = MemDbg::findBytes(bytes2, sizeof(bytes2), processStartAddress, processStopAddress))
|
||||
{
|
||||
HookParam hp = {};
|
||||
hp.address = addr + 6;
|
||||
hp.offset = pusha_edi_off - 4;
|
||||
hp.type = USING_STRING | DATA_INDIRECT;
|
||||
hp.index = 0;
|
||||
ConsoleOutput("Textractor: INSERT HorkEye2");
|
||||
NewHook(hp, "HorkEye2");
|
||||
return true;
|
||||
}
|
||||
|
||||
ConsoleOutput("vnreng:HorkEye: pattern not found");
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/** jichi 12/2/2014 5pb
|
||||
|
Loading…
x
Reference in New Issue
Block a user