Skip to content

Commit

Permalink
Adapt dll to 1.33.3
Browse files Browse the repository at this point in the history
  • Loading branch information
matanki-saito committed Apr 9, 2022
1 parent 640dd90 commit e791431
Show file tree
Hide file tree
Showing 21 changed files with 491 additions and 29 deletions.
1 change: 1 addition & 0 deletions Plugin64/date.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"右上の表記を変更")) {
Expand Down
5 changes: 0 additions & 5 deletions Plugin64/dll_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ BOOL APIENTRY DllMain(HMODULE hModule,
e |= ModDownload::Init();
#endif

// デバッグ用
//#ifdef _DEBUG
//e |= Debug::Init(options);
//#endif

// フォント読み込み
e |= Font::Init(options);

Expand Down
3 changes: 3 additions & 0 deletions Plugin64/event_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"文字取得処理")) {
Expand Down Expand Up @@ -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")) {
Expand Down Expand Up @@ -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"カウントアップ")) {
Expand Down
7 changes: 7 additions & 0 deletions Plugin64/file_save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"ファイル名を安全にしている場所を短絡する")) {
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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")) {
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"スタート画面でのコンティニューのツールチップ")) {
Expand Down Expand Up @@ -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;

Expand Down
6 changes: 6 additions & 0 deletions Plugin64/font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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")) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Plugin64/ime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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の修正")) {
Expand Down Expand Up @@ -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の関数を見つける
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions Plugin64/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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"バックスペース処理の修正")) {
Expand Down
3 changes: 3 additions & 0 deletions Plugin64/list_field_adjustment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions Plugin64/localization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<char>#insertをフック")) {
Expand Down Expand Up @@ -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を逆転させる")) {
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions Plugin64/main_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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の文字取得修正")) {
Expand Down Expand Up @@ -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のカウント処理修正")) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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の文字取得修正")) {
Expand Down
5 changes: 5 additions & 0 deletions Plugin64/map_adjustment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"マップ文字の大文字化キャンセル")) {
Expand Down Expand Up @@ -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"文字チェック修正") ||
Expand Down Expand Up @@ -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"文字チェックの後のコピー処理")) {
Expand Down Expand Up @@ -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"文字取得処理修正")) {
Expand Down Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions Plugin64/map_justify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down Expand Up @@ -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"一文字表示の調整")) {
Expand Down Expand Up @@ -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"カウント処理")) {
Expand Down
1 change: 1 addition & 0 deletions Plugin64/map_nudge_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
Loading

0 comments on commit e791431

Please sign in to comment.