diff --git a/README.md b/README.md index 4678a31..c5fb169 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # gm8x_fix gm8x_fix is a patcher that fixes certain issues in games made with -GameMaker 8.x. You can download the latest release from the +GameMaker 7.0, 8.0, and 8.1. You can download the latest release from the [Releases](https://github.com/skyfloogle/gm8x_fix/releases/latest) tab. # How do I use it? @@ -25,6 +25,7 @@ For building, you can just build the C file with your favourite compiler, it doesn't have any dependencies. gm8x_fix currently supports games made in the following versions of GameMaker: +- 7.0 - 8.0 - 8.1.65 - 8.1.71 diff --git a/gm8x_fix.c b/gm8x_fix.c index 9b071ec..0648f20 100644 --- a/gm8x_fix.c +++ b/gm8x_fix.c @@ -23,6 +23,11 @@ Patch patches[] = { {.bytes = upx_80, .name = "UPX unpacked header adjustment", .type = UPX}, {.bytes = mempatch, .name = "Memory patch", .type = MEM}, + {.bytes = joypatch_70, .name = "GM7.0 joystick patch", .type = JOY}, + {.bytes = schedpatch_70, .name = "GM7.0 scheduler patch", .type = SCHED}, + {.bytes = inputlagpatch_70, .name = "GM7.0 input lag patch", .type = INPUTLAG}, + {.bytes = dplaypatch_70, .name = "GM7.0 DirectPlay patch", .type = DPLAY}, + {.bytes = joypatch_80, .name = "GM8.0 joystick patch", .type = JOY}, {.bytes = schedpatch_80, .name = "GM8.0 scheduler patch", .type = SCHED}, {.bytes = schedpatch_80upx, .name = "GM8.0 (UPX unpacked) scheduler patch", .type = SCHED}, @@ -374,7 +379,7 @@ int main(int argc, const char *argv[]) { // list patches if (!can_apply_any && !any_patch_applied) { - puts("This game cannot be patched. It may not be a GameMaker 8.0 or 8.1 game."); + puts("This game cannot be patched. It may not be a GameMaker 7.0, 8.0, or 8.1 game."); fclose(f); CLOSE_PATCHER; } diff --git a/patches.c b/patches.c index 1d6db8c..249e6d0 100644 --- a/patches.c +++ b/patches.c @@ -20,6 +20,159 @@ PatchByte upx_80[] = { // 1. Find all calls to joystick functions (joyGetPos, joyGetPosEx, joyGetDevCapsW) // 2. Replace with nops and "mov eax, 0xa5" to emulate joystick being unplugged +PatchByte joypatch_70[] = { + { 0x13c04b, 0x53, 0x90 }, + { 0x13c04c, 0x6a, 0x90 }, + { 0x13c04d, 0x00, 0x90 }, + { 0x13c04e, 0xe8, 0xb8 }, + { 0x13c04f, 0xa9, 0xa5 }, + { 0x13c050, 0x96, 0x00 }, + { 0x13c051, 0xf4, 0x00 }, + { 0x13c052, 0xff, 0x00 }, + { 0x164fa4, 0x50, 0x90 }, + { 0x164fa5, 0x53, 0x90 }, + { 0x164fa6, 0xe8, 0xb8 }, + { 0x164fa7, 0x49, 0xa5 }, + { 0x164fa8, 0x07, 0x00 }, + { 0x164fa9, 0xf2, 0x00 }, + { 0x164faa, 0xff, 0x00 }, + { 0x165004, 0x50, 0x90 }, + { 0x165005, 0x56, 0x90 }, + { 0x165006, 0xe8, 0xb8 }, + { 0x165007, 0xe9, 0xa5 }, + { 0x165008, 0x06, 0x00 }, + { 0x165009, 0xf2, 0x00 }, + { 0x16500a, 0xff, 0x00 }, + { 0x16509e, 0x68, 0x90 }, + { 0x16509f, 0x94, 0x90 }, + { 0x1650a0, 0x01, 0x90 }, + { 0x1650a1, 0x00, 0x90 }, + { 0x1650a2, 0x00, 0x90 }, + { 0x1650a3, 0x8d, 0x90 }, + { 0x1650a4, 0x85, 0x90 }, + { 0x1650a5, 0x6c, 0x90 }, + { 0x1650a6, 0xfe, 0x90 }, + { 0x1650a7, 0xff, 0x90 }, + { 0x1650a8, 0xff, 0x90 }, + { 0x1650a9, 0x50, 0x90 }, + { 0x1650aa, 0x56, 0x90 }, + { 0x1650ab, 0xe8, 0xb8 }, + { 0x1650ac, 0x3c, 0xa5 }, + { 0x1650ad, 0x06, 0x00 }, + { 0x1650ae, 0xf2, 0x00 }, + { 0x1650af, 0xff, 0x00 }, + { 0x165108, 0x68, 0x90 }, + { 0x165109, 0x94, 0x90 }, + { 0x16510a, 0x01, 0x90 }, + { 0x16510b, 0x00, 0x90 }, + { 0x16510c, 0x00, 0x90 }, + { 0x16510d, 0x8d, 0x90 }, + { 0x16510e, 0x85, 0x90 }, + { 0x16510f, 0x6c, 0x90 }, + { 0x165110, 0xfe, 0x90 }, + { 0x165111, 0xff, 0x90 }, + { 0x165112, 0xff, 0x90 }, + { 0x165113, 0x50, 0x90 }, + { 0x165114, 0x56, 0x90 }, + { 0x165115, 0xe8, 0xb8 }, + { 0x165116, 0xd2, 0xa5 }, + { 0x165117, 0x05, 0x00 }, + { 0x165118, 0xf2, 0x00 }, + { 0x165119, 0xff, 0x00 }, + { 0x16517c, 0x68, 0x90 }, + { 0x16517d, 0x94, 0x90 }, + { 0x16517e, 0x01, 0x90 }, + { 0x16517f, 0x00, 0x90 }, + { 0x165180, 0x00, 0x90 }, + { 0x165181, 0x8d, 0x90 }, + { 0x165182, 0x85, 0x90 }, + { 0x165183, 0x6c, 0x90 }, + { 0x165184, 0xfe, 0x90 }, + { 0x165185, 0xff, 0x90 }, + { 0x165186, 0xff, 0x90 }, + { 0x165187, 0x50, 0x90 }, + { 0x165188, 0x56, 0x90 }, + { 0x165189, 0xe8, 0xb8 }, + { 0x16518a, 0x5e, 0xa5 }, + { 0x16518b, 0x05, 0x00 }, + { 0x16518c, 0xf2, 0x00 }, + { 0x16518d, 0xff, 0x00 }, + { 0x1651f0, 0x68, 0x90 }, + { 0x1651f1, 0x94, 0x90 }, + { 0x1651f2, 0x01, 0x90 }, + { 0x1651f3, 0x00, 0x90 }, + { 0x1651f4, 0x00, 0x90 }, + { 0x1651f5, 0x8d, 0x90 }, + { 0x1651f6, 0x85, 0x90 }, + { 0x1651f7, 0x6c, 0x90 }, + { 0x1651f8, 0xfe, 0x90 }, + { 0x1651f9, 0xff, 0x90 }, + { 0x1651fa, 0xff, 0x90 }, + { 0x1651fb, 0x50, 0x90 }, + { 0x1651fc, 0x56, 0x90 }, + { 0x1651fd, 0xe8, 0xb8 }, + { 0x1651fe, 0xea, 0xa5 }, + { 0x1651ff, 0x04, 0x00 }, + { 0x165200, 0xf2, 0x00 }, + { 0x165201, 0xff, 0x00 }, + { 0x165277, 0x50, 0x90 }, + { 0x165278, 0x56, 0x90 }, + { 0x165279, 0xe8, 0xb8 }, + { 0x16527a, 0x7e, 0xa5 }, + { 0x16527b, 0x04, 0x00 }, + { 0x16527c, 0xf2, 0x00 }, + { 0x16527d, 0xff, 0x00 }, + { 0x1656de, 0x50, 0x90 }, + { 0x1656df, 0x56, 0x90 }, + { 0x1656e0, 0xe8, 0xb8 }, + { 0x1656e1, 0x17, 0xa5 }, + { 0x1656e3, 0xf2, 0x00 }, + { 0x1656e4, 0xff, 0x00 }, + { 0x16575e, 0x50, 0x90 }, + { 0x16575f, 0x56, 0x90 }, + { 0x165760, 0xe8, 0xb8 }, + { 0x165761, 0x97, 0xa5 }, + { 0x165762, 0xff, 0x00 }, + { 0x165763, 0xf1, 0x00 }, + { 0x165764, 0xff, 0x00 }, + { 0x1657de, 0x50, 0x90 }, + { 0x1657df, 0x56, 0x90 }, + { 0x1657e0, 0xe8, 0xb8 }, + { 0x1657e1, 0x17, 0xa5 }, + { 0x1657e2, 0xff, 0x00 }, + { 0x1657e3, 0xf1, 0x00 }, + { 0x1657e4, 0xff, 0x00 }, + { 0x16585e, 0x50, 0x90 }, + { 0x16585f, 0x56, 0x90 }, + { 0x165860, 0xe8, 0xb8 }, + { 0x165861, 0x97, 0xa5 }, + { 0x165862, 0xfe, 0x00 }, + { 0x165863, 0xf1, 0x00 }, + { 0x165864, 0xff, 0x00 }, + { 0x1658de, 0x50, 0x90 }, + { 0x1658df, 0x56, 0x90 }, + { 0x1658e0, 0xe8, 0xb8 }, + { 0x1658e1, 0x17, 0xa5 }, + { 0x1658e2, 0xfe, 0x00 }, + { 0x1658e3, 0xf1, 0x00 }, + { 0x1658e4, 0xff, 0x00 }, + { 0x16595e, 0x50, 0x90 }, + { 0x16595f, 0x56, 0x90 }, + { 0x165960, 0xe8, 0xb8 }, + { 0x165961, 0x97, 0xa5 }, + { 0x165962, 0xfd, 0x00 }, + { 0x165963, 0xf1, 0x00 }, + { 0x165964, 0xff, 0x00 }, + { 0x1659e2, 0x50, 0x90 }, + { 0x1659e3, 0x56, 0x90 }, + { 0x1659e4, 0xe8, 0xb8 }, + { 0x1659e5, 0x13, 0xa5 }, + { 0x1659e6, 0xfd, 0x00 }, + { 0x1659e7, 0xf1, 0x00 }, + { 0x1659e8, 0xff, 0x00 }, + {-1,0,0} +}; + PatchByte joypatch_80[] = { { 0x1399df, 0x53, 0xb8 }, { 0x1399e0, 0x6a, 0xa5 }, @@ -865,6 +1018,16 @@ PatchByte joypatch_81_141[] = { // 1. Find L"DPlayX.dll" // 2. Replace the 'D' with a null byte +PatchByte dplaypatch_70[] = { + { 0x147980, 'D', 0 }, + { 0x147981, 'P', 'P' }, + { 0x147982, 'l', 'l' }, + { 0x147983, 'a', 'a' }, + { 0x147984, 'y', 'y' }, + { 0x147985, 'X', 'X' }, + {-1,0,0} +}; + PatchByte dplaypatch_80[] = { { 0x187380, 'D', 0 }, { 0x187381, 'P', 'P' }, @@ -930,6 +1093,35 @@ PatchByte dplaypatch_81_141[] = { // 1. replace "joyGetDevCapsW" (or A, for 8.0) with "timeBeginPeriod" // 2. call the JMP wrapper for timeBeginPeriod instead of writing "Loading help" +PatchByte schedpatch_70[] = { + { 0x146755, 0xb8, 0x6a }, + { 0x146756, 0x2d, 0x01 }, + { 0x146757, 0x00, 0xe8 }, + { 0x146758, 0x00, 0x90 }, + { 0x146759, 0x00, 0xef }, + { 0x14675a, 0xe8, 0xf3 }, + { 0x14675b, 0x25, 0xff }, + { 0x14675c, 0xef, 0x90 }, + { 0x14675d, 0xff, 0x90 }, + { 0x14675e, 0xff, 0x90 }, + { 0x18bba2, 0x6a, 0x74 }, + { 0x18bba3, 0x6f, 0x69 }, + { 0x18bba4, 0x79, 0x6d }, + { 0x18bba5, 0x47, 0x65 }, + { 0x18bba6, 0x65, 0x42 }, + { 0x18bba7, 0x74, 0x65 }, + { 0x18bba8, 0x44, 0x67 }, + { 0x18bba9, 0x65, 0x69 }, + { 0x18bbaa, 0x76, 0x6e }, + { 0x18bbab, 0x43, 0x50 }, + { 0x18bbac, 0x61, 0x65 }, + { 0x18bbad, 0x70, 0x72 }, + { 0x18bbae, 0x73, 0x69 }, + { 0x18bbaf, 0x41, 0x6f }, + { 0x18bbb0, 0x00, 0x64 }, + {-1,0,0} +}; + PatchByte schedpatch_80[] = { {0x14461a, 0xb8, 0x6a}, {0x14461b, 0x2d, 0x01}, @@ -1139,6 +1331,338 @@ PatchByte schedpatch_81_141[] = { // 2. Swap timing with presenting // 3. Fix call instructions +PatchByte inputlagpatch_70[] = { + { 0x13fe89, 0xe8, 0xa1 }, + { 0x13fe8a, 0x36, 0xc4 }, + { 0x13fe8b, 0xbb, 0xa1 }, + { 0x13fe8c, 0xf5, 0x58 }, + { 0x13fe8d, 0xff, 0x00 }, + { 0x13fe8e, 0x89, 0x83 }, + { 0x13fe8f, 0x45, 0x38 }, + { 0x13fe90, 0xf0, 0xff }, + { 0x13fe91, 0x89, 0x75 }, + { 0x13fe92, 0x55, 0x14 }, + { 0x13fe93, 0xf4, 0xa1 }, + { 0x13fe94, 0x8b, 0x3c }, + { 0x13fe95, 0x45, 0x9c }, + { 0x13fe96, 0xf0, 0x58 }, + { 0x13fe97, 0x8b, 0x00 }, + { 0x13fe98, 0x55, 0x80 }, + { 0x13fe99, 0xf4, 0x38 }, + { 0x13fe9a, 0x3b, 0x00 }, + { 0x13fe9b, 0x55, 0x74 }, + { 0x13fe9c, 0xfc, 0x0a }, + { 0x13fe9d, 0x75, 0xe8 }, + { 0x13fe9e, 0x07, 0x32 }, + { 0x13fe9f, 0x3b, 0x38 }, + { 0x13fea0, 0x45, 0xf6 }, + { 0x13fea1, 0xf8, 0xff }, + { 0x13fea2, 0x73, 0xe8 }, + { 0x13fea3, 0x10, 0x0d }, + { 0x13fea4, 0xeb, 0x38 }, + { 0x13fea5, 0x02, 0xf6 }, + { 0x13fea6, 0x7d, 0xff }, + { 0x13fea7, 0x0c, 0xe8 }, + { 0x13fea8, 0x8b, 0x18 }, + { 0x13fea9, 0x45, 0xbb }, + { 0x13feaa, 0xf0, 0xf5 }, + { 0x13feab, 0x89, 0xff }, + { 0x13feac, 0x45, 0x89 }, + { 0x13fead, 0xf8, 0x45 }, + { 0x13feae, 0x8b, 0xf0 }, + { 0x13feaf, 0x45, 0x89 }, + { 0x13feb0, 0xf4, 0x55 }, + { 0x13feb1, 0x89, 0xf4 }, + { 0x13feb2, 0x45, 0x8b }, + { 0x13feb3, 0xfc, 0x45 }, + { 0x13feb4, 0xa1, 0xf0 }, + { 0x13feb5, 0x70, 0x8b }, + { 0x13feb6, 0x9d, 0x55 }, + { 0x13feb7, 0x58, 0xf4 }, + { 0x13feb8, 0x00, 0x3b }, + { 0x13feb9, 0x8b, 0x55 }, + { 0x13feba, 0x00, 0xfc }, + { 0x13febb, 0x83, 0x75 }, + { 0x13febc, 0x78, 0x07 }, + { 0x13febd, 0x08, 0x3b }, + { 0x13febe, 0x00, 0x45 }, + { 0x13febf, 0x7f, 0xf8 }, + { 0x13fec0, 0x0e, 0x73 }, + { 0x13fec1, 0xa1, 0x10 }, + { 0x13fec2, 0x70, 0xeb }, + { 0x13fec3, 0x9d, 0x02 }, + { 0x13fec4, 0x58, 0x7d }, + { 0x13fec5, 0x00, 0x0c }, + { 0x13fec7, 0x00, 0x45 }, + { 0x13fec8, 0xc7, 0xf0 }, + { 0x13fec9, 0x40, 0x89 }, + { 0x13feca, 0x08, 0x45 }, + { 0x13fecb, 0x01, 0xf8 }, + { 0x13fecc, 0x00, 0x8b }, + { 0x13fecd, 0x00, 0x45 }, + { 0x13fece, 0x00, 0xf4 }, + { 0x13fecf, 0x6a, 0x89 }, + { 0x13fed0, 0x00, 0x45 }, + { 0x13fed1, 0x6a, 0xfc }, + { 0x13fed2, 0x00, 0xa1 }, + { 0x13fed3, 0xa1, 0x70 }, + { 0x13fed4, 0x70, 0x9d }, + { 0x13fed5, 0x9d, 0x58 }, + { 0x13fed6, 0x58, 0x00 }, + { 0x13fed7, 0x00, 0x8b }, + { 0x13fed8, 0x8b, 0x00 }, + { 0x13fed9, 0x00, 0x83 }, + { 0x13feda, 0xff, 0x78 }, + { 0x13fedb, 0x70, 0x08 }, + { 0x13fedc, 0x08, 0x00 }, + { 0x13fedd, 0xb8, 0x7f }, + { 0x13fede, 0x40, 0x0e }, + { 0x13fedf, 0x42, 0xa1 }, + { 0x13fee0, 0x0f, 0x70 }, + { 0x13fee1, 0x00, 0x9d }, + { 0x13fee2, 0x5a, 0x58 }, + { 0x13fee3, 0x8b, 0x00 }, + { 0x13fee4, 0xca, 0x8b }, + { 0x13fee5, 0x99, 0x00 }, + { 0x13fee6, 0xf7, 0xc7 }, + { 0x13fee7, 0xf9, 0x40 }, + { 0x13fee8, 0x99, 0x08 }, + { 0x13fee9, 0x52, 0x01 }, + { 0x13feea, 0x50, 0x00 }, + { 0x13feeb, 0x8b, 0x00 }, + { 0x13feec, 0x45, 0x00 }, + { 0x13feed, 0xf0, 0x6a }, + { 0x13feee, 0x8b, 0x00 }, + { 0x13feef, 0x55, 0x6a }, + { 0x13fef0, 0xf4, 0x00 }, + { 0x13fef1, 0x2b, 0xa1 }, + { 0x13fef2, 0x45, 0x70 }, + { 0x13fef3, 0xf8, 0x9d }, + { 0x13fef4, 0x1b, 0x58 }, + { 0x13fef5, 0x55, 0x00 }, + { 0x13fef6, 0xfc, 0x8b }, + { 0x13fef7, 0x29, 0x00 }, + { 0x13fef8, 0x04, 0xff }, + { 0x13fef9, 0x24, 0x70 }, + { 0x13fefa, 0x19, 0x08 }, + { 0x13fefb, 0x54, 0xb8 }, + { 0x13fefc, 0x24, 0x40 }, + { 0x13fefd, 0x04, 0x42 }, + { 0x13fefe, 0x58, 0x0f }, + { 0x13feff, 0x5a, 0x00 }, + { 0x13ff00, 0x52, 0x5a }, + { 0x13ff01, 0x50, 0x8b }, + { 0x13ff02, 0xe8, 0xca }, + { 0x13ff03, 0x05, 0x99 }, + { 0x13ff04, 0xbc, 0xf7 }, + { 0x13ff05, 0xee, 0xf9 }, + { 0x13ff06, 0xff, 0x99 }, + { 0x13ff07, 0x89, 0x52 }, + { 0x13ff08, 0x45, 0x50 }, + { 0x13ff09, 0xe8, 0x8b }, + { 0x13ff0a, 0x89, 0x45 }, + { 0x13ff0b, 0x55, 0xf0 }, + { 0x13ff0c, 0xec, 0x8b }, + { 0x13ff0d, 0xff, 0x55 }, + { 0x13ff0e, 0x75, 0xf4 }, + { 0x13ff0f, 0xec, 0x2b }, + { 0x13ff10, 0xff, 0x45 }, + { 0x13ff11, 0x75, 0xf8 }, + { 0x13ff12, 0xe8, 0x1b }, + { 0x13ff13, 0x6a, 0x55 }, + { 0x13ff14, 0x00, 0xfc }, + { 0x13ff15, 0x68, 0x29 }, + { 0x13ff16, 0x40, 0x04 }, + { 0x13ff17, 0x42, 0x24 }, + { 0x13ff18, 0x0f, 0x19 }, + { 0x13ff19, 0x00, 0x54 }, + { 0x13ff1a, 0xe8, 0x24 }, + { 0x13ff1b, 0xed, 0x04 }, + { 0x13ff1c, 0xba, 0x58 }, + { 0x13ff1d, 0xee, 0x5a }, + { 0x13ff1e, 0xff, 0x52 }, + { 0x13ff1f, 0x89, 0x50 }, + { 0x13ff20, 0x45, 0xe8 }, + { 0x13ff21, 0xe8, 0xe7 }, + { 0x13ff22, 0x89, 0xbb }, + { 0x13ff23, 0x55, 0xee }, + { 0x13ff24, 0xec, 0xff }, + { 0x13ff25, 0xff, 0x89 }, + { 0x13ff26, 0x75, 0x45 }, + { 0x13ff27, 0xec, 0xe8 }, + { 0x13ff28, 0xff, 0x89 }, + { 0x13ff29, 0x75, 0x55 }, + { 0x13ff2a, 0xe8, 0xec }, + { 0x13ff2b, 0xe8, 0xff }, + { 0x13ff2c, 0x20, 0x75 }, + { 0x13ff2d, 0xbb, 0xec }, + { 0x13ff2e, 0xf5, 0xff }, + { 0x13ff2f, 0xff, 0x75 }, + { 0x13ff30, 0x8b, 0xe8 }, + { 0x13ff31, 0x45, 0x6a }, + { 0x13ff32, 0xf0, 0x00 }, + { 0x13ff33, 0x8b, 0x68 }, + { 0x13ff34, 0x55, 0x40 }, + { 0x13ff35, 0xf4, 0x42 }, + { 0x13ff36, 0x03, 0x0f }, + { 0x13ff37, 0x45, 0x00 }, + { 0x13ff39, 0x13, 0xcf }, + { 0x13ff3a, 0x55, 0xba }, + { 0x13ff3b, 0xec, 0xee }, + { 0x13ff3c, 0x89, 0xff }, + { 0x13ff3d, 0x45, 0x89 }, + { 0x13ff3e, 0xf8, 0x45 }, + { 0x13ff3f, 0x89, 0xe8 }, + { 0x13ff40, 0x55, 0x89 }, + { 0x13ff41, 0xfc, 0x55 }, + { 0x13ff42, 0x8b, 0xec }, + { 0x13ff43, 0x45, 0xff }, + { 0x13ff44, 0xf8, 0x75 }, + { 0x13ff45, 0x8b, 0xec }, + { 0x13ff46, 0x55, 0xff }, + { 0x13ff47, 0xfc, 0x75 }, + { 0x13ff48, 0x3b, 0xe8 }, + { 0x13ff49, 0x55, 0xe8 }, + { 0x13ff4a, 0xe4, 0x02 }, + { 0x13ff4b, 0x75, 0xbb }, + { 0x13ff4c, 0x07, 0xf5 }, + { 0x13ff4d, 0x3b, 0xff }, + { 0x13ff4e, 0x45, 0x8b }, + { 0x13ff4f, 0xe0, 0x45 }, + { 0x13ff50, 0x73, 0xf0 }, + { 0x13ff51, 0x10, 0x8b }, + { 0x13ff52, 0xeb, 0x55 }, + { 0x13ff53, 0x02, 0xf4 }, + { 0x13ff54, 0x7d, 0x03 }, + { 0x13ff55, 0x0c, 0x45 }, + { 0x13ff56, 0x8b, 0xe8 }, + { 0x13ff57, 0x45, 0x13 }, + { 0x13ff58, 0xf8, 0x55 }, + { 0x13ff59, 0x89, 0xec }, + { 0x13ff5a, 0x45, 0x89 }, + { 0x13ff5b, 0xe0, 0x45 }, + { 0x13ff5c, 0x8b, 0xf8 }, + { 0x13ff5d, 0x45, 0x89 }, + { 0x13ff5e, 0xfc, 0x55 }, + { 0x13ff5f, 0x89, 0xfc }, + { 0x13ff60, 0x45, 0x8b }, + { 0x13ff61, 0xe4, 0x45 }, + { 0x13ff62, 0x6a, 0xf8 }, + { 0x13ff63, 0x00, 0x8b }, + { 0x13ff64, 0x68, 0x55 }, + { 0x13ff65, 0x40, 0xfc }, + { 0x13ff66, 0x42, 0x3b }, + { 0x13ff67, 0x0f, 0x55 }, + { 0x13ff68, 0x00, 0xe4 }, + { 0x13ff69, 0x8b, 0x75 }, + { 0x13ff6a, 0x45, 0x07 }, + { 0x13ff6b, 0xf8, 0x3b }, + { 0x13ff6c, 0x8b, 0x45 }, + { 0x13ff6d, 0x55, 0xe0 }, + { 0x13ff6e, 0xfc, 0x73 }, + { 0x13ff6f, 0xe8, 0x10 }, + { 0x13ff70, 0x3c, 0xeb }, + { 0x13ff71, 0x54, 0x02 }, + { 0x13ff72, 0xec, 0x7d }, + { 0x13ff73, 0xff, 0x0c }, + { 0x13ff74, 0x52, 0x8b }, + { 0x13ff75, 0x50, 0x45 }, + { 0x13ff76, 0x6a, 0xf8 }, + { 0x13ff77, 0x00, 0x89 }, + { 0x13ff78, 0x68, 0x45 }, + { 0x13ff79, 0x40, 0xe0 }, + { 0x13ff7a, 0x42, 0x8b }, + { 0x13ff7b, 0x0f, 0x45 }, + { 0x13ff7c, 0x00, 0xfc }, + { 0x13ff7d, 0x8b, 0x89 }, + { 0x13ff7f, 0xe0, 0xe4 }, + { 0x13ff80, 0x8b, 0x6a }, + { 0x13ff81, 0x55, 0x00 }, + { 0x13ff82, 0xe4, 0x68 }, + { 0x13ff83, 0xe8, 0x40 }, + { 0x13ff84, 0x28, 0x42 }, + { 0x13ff85, 0x54, 0x0f }, + { 0x13ff86, 0xec, 0x00 }, + { 0x13ff87, 0xff, 0x8b }, + { 0x13ff88, 0x3b, 0x45 }, + { 0x13ff89, 0x54, 0xf8 }, + { 0x13ff8a, 0x24, 0x8b }, + { 0x13ff8b, 0x04, 0x55 }, + { 0x13ff8c, 0x75, 0xfc }, + { 0x13ff8d, 0x09, 0xe8 }, + { 0x13ff8e, 0x3b, 0x1e }, + { 0x13ff8f, 0x04, 0x54 }, + { 0x13ff90, 0x24, 0xec }, + { 0x13ff91, 0x5a, 0xff }, + { 0x13ff92, 0x58, 0x52 }, + { 0x13ff93, 0x73, 0x50 }, + { 0x13ff94, 0x21, 0x6a }, + { 0x13ff95, 0xeb, 0x00 }, + { 0x13ff96, 0x04, 0x68 }, + { 0x13ff97, 0x5a, 0x40 }, + { 0x13ff98, 0x58, 0x42 }, + { 0x13ff99, 0x7d, 0x0f }, + { 0x13ff9a, 0x1b, 0x00 }, + { 0x13ff9b, 0xa1, 0x8b }, + { 0x13ff9c, 0xb4, 0x45 }, + { 0x13ff9d, 0x99, 0xe0 }, + { 0x13ff9e, 0x58, 0x8b }, + { 0x13ff9f, 0x00, 0x55 }, + { 0x13ffa0, 0x8b, 0xe4 }, + { 0x13ffa1, 0x55, 0xe8 }, + { 0x13ffa2, 0xdc, 0x0a }, + { 0x13ffa3, 0x89, 0x54 }, + { 0x13ffa4, 0x10, 0xec }, + { 0x13ffa5, 0x33, 0xff }, + { 0x13ffa6, 0xc0, 0x3b }, + { 0x13ffa7, 0x89, 0x54 }, + { 0x13ffa8, 0x45, 0x24 }, + { 0x13ffa9, 0xdc, 0x04 }, + { 0x13ffaa, 0x8b, 0x75 }, + { 0x13ffab, 0x45, 0x09 }, + { 0x13ffac, 0xf8, 0x3b }, + { 0x13ffad, 0x89, 0x04 }, + { 0x13ffae, 0x45, 0x24 }, + { 0x13ffaf, 0xe0, 0x5a }, + { 0x13ffb0, 0x8b, 0x58 }, + { 0x13ffb1, 0x45, 0x73 }, + { 0x13ffb2, 0xfc, 0x21 }, + { 0x13ffb3, 0x89, 0xeb }, + { 0x13ffb4, 0x45, 0x04 }, + { 0x13ffb5, 0xe4, 0x5a }, + { 0x13ffb6, 0xff, 0x58 }, + { 0x13ffb7, 0x45, 0x7d }, + { 0x13ffb8, 0xdc, 0x1b }, + { 0x13ffba, 0xc4, 0xb4 }, + { 0x13ffbb, 0xa1, 0x99 }, + { 0x13ffbe, 0x83, 0x8b }, + { 0x13ffbf, 0x38, 0x55 }, + { 0x13ffc0, 0xff, 0xdc }, + { 0x13ffc1, 0x75, 0x89 }, + { 0x13ffc2, 0x14, 0x10 }, + { 0x13ffc3, 0xa1, 0x33 }, + { 0x13ffc4, 0x3c, 0xc0 }, + { 0x13ffc5, 0x9c, 0x89 }, + { 0x13ffc6, 0x58, 0x45 }, + { 0x13ffc7, 0x00, 0xdc }, + { 0x13ffc8, 0x80, 0x8b }, + { 0x13ffc9, 0x38, 0x45 }, + { 0x13ffca, 0x00, 0xf8 }, + { 0x13ffcb, 0x74, 0x89 }, + { 0x13ffcc, 0x0a, 0x45 }, + { 0x13ffcd, 0xe8, 0xe0 }, + { 0x13ffce, 0x02, 0x8b }, + { 0x13ffcf, 0x37, 0x45 }, + { 0x13ffd0, 0xf6, 0xfc }, + { 0x13ffd1, 0xff, 0x89 }, + { 0x13ffd2, 0xe8, 0x45 }, + { 0x13ffd3, 0xdd, 0xe4 }, + { 0x13ffd4, 0x36, 0xff }, + { 0x13ffd5, 0xf6, 0x45 }, + { 0x13ffd6, 0xff, 0xdc }, + {-1,0,0} +}; + PatchByte inputlagpatch_80[] = { { 0x13dcbd, 0xe8, 0xff }, { 0x13dcbe, 0xfe, 0x45 },