diff --git a/Plugin64/date.cpp b/Plugin64/date.cpp index 89fa704..2339bd0 100644 --- a/Plugin64/date.cpp +++ b/Plugin64/date.cpp @@ -36,6 +36,7 @@ namespace Date { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // d w mw w y BytePattern::temp_instance().find_pattern("64 20 77 20 6D"); if (BytePattern::temp_instance().has_size(1, u8"右上の表記を変更")) { diff --git a/Plugin64/dll_main.cpp b/Plugin64/dll_main.cpp index 5ca8d01..3335ae7 100644 --- a/Plugin64/dll_main.cpp +++ b/Plugin64/dll_main.cpp @@ -29,11 +29,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, e |= ModDownload::Init(); #endif - // デバッグ用 - //#ifdef _DEBUG - //e |= Debug::Init(options); - //#endif - // フォント読み込み e |= Font::Init(options); diff --git a/Plugin64/event_dialog.cpp b/Plugin64/event_dialog.cpp index 1b5ff5b..308c485 100644 --- a/Plugin64/event_dialog.cpp +++ b/Plugin64/event_dialog.cpp @@ -50,6 +50,7 @@ namespace EventDialog { break; case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movzx eax, byte ptr [rdx+rax] BytePattern::temp_instance().find_pattern("0F B6 04 02 49 8B 34 C2 F3 41 0F 10 8A 48 08 00 00"); if (BytePattern::temp_instance().has_size(1, u8"文字取得処理")) { @@ -115,6 +116,7 @@ namespace EventDialog { break; case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov rax, [rsp+1158h+arg_20] BytePattern::temp_instance().find_pattern("48 8B 84 24 80 11 00 00 8B 00 03 C0"); if (BytePattern::temp_instance().has_size(1, u8"分岐処理修正戻り先アドレス2")) { @@ -193,6 +195,7 @@ namespace EventDialog { break; case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // inc edi BytePattern::temp_instance().find_pattern("FF C7 3B 7B 10 44 8B 84 24 70 11 00 00"); if (BytePattern::temp_instance().has_size(1, u8"カウントアップ")) { diff --git a/Plugin64/file_save.cpp b/Plugin64/file_save.cpp index 48a68c6..748f6b1 100644 --- a/Plugin64/file_save.cpp +++ b/Plugin64/file_save.cpp @@ -56,6 +56,7 @@ namespace FileSave { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov eax, [rcx+10h] BytePattern::temp_instance().find_pattern("8B 41 10 85 C0 0F 84 31 01 00 00"); if (BytePattern::temp_instance().has_size(1, u8"ファイル名を安全にしている場所を短絡する")) { @@ -82,6 +83,7 @@ namespace FileSave { int offset = 0; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -192,6 +194,7 @@ namespace FileSave { e.fileSave.unmatchdFileSaveProc3Injector = true; } break; + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -241,6 +244,7 @@ namespace FileSave { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // lea r8, [rbp+0] BytePattern::temp_instance().find_pattern("4C 8D 45 00 48 8D 15 ? ? ? ? 48 8D 4C 24 70 E8 ? ? ? ? 90"); if (BytePattern::temp_instance().has_size(1, u8"ダイアログでのセーブエントリのツールチップを表示できるようにする1")) { @@ -323,6 +327,7 @@ namespace FileSave { e.fileSave.unmatchdFileSaveProc5Injector = true; } break; + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -390,6 +395,7 @@ namespace FileSave { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // lea r8, [rbp+730h+var_3A0] BytePattern::temp_instance().find_pattern("4C 8D 85 90 03 00 00 48 8D 15 ? ? ? ? 48 8D 4C 24 30"); if (BytePattern::temp_instance().has_size(1, u8"スタート画面でのコンティニューのツールチップ")) { @@ -451,6 +457,7 @@ namespace FileSave { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // lea rcx, [rbx+0C8h] uintptr_t address; diff --git a/Plugin64/font.cpp b/Plugin64/font.cpp index 86b384c..795412f 100644 --- a/Plugin64/font.cpp +++ b/Plugin64/font.cpp @@ -35,6 +35,7 @@ namespace Font { break; case v1_33_0_0: + case v1_33_3_0: // cmp edi, 0FFh // 81 FF FF 00 00 00 BytePattern::temp_instance().find_pattern("81 FF FF 00 00 00 0F 87 2C 01 00 00 83"); @@ -75,6 +76,7 @@ namespace Font { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov rcx,cs:hHeap BytePattern::temp_instance().find_pattern("48 8B 0D ? ? ? ? 4C 8B C3 33 D2"); if (BytePattern::temp_instance().has_size(1, "Font buffer heap zero clear")) { @@ -121,6 +123,7 @@ namespace Font { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: BytePattern::temp_instance().find_pattern("BA 88 3D 00 00 48 8B CF"); if (BytePattern::temp_instance().has_size(1, "Font buffer clear")) { // mov edx, 3D88h @@ -159,6 +162,7 @@ namespace Font { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: BytePattern::temp_instance().find_pattern("BA 88 3D 00 00 48 8B 4D 28"); if (BytePattern::temp_instance().has_size(1, "Font buffer clear")) { // mov edx, 3D88h @@ -197,6 +201,7 @@ namespace Font { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: BytePattern::temp_instance().find_pattern("B9 88 3D 00 00"); if (BytePattern::temp_instance().has_size(1, "Font buffer expansion")) { // mov ecx, 3D88h @@ -234,6 +239,7 @@ namespace Font { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: BytePattern::temp_instance().find_pattern("41 81 FE 00 00 00 01"); if (BytePattern::temp_instance().has_size(1, u8"Font size limit")) { // cmp r14d, 1000000h diff --git a/Plugin64/ime.cpp b/Plugin64/ime.cpp index 966788d..f0b103a 100644 --- a/Plugin64/ime.cpp +++ b/Plugin64/ime.cpp @@ -53,6 +53,7 @@ namespace Ime { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov edx, r13d BytePattern::temp_instance().find_pattern("41 8B D5 49 8B CC E8 ? ? ? ? 85 C0 0F 85"); if (BytePattern::temp_instance().has_size(1, u8"SDL_windowsevents.cの修正")) { @@ -105,6 +106,7 @@ namespace Ime { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: rectAddress = (uintptr_t)▭ // SDL_SetTextInputRectの関数を見つける @@ -190,6 +192,7 @@ namespace Ime { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // 直前の部分でjmpに使う14byteを確保することができなかった。 // そのためWM_KEYDOWNのコードをすべて移植した // mov rcx, [rbp+0C0h+hRawInput] diff --git a/Plugin64/input.cpp b/Plugin64/input.cpp index bda989b..e41cb83 100644 --- a/Plugin64/input.cpp +++ b/Plugin64/input.cpp @@ -62,6 +62,7 @@ namespace Input { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov eax, dword ptr [rbp+120h+var_18C] BytePattern::temp_instance().find_pattern("8B 45 94 32 DB 3C 80 73 05 0F B6 D8 EB 10"); if (BytePattern::temp_instance().has_size(1, u8"入力した文字をutf8からエスケープ列へ変換する1")) { @@ -116,6 +117,7 @@ namespace Input { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov rax, [rdi] BytePattern::temp_instance().find_pattern("48 8B 07 48 8B CF 85 DB 74 08 FF 90 40 01 00 00"); if (BytePattern::temp_instance().has_size(1, u8"バックスペース処理の修正")) { diff --git a/Plugin64/list_field_adjustment.cpp b/Plugin64/list_field_adjustment.cpp index 264e415..ffacf63 100644 --- a/Plugin64/list_field_adjustment.cpp +++ b/Plugin64/list_field_adjustment.cpp @@ -21,6 +21,7 @@ namespace ListFieldAdjustment { DllError e = {}; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -90,6 +91,7 @@ namespace ListFieldAdjustment { DllError e = {}; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -163,6 +165,7 @@ namespace ListFieldAdjustment { DllError e = {}; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: diff --git a/Plugin64/localization.cpp b/Plugin64/localization.cpp index bd7013a..a5dd155 100644 --- a/Plugin64/localization.cpp +++ b/Plugin64/localization.cpp @@ -54,6 +54,7 @@ namespace Localization { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov [rsp+arg_10], rbx BytePattern::temp_instance().find_pattern("48 89 5C 24 18 55 41 56 41 57 48 83 EC 20 4D 8B F0"); if (BytePattern::temp_instance().has_size(1, u8"std::basic_string#insertをフック")) { @@ -118,6 +119,7 @@ namespace Localization { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov rax, [rdi+30h] BytePattern::temp_instance().find_pattern("48 8B 47 30 4C 8B 40 28 49 83 C0 10"); if (BytePattern::temp_instance().has_size(1, u8"Battle of areaを逆転させる")) { @@ -163,6 +165,7 @@ namespace Localization { e.localization.unmatchdLocalizationProc3Injector = true; } break; + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -233,6 +236,7 @@ namespace Localization { e.localization.unmatchdLocalizationProc4Injector = true; } break; + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: offset = 0x3C; @@ -311,6 +315,7 @@ namespace Localization { int offset = 0; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -395,6 +400,7 @@ namespace Localization { int offset = 0; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: /* 処理は不要になった。tmm_l_english.ymlのLONG_EU3_DATE_STRINGで代用される*/ break; @@ -460,6 +466,7 @@ namespace Localization { std::string pattern; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -515,6 +522,7 @@ namespace Localization { std::string pattern; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -569,6 +577,7 @@ namespace Localization { DllError e = {}; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: diff --git a/Plugin64/main_text.cpp b/Plugin64/main_text.cpp index 608df8c..f1bea0c 100644 --- a/Plugin64/main_text.cpp +++ b/Plugin64/main_text.cpp @@ -37,6 +37,7 @@ namespace MainText { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movsxd rax, edi BytePattern::temp_instance().find_pattern("48 63 C7 0F B6 04 18 F3 41 0F 10 9F 48 08 00 00"); if (BytePattern::temp_instance().has_size(1, u8"テキスト処理ループ2の文字取得修正")) { @@ -70,6 +71,7 @@ namespace MainText { case v1_31_3_0: case v1_31_2_0: case v1_31_1_0: + case v1_33_3_0: // movsxd rdx, edi BytePattern::temp_instance().find_pattern("48 63 D7 49 63 CE 4C 8B 55 80"); if (BytePattern::temp_instance().has_size(1, u8"テキスト処理ループ1のカウント処理修正")) { @@ -124,6 +126,7 @@ namespace MainText { DllError e = {}; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: // cmp cs:byte_xxxxx, 0 @@ -239,6 +242,7 @@ namespace MainText { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movzx eax, byte ptr [rdx+r10] BytePattern::temp_instance().find_pattern("42 0F B6 04 12 49 8B 0C C7"); if (BytePattern::temp_instance().has_size(1, u8"テキスト処理ループ1の文字取得修正")) { diff --git a/Plugin64/map_adjustment.cpp b/Plugin64/map_adjustment.cpp index b0cd688..63f6e52 100644 --- a/Plugin64/map_adjustment.cpp +++ b/Plugin64/map_adjustment.cpp @@ -62,6 +62,7 @@ namespace MapAdjustment { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movsx ecx, byte ptr [rdi + rbx] BytePattern::temp_instance().find_pattern("0F BE 0C 1F E8 ? ? ? ? 88 04 1F 41 FF"); if (BytePattern::temp_instance().has_size(2, u8"マップ文字の大文字化キャンセル")) { @@ -135,6 +136,7 @@ namespace MapAdjustment { break; case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // lea rax, [rbp+200h+var_200] BytePattern::temp_instance().find_pattern("48 8D 45 00 49 83 C8 FF 90 49 FF C0"); if (BytePattern::temp_instance().has_size(1, u8"文字チェック修正") || @@ -201,6 +203,7 @@ namespace MapAdjustment { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // r9, 0FFFFFFFFFFFFFFFFh BytePattern::temp_instance().find_pattern("49 83 C9 FF 45 33 C0 48 8D 95 D0 00 00 00"); if (BytePattern::temp_instance().has_size(1, u8"文字チェックの後のコピー処理")) { @@ -266,6 +269,7 @@ namespace MapAdjustment { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // lea rax, [rbp+200h+var_160] BytePattern::temp_instance().find_pattern("48 8D 85 A0 00 00 00 49 83 F8 10"); if (BytePattern::temp_instance().has_size(1, u8"文字取得処理修正")) { @@ -335,6 +339,7 @@ namespace MapAdjustment { break; case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // localization/tmm_l_english.ymlのENCLAVE_NAME_FORMATで対応された break; diff --git a/Plugin64/map_justify.cpp b/Plugin64/map_justify.cpp index 1d5d021..9356583 100644 --- a/Plugin64/map_justify.cpp +++ b/Plugin64/map_justify.cpp @@ -33,6 +33,7 @@ namespace MapJustify { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movsd xmm3, [rbp+1D0h+var_168] BytePattern::temp_instance().find_pattern("F2 0F 10 5D 68 FF C2 F2 0F 10 65 20"); if (BytePattern::temp_instance().has_size(1, u8"文字取得処理リターン先2")) { @@ -84,6 +85,7 @@ namespace MapJustify { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // lea eax, [r10-1] BytePattern::temp_instance().find_pattern("41 8D 42 FF 66 0F 6E F2 66 0F 6E C0"); if (BytePattern::temp_instance().has_size(1, u8"一文字表示の調整")) { @@ -126,6 +128,7 @@ namespace MapJustify { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movsd xmm3, [rbp+1D0h+var_168] BytePattern::temp_instance().find_pattern("F2 0F 10 5D 68 FF C2 F2 0F 10 65 20"); if (BytePattern::temp_instance().has_size(1, u8"カウント処理")) { diff --git a/Plugin64/map_nudge_view.cpp b/Plugin64/map_nudge_view.cpp index c7a32fe..5015bf6 100644 --- a/Plugin64/map_nudge_view.cpp +++ b/Plugin64/map_nudge_view.cpp @@ -42,6 +42,7 @@ namespace MapNudgeView { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movzx eax, byte ptr [rax+rcx] BytePattern::temp_instance().find_pattern("0F B6 04 08 49 8B 94 C4 20 01 00 00"); if (BytePattern::temp_instance().has_size(1, u8"nudge view")) { diff --git a/Plugin64/map_popup.cpp b/Plugin64/map_popup.cpp index 4d52cac..ad9215e 100644 --- a/Plugin64/map_popup.cpp +++ b/Plugin64/map_popup.cpp @@ -34,6 +34,7 @@ namespace MapPopup { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movzx r8d, byte ptr [rdi+rax] BytePattern::temp_instance().find_pattern("44 0F B6 04 07 BA 01 00 00 00 48 8D 4D D0"); if (BytePattern::temp_instance().has_size(1, u8"ループ1の文字列コピー")) { @@ -92,6 +93,7 @@ namespace MapPopup { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movzx eax, byte ptr [rax+rdi] BytePattern::temp_instance().find_pattern("0F B6 04 38 4D 8B B4 C7 20 01 00 00"); if (BytePattern::temp_instance().has_size(1, u8"ループ1の文字取得")) { @@ -147,6 +149,7 @@ namespace MapPopup { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movzx eax, byte ptr [rbx+rax] BytePattern::temp_instance().find_pattern("0F B6 04 03 4D 8B 9C C7 20 01 00 00"); if (BytePattern::temp_instance().has_size(1, u8"ループ2の文字取得")) { diff --git a/Plugin64/map_view.cpp b/Plugin64/map_view.cpp index f971f7c..fdcec51 100644 --- a/Plugin64/map_view.cpp +++ b/Plugin64/map_view.cpp @@ -34,6 +34,7 @@ namespace MapView { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movzx eax, byte ptr [rax+r8] BytePattern::temp_instance().find_pattern("42 0F B6 04 00 4C 8B 1C C7 4C 89 5D 38"); if (BytePattern::temp_instance().has_size(1, u8"処理ループ2の文字取得処理")) { @@ -90,6 +91,7 @@ namespace MapView { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // lea r9, [r12+120h] BytePattern::temp_instance().find_pattern("4D 8D 8C 24 20 01 00 00 42 0F B6 04 38 4D 8B 24 C1"); if (BytePattern::temp_instance().has_size(1, u8"処理ループ1の文字取得処理")) { @@ -132,6 +134,7 @@ namespace MapView { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movzx r8d, byte ptr [rax+r15] BytePattern::temp_instance().find_pattern("46 0F B6 04 38 BA 01 00 00 00 48 8D 4C 24 40"); if (BytePattern::temp_instance().has_size(1, u8"処理ループ1の文字コピー")) { diff --git a/Plugin64/plugin_64.h b/Plugin64/plugin_64.h index e9b9734..646726a 100644 --- a/Plugin64/plugin_64.h +++ b/Plugin64/plugin_64.h @@ -21,11 +21,20 @@ enum Eu4Version { v1_31_5_0 = 1315, v1_31_6_0 = 1316, v1_32_0_1 = 1321, - v1_33_0_0 = 1330 + v1_33_0_0 = 1330, + v1_33_3_0 = 1333 }; typedef UINT64 DllErrorCode; +inline std::string BoolToString(bool b) +{ + return b ? "NG" : "OK"; +} + +#define PL( f ) BoolToString(f) + ":" + #f + "\n" +#define P( f ) #f ":" + BoolToString(f) + struct DllError{ union { DllErrorCode code; @@ -34,6 +43,12 @@ struct DllError{ bool waitFailed : 1; bool proccessFaild : 1; }; + + std::string print() { + return PL(timeout) + + PL(waitFailed) + + PL(proccessFaild); + } } mod; union { @@ -42,6 +57,11 @@ struct DllError{ bool unmatchdDateProc1Injector : 1; bool versionDateProc1Injector : 1; }; + + std::string print() { + return PL(unmatchdDateProc1Injector) + + PL(versionDateProc1Injector); + } } date; union { @@ -54,6 +74,14 @@ struct DllError{ bool unmatchdEventDialog3Injector : 1; bool versionEventDialog3Injector : 1; }; + + std::string print() { + return PL(unmatchdEventDialog1Injector) + + PL(versionEventDialog1Injector) + + PL(unmatchdEventDialog2Injector) + + PL(versionEventDialog2Injector) + + PL(versionEventDialog3Injector); + } } eventDialog; union { @@ -74,6 +102,23 @@ struct DllError{ bool unmatchdFileSaveProc7Injector : 1; bool versionFileSaveProc7Injector : 1; }; + + std::string print() { + return PL(unmatchdFileSaveProc1Injector) + + PL(versionFileSaveProc1Injector) + + PL(unmatchdFileSaveProc2Injector) + + PL(versionFileSaveProc2Injector) + + PL(unmatchdFileSaveProc3Injector) + + PL(versionFileSaveProc3Injector) + + PL(unmatchdFileSaveProc4Injector) + + PL(versionFileSaveProc4Injector) + + PL(unmatchdFileSaveProc5Injector) + + PL(versionFileSaveProc5Injector) + + PL(unmatchdFileSaveProc6Injector) + + PL(versionFileSaveProc6Injector) + + PL(unmatchdFileSaveProc7Injector) + + PL(versionFileSaveProc7Injector); + } } fileSave; union { @@ -92,6 +137,21 @@ struct DllError{ bool unmatchdFontSizeLimitInjector : 1; bool versionFontSizeLimitInjector : 1; }; + + std::string print() { + return PL(unmatchdCharCodePointLimiterPatchInjector) + + PL(versionCharCodePointLimiterPatchInjector) + + PL(unmatchdFontBufferHeapZeroClearInjector) + + PL(versionFontBufferHeapZeroClearInjector) + + PL(unmatchdFontBufferClear1Injector) + + PL(versionFontBufferClear1Injector) + + PL(unmatchdFontBufferClear2Injector) + + PL(versionFontBufferClear2Injector) + + PL(unmatchdFontBufferExpansionInjector) + + PL(versionFontBufferExpansionInjector) + + PL(unmatchdFontSizeLimitInjector) + + PL(versionFontSizeLimitInjector); + } } font; union { @@ -104,6 +164,15 @@ struct DllError{ bool unmatchdImeProc3Injector : 1; bool versionImeProc3Injector : 1; }; + + std::string print() { + return PL(unmatchdImeProc1Injector) + + PL(versionImeProc1Injector) + + PL(unmatchdImeProc2Injector) + + PL(versionImeProc2Injector) + + PL(unmatchdImeProc3Injector) + + PL(versionImeProc3Injector); + } } ime; union { @@ -114,6 +183,14 @@ struct DllError{ bool unmatchdInputProc2Injector : 1; bool versionInputProc2Injector : 1; }; + + std::string print() { + return PL(unmatchdInputProc1Injector) + + PL(versionInputProc1Injector) + + PL(unmatchdInputProc2Injector) + + PL(versionInputProc2Injector); + } + } input; union { @@ -126,6 +203,16 @@ struct DllError{ bool unmatchdListFieldAdjustmentProc3Injector : 1; bool versionListFieldAdjustmentProc3Injector : 1; }; + + std::string print() { + return PL(unmatchdListFieldAdjustmentProc1Injector) + + PL(versionListFieldAdjustmentProc1Injector) + + PL(unmatchdListFieldAdjustmentProc2Injector) + + PL(versionListFieldAdjustmentProc2Injector) + + PL(unmatchdListFieldAdjustmentProc3Injector) + + PL(versionListFieldAdjustmentProc3Injector); + } + } listFiledAdjustment; union { @@ -150,6 +237,28 @@ struct DllError{ bool unmatchdLocalizationProc9Injector : 1; bool versionLocalizationProc9Injector : 1; }; + + std::string print() { + return PL(unmatchdLocalizationProc1Injector) + + PL(versionLocalizationProc1Injector) + + PL(unmatchdLocalizationProc2Injector) + + PL(versionLocalizationProc2njector) + + PL(unmatchdLocalizationProc3Injector) + + PL(versionLocalizationProc3njector) + + PL(unmatchdLocalizationProc4Injector) + + PL(versionLocalizationProc4Injector) + + PL(unmatchdLocalizationProc5Injector) + + PL(versionLocalizationProc5Injector) + + PL(unmatchdLocalizationProc6Injector) + + PL(versionLocalizationProc6Injector) + + PL(unmatchdLocalizationProc7Injector) + + PL(versionLocalizationProc7Injector) + + PL(unmatchdLocalizationProc8Injector) + + PL(versionLocalizationProc8Injector) + + PL(unmatchdLocalizationProc9Injector) + + PL(versionLocalizationProc9Injector); + } + } localization; union { @@ -164,6 +273,17 @@ struct DllError{ bool unmatchdMainTextProc4Injector : 1; bool versionMainTextProc4Injector : 1; }; + + std::string print() { + return PL(unmatchdMainTextProc1Injector) + + PL(versionMainTextProc11njector) + + PL(unmatchdMainTextProc2Injector) + + PL(versionMainTextProc2Injector) + + PL(unmatchdMainTextProc3Injector) + + PL(versionMainTextProc3Injector) + + PL(unmatchdMainTextProc4Injector) + + PL(versionMainTextProc4Injector); + } } mainText; union { @@ -180,6 +300,19 @@ struct DllError{ bool unmatchdMapAdjustmentProc5Injector : 1; bool versionMapAdjustmentProc5Injector : 1; }; + + std::string print() { + return PL(unmatchdMapAdjustmentProc1Injector) + + PL(versionMapAdjustmentProc1Injector) + + PL(unmatchdMapAdjustmentProc2Injector) + + PL(versionMapAdjustmentProc2Injector) + + PL(unmatchdMapAdjustmentProc3Injector) + + PL(versionMapAdjustmentProc3Injector) + + PL(unmatchdMapAdjustmentProc4Injector) + + PL(versionMapAdjustmentProc4Injector) + + PL(unmatchdMapAdjustmentProc5Injector) + + PL(versionMapAdjustmentProc5Injector); + } } mapAdjustment; union { @@ -194,6 +327,17 @@ struct DllError{ bool unmatchdMapJustifyProc4Injector : 1; bool versionMapJustifyProc4Injector : 1; }; + + std::string print() { + return PL(unmatchdMapJustifyProc1Injector) + + PL(versionMapJustifyProc1Injector) + + PL(unmatchdMapJustifyProc2Injector) + + PL(versionMapJustifyProc2Injector) + + PL(unmatchdMapJustifyProc3Injector) + + PL(versionMapJustifyProc3Injector) + + PL(unmatchdMapJustifyProc4Injector) + + PL(versionMapJustifyProc4Injector); + } } mapJustify; union { @@ -202,6 +346,11 @@ struct DllError{ bool unmatchdMapNudgeViewProc1Injector : 1; bool versionMapNudgeViewProc1Injector : 1; }; + + std::string print() { + return PL(unmatchdMapNudgeViewProc1Injector) + + PL(versionMapNudgeViewProc1Injector); + } } mapNudge; union { @@ -214,6 +363,15 @@ struct DllError{ bool unmatchdMapPopupProc3Injector : 1; bool versionMapPopupProc3Injector : 1; }; + + std::string print() { + return PL(unmatchdMapPopupProc1Injector) + + PL(versionMapPopupProc1Injector) + + PL(unmatchdMapPopupProc2Injector) + + PL(versionMapPopupProc2Injector) + + PL(unmatchdMapPopupProc3Injector) + + PL(versionMapPopupProc3Injector); + } } mapPopup; union { @@ -226,6 +384,16 @@ struct DllError{ bool unmatchdMapViewProc3Injector : 1; bool versionMapViewProc3Injector : 1; }; + + std::string print() { + return PL(unmatchdMapViewProc1Injector) + + PL(versionMapViewProc1Injector) + + PL(unmatchdMapViewProc2Injector) + + PL(versionMapViewProc2Injector) + + PL(unmatchdMapViewProc3Injector) + + PL(versionMapViewProc3Injector); + } + } mapView; union { @@ -234,6 +402,11 @@ struct DllError{ bool unmatchdDebugProc1Injector : 1; bool versionDebugProc1Injector : 1; }; + + std::string print() { + return PL(unmatchdDebugProc1Injector) + + PL(versionDebugProc1Injector); + } } debug; union { @@ -254,6 +427,22 @@ struct DllError{ bool unmatchdTooltipAndButtonProc7Injector : 1; bool versionTooltipAndButtonProc7Injector : 1; }; + + std::string print() { + return PL(unmatchdTooltipAndButtonProc1Injector) + + PL(versionTooltipAndButtonProc1Injector) + + PL(unmatchdTooltipAndButtonProc2Injector) + + PL(versionTooltipAndButtonProc2Injector) + + PL(versionTooltipAndButtonProc3Injector) + + PL(unmatchdTooltipAndButtonProc4Injector) + + PL(versionTooltipAndButtonProc4Injector) + + PL(unmatchdTooltipAndButtonProc5Injector) + + PL(versionTooltipAndButtonProc5Injector) + + PL(unmatchdTooltipAndButtonProc6Injector) + + PL(versionTooltipAndButtonProc6Injector) + + PL(unmatchdTooltipAndButtonProc7Injector) + + PL(versionTooltipAndButtonProc7Injector); + } } tooltipAndButton; void operator |= (DllError e) @@ -298,27 +487,39 @@ struct DllError{ } std::string print() { - return format(u8"mod=%llx,date=%llx,eventDialog=%llx,fileSave=%llx," - "font=%llx,ime=%llx,input=%llx,listFiledAdjustment=%llx,localization=%llx" - "mainText=%llx,mapAdjustment=%llx,mapJustify=%llx,mapNudge=%llx,mapPopup=%llx" - "mapPopup=%llx,mapView=%llx,tooltipAndButton=%llx,debug=%llx", - this->mod.code, - this->date.code, - this->eventDialog.code, - this->fileSave.code, - this->font.code, - this->ime.code, - this->input.code, - this->listFiledAdjustment.code, - this->localization.code, - this->mainText.code, - this->mapAdjustment.code, - this->mapJustify.code, - this->mapNudge.code, - this->mapPopup.code, - this->mapView.code, - this->tooltipAndButton.code, - this->debug.code); + return this->tooltipAndButton.print() + + "--------------\n" + + this->mapView.print() + + "--------------\n" + + this->debug.print() + + "--------------\n" + + this->mapPopup.print() + + "--------------\n" + + this->mapNudge.print() + + "--------------\n" + + this->mapJustify.print() + + "--------------\n" + + this->mapAdjustment.print() + + "--------------\n" + + this->mainText.print() + + "--------------\n" + + this->localization.print() + + "--------------\n" + + this->listFiledAdjustment.print() + + "--------------\n" + + this->input.print() + + "--------------\n" + + this->ime.print() + + "--------------\n" + + this->font.print() + + "--------------\n" + + this->fileSave.print() + + "--------------\n" + + this->eventDialog.print() + + "--------------\n" + + this->date.print() + + "--------------\n" + + this->mod.print(); } template diff --git a/Plugin64/program.cpp b/Plugin64/program.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Plugin64/tooltip_and_button.cpp b/Plugin64/tooltip_and_button.cpp index 6a9ec2f..cb3b204 100644 --- a/Plugin64/tooltip_and_button.cpp +++ b/Plugin64/tooltip_and_button.cpp @@ -4,12 +4,16 @@ namespace TooltipAndButton { extern "C" { void tooltipAndButtonProc1(); + void tooltipAndButtonProc1V133(); void tooltipAndButtonProc2(); + void tooltipAndButtonProc2V133(); void tooltipAndButtonProc3(); void tooltipAndButtonProc4(); + void tooltipAndButtonProc4V133(); void tooltipAndButtonProc5(); void tooltipAndButtonProc5V130(); void tooltipAndButtonProc7(); + void tooltipAndButtonProc7V133(); uintptr_t tooltipAndButtonProc1ReturnAddress; uintptr_t tooltipAndButtonProc1CallAddress; uintptr_t tooltipAndButtonProc2ReturnAddress; @@ -26,6 +30,24 @@ namespace TooltipAndButton { DllError e = {}; switch (options.version) { + case v1_33_3_0: + // r8d, byte ptr [rax + rcx] + BytePattern::temp_instance().find_pattern("44 0F B6 04 08 BA 01 00 00 00"); + if (BytePattern::temp_instance().has_size(1, u8"処理ループ1の文字コピー")) { + uintptr_t address = BytePattern::temp_instance().get_first().address(); + + // call {sub_xxxxx} + tooltipAndButtonProc1CallAddress = Injector::GetBranchDestination(address + 0x0F).as_int(); + + // nop + tooltipAndButtonProc1ReturnAddress = address + 0x14; + + Injector::MakeJMP(address, tooltipAndButtonProc1V133, true); + } + else { + e.tooltipAndButton.unmatchdTooltipAndButtonProc1Injector = true; + } + break; case v1_29_1_0: case v1_29_2_0: case v1_29_3_0: @@ -71,6 +93,21 @@ namespace TooltipAndButton { DllError e = {}; switch (options.version) { + case v1_33_3_0: + // mov edx, ebx + BytePattern::temp_instance().find_pattern("8B D3 0F B6 04 10 49 8B 0C C7"); + if (BytePattern::temp_instance().has_size(1, u8"処理ループ1の文字取得")) { + uintptr_t address = BytePattern::temp_instance().get_first().address(); + + // test rcx,rcx + tooltipAndButtonProc2ReturnAddress = address + 0xE; + + Injector::MakeJMP(address, tooltipAndButtonProc2V133, true); + } + else { + e.tooltipAndButton.unmatchdTooltipAndButtonProc2Injector = true; + } + break; case v1_29_1_0: case v1_29_2_0: case v1_29_3_0: @@ -130,6 +167,7 @@ namespace TooltipAndButton { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // mov ecx, ebx BytePattern::temp_instance().find_pattern("8B CB F3 45 0F 10 97 48 08 00 00"); if (BytePattern::temp_instance().has_size(1, u8"処理ループ2の文字取得")) { @@ -206,6 +244,24 @@ namespace TooltipAndButton { e.tooltipAndButton.unmatchdTooltipAndButtonProc4Injector = true; } break; + case v1_33_3_0: + // cmp word ptr [rcx + 6], 0 + BytePattern::temp_instance().find_pattern("66 83 79 06 00 0F 85 03 03 00 00"); + if (BytePattern::temp_instance().has_size(1, u8"処理ループ1の改行処理")) { + uintptr_t address = BytePattern::temp_instance().get_first().address(); + + // jnz {loc_xxxxx} / inc ebx + tooltipAndButtonProc4ReturnAddress1 = Injector::GetBranchDestination(address + 0x5).as_int(); + + // jz loc_xxxxx + tooltipAndButtonProc4ReturnAddress2 = address + 15; + + Injector::MakeJMP(address, tooltipAndButtonProc4V133, true); + } + else { + e.tooltipAndButton.unmatchdTooltipAndButtonProc4Injector = true; + } + break; default: e.tooltipAndButton.versionTooltipAndButtonProc4Injector = true; } @@ -281,6 +337,7 @@ namespace TooltipAndButton { case v1_31_6_0: case v1_32_0_1: case v1_33_0_0: + case v1_33_3_0: // movaps xmm8, [rsp+0F8h+var_58] BytePattern::temp_instance().find_pattern("44 0F 28 84 24 A0 00 00 00 0F 28 BC 24 B0 00 00 00 48"); if (BytePattern::temp_instance().has_size(1, u8"ツールチップの改行処理のリターン先2")) { @@ -315,6 +372,7 @@ namespace TooltipAndButton { DllError e = {}; switch (options.version) { + case v1_33_3_0: case v1_33_0_0: case v1_32_0_1: case v1_31_6_0: @@ -339,9 +397,27 @@ namespace TooltipAndButton { DllError e = {}; switch (options.version) { + case v1_33_3_0: + // inc ebx + BytePattern::temp_instance().find_pattern("FF C3 3B 5D A8 7D 1D E9 79 F7 FF FF E8"); + if (BytePattern::temp_instance().has_size(1, u8"カウントアップ")) { + uintptr_t address = BytePattern::temp_instance().get_first().address(); + + // jmp loc_xxxxx + tooltipAndButtonProc7ReturnAddress1 = Injector::GetBranchDestination(address + 0x7).as_int(); + + // mov edi, dword ptr [rsp+22D0h+var_2290] + tooltipAndButtonProc7ReturnAddress2 = address + 0x24; + + Injector::MakeJMP(address, tooltipAndButtonProc7V133, true); + } + else { + e.tooltipAndButton.unmatchdTooltipAndButtonProc7Injector = true; + } + break; case v1_33_0_0: case v1_32_0_1: - // inc edx + // inc ebx BytePattern::temp_instance().find_pattern("FF C3 3B 5D 60 7D 1D E9 7D F7 FF FF E8"); if (BytePattern::temp_instance().has_size(1, u8"カウントアップ")) { uintptr_t address = BytePattern::temp_instance().get_first().address(); diff --git a/Plugin64/tooltip_and_button_asm.asm b/Plugin64/tooltip_and_button_asm.asm index 3f910e8..f0901db 100644 --- a/Plugin64/tooltip_and_button_asm.asm +++ b/Plugin64/tooltip_and_button_asm.asm @@ -65,6 +65,43 @@ tooltipAndButtonProc1 ENDP ;-------------------------------------------; +tooltipAndButtonProc1V133 PROC + cmp byte ptr [rax + rcx], ESCAPE_SEQ_1; + jz JMP_A; + cmp byte ptr [rax + rcx], ESCAPE_SEQ_2; + jz JMP_A; + cmp byte ptr [rax + rcx], ESCAPE_SEQ_3; + jz JMP_A; + cmp byte ptr [rax + rcx], ESCAPE_SEQ_4; + jz JMP_A; + + movzx r8d, byte ptr[rax + rcx]; + mov edx, 1; + lea rcx, qword ptr [rsp + 22D0h - 2258h]; + mov tooltipAndButtonProc2TmpFlag, 0h; + call tooltipAndButtonProc1CallAddress; + + jmp JMP_B; +JMP_A: + mov tooltipAndButtonProc2TmpFlag, 1h; + lea r8, qword ptr [rax + rcx]; + mov tooltipAndButtonProc2TmpCharacterAddress, r8; + movzx r8d, byte ptr[rax + rcx]; + mov edx, 3; The memory is allocated 3 byte, but the first byte is copied 3 times. + lea rcx, qword ptr [rsp + 22D0h - 2258h]; + call tooltipAndButtonProc1CallAddress; + + ; overwrite + mov rcx, tooltipAndButtonProc2TmpCharacterAddress; + mov cx, word ptr [rcx+1]; + mov word ptr [rax+1], cx; +JMP_B: + push tooltipAndButtonProc1ReturnAddress; + ret; +tooltipAndButtonProc1V133 ENDP + +;-------------------------------------------; + tooltipAndButtonProc2 PROC mov edx, ebx; @@ -122,6 +159,63 @@ tooltipAndButtonProc2 ENDP ;-------------------------------------------; +tooltipAndButtonProc2V133 PROC + mov edx, ebx; + + cmp byte ptr[rax+rdx], ESCAPE_SEQ_1; + jz JMP_A; + cmp byte ptr[rax+rdx], ESCAPE_SEQ_2; + jz JMP_B; + cmp byte ptr[rax+rdx], ESCAPE_SEQ_3; + jz JMP_C; + cmp byte ptr[rax+rdx], ESCAPE_SEQ_4; + jz JMP_D; + jmp JMP_E; + +JMP_A: + movzx eax, word ptr[rax+rdx + 1]; + jmp JMP_F; + +JMP_B: + movzx eax, word ptr[rax+rdx + 1]; + sub eax, SHIFT_2; + jmp JMP_F; + +JMP_C: + movzx eax, word ptr[rax+rdx + 1]; + add eax, SHIFT_3; + jmp JMP_F; + +JMP_D: + movzx eax, word ptr[rax+rdx + 1]; + add eax, SHIFT_4; + jmp JMP_F; + +JMP_E: + movzx eax, byte ptr [rax + rdx]; + jmp JMP_G; + +JMP_F: + movzx eax, ax; + add edx,2; + ;mov dword ptr [rbp+6E0h- 6C0h], ebx; + + cmp eax, NO_FONT; + ja JMP_G; + mov eax, NOT_DEF; + +JMP_G: + mov rcx, qword ptr [r15 + rax * 8]; + mov qword ptr [rbp + 21D0h - 21F0h], rcx; + + mov tooltipAndButtonProc2TmpCharacter, eax; + + push tooltipAndButtonProc2ReturnAddress; + ret; +tooltipAndButtonProc2V133 ENDP + +;-------------------------------------------; + tooltipAndButtonProc3 PROC mov ecx, ebx; movss xmm10, dword ptr [r15 + 848h]; @@ -193,6 +287,24 @@ tooltipAndButtonProc4 ENDP ;-------------------------------------------; +tooltipAndButtonProc4V133 PROC + cmp word ptr [rcx + 6], 0 + jz JMP_A; + + cmp tooltipAndButtonProc2TmpCharacter, 00FFh; + ja JMP_A; + + push tooltipAndButtonProc4ReturnAddress1; + ret; + +JMP_A: + cmp dword ptr [rbp + 21D0h - 2210h], 0; + push tooltipAndButtonProc4ReturnAddress2; + ret; +tooltipAndButtonProc4V133 ENDP + +;-------------------------------------------; + tooltipAndButtonProc5 PROC lea rcx, qword ptr [r12 + 100h]; @@ -333,4 +445,24 @@ JMP_B: ret; tooltipAndButtonProc7 ENDP +;-------------------------------------------; + +tooltipAndButtonProc7V133 PROC + cmp tooltipAndButtonProc2TmpFlag, 1; + jnz JMP_A; + + add ebx,2; + +JMP_A: + inc ebx; + cmp ebx, dword ptr [rbp + 21D0h - 2228h]; + jge JMP_B; + push tooltipAndButtonProc7ReturnAddress1; + ret; + +JMP_B: + push tooltipAndButtonProc7ReturnAddress2; + ret; +tooltipAndButtonProc7V133 ENDP + END \ No newline at end of file diff --git a/Plugin64/validator.cpp b/Plugin64/validator.cpp index fb87efc..c753a42 100644 --- a/Plugin64/validator.cpp +++ b/Plugin64/validator.cpp @@ -7,7 +7,7 @@ namespace Validator { void Validate(DllError e, RunOptions options) { auto message = e.print(); - BytePattern::LoggingInfo("e=" + message); + BytePattern::LoggingInfo(message); if (e.errorCheck()) { const DWORD sysDefLcid = ::GetSystemDefaultLCID(); diff --git a/Plugin64/version.cpp b/Plugin64/version.cpp index a35d88f..2ea7a0b 100644 --- a/Plugin64/version.cpp +++ b/Plugin64/version.cpp @@ -54,6 +54,8 @@ namespace Version { return u8"v1_32_0_1"; case v1_33_0_0: return u8"v1_33_0_0"; + case v1_33_3_0: + return u8"v1_33_3_0"; default: return u8"UNKNOWN"; } @@ -102,6 +104,9 @@ namespace Version { case 332: version = v1_33_0_0; break; + case 333: + version = v1_33_3_0; + break; } }