From a4fcb64461b1e4e2bad9f4daffe0655888ab81e7 Mon Sep 17 00:00:00 2001 From: qaate47 Date: Wed, 29 May 2024 23:31:31 +0200 Subject: [PATCH] jup B and start vm37 --- src/acts/tools/gsc.cpp | 19 +- src/acts/tools/gsc_opcodes.cpp | 37 ++- src/acts/tools/gsc_opcodes_load.cpp | 197 +++++++++++++++- src/acts/tools/gsc_opcodes_load.hpp | 4 +- src/acts/tools/gsc_vm.hpp | 352 +++++++++++++++++++++++++++- 5 files changed, 594 insertions(+), 15 deletions(-) diff --git a/src/acts/tools/gsc.cpp b/src/acts/tools/gsc.cpp index b3ca132..dc4c1a8 100644 --- a/src/acts/tools/gsc.cpp +++ b/src/acts/tools/gsc.cpp @@ -583,6 +583,7 @@ namespace { { VM_T937,[](byte* file, size_t fileSize) { return std::make_shared(file, fileSize); }}, { VM_T9,[](byte* file, size_t fileSize) { return std::make_shared(file, fileSize); }}, { VM_MW23,[](byte* file, size_t fileSize) { return std::make_shared(file, fileSize); }}, + { VM_MW23B,[](byte* file, size_t fileSize) { return std::make_shared(file, fileSize); }}, { VM_T7,[](byte* file, size_t fileSize) { return std::make_shared(file, fileSize); }}, { VM_T71B,[](byte* file, size_t fileSize) { return std::make_shared(file, fileSize); }}, }; @@ -730,18 +731,14 @@ int GscInfoHandleData(byte* data, size_t size, const char* path, const GscInfoOp byte vm; bool iw; - auto magicVal = *reinterpret_cast(data) & ~0xFF00000000000000; - if (magicVal == 0xa0d4353478a) { - // IW GSC file, use user input - if (opt.m_vm == VM_UNKNOWN) { - LOG_ERROR("VM type needed with IW GSC file, please use --vm [vm] to set it"); - return tool::BASIC_ERROR; - } - vm = opt.m_vm; + uint64_t magicVal = *reinterpret_cast(data); + if ((magicVal & ~0x000000000000000F) == 0xA0D43534780) { + // IW GSC file, use 0 revision + vm = data[0]; iw = true; - } - else if (magicVal == 0xa0d43534780) { - // Treyarch GSC file, use revision + } + else if ((magicVal & ~0xFF0000000000000F) == 0xa0d43534780) { + // Treyarch GSC file, use 7 revision vm = data[7]; iw = false; } diff --git a/src/acts/tools/gsc_opcodes.cpp b/src/acts/tools/gsc_opcodes.cpp index cac2a6f..c249254 100644 --- a/src/acts/tools/gsc_opcodes.cpp +++ b/src/acts/tools/gsc_opcodes.cpp @@ -32,9 +32,12 @@ namespace tool::gsc::opcode { if (!_strcmpi("t7_1b", name) || !_strcmpi("bo4_1b", name) || !_strcmpi("blackops3_1b", name) || !_strcmpi("1b", name)) { return VM_T71B; } - if (!_strcmpi("jup", name) || !_strcmpi("s4", name) || !_strcmpi("mwiii", name) || !_strcmpi("modernwarfareiii", name) || !_strcmpi("mw23", name)) { + if (!_strcmpi("jup", name) || !_strcmpi("s5", name) || !_strcmpi("mwiii", name) || !_strcmpi("modernwarfareiii", name) || !_strcmpi("mw23", name)) { return VM_MW23; } + if (!_strcmpi("jupb", name) || !_strcmpi("s5b", name) || !_strcmpi("mwiiib", name) || !_strcmpi("modernwarfareiiib", name) || !_strcmpi("mw23b", name)) { + return VM_MW23B; + } return VM_UNKNOWN; } @@ -665,6 +668,37 @@ class OPCodeInfoRegisterVariable : public OPCodeInfo { } }; +class OPCodeInfoRegisterMultipleVariables : public OPCodeInfo { +public: + OPCodeInfoRegisterMultipleVariables() : OPCodeInfo(OPCode::OPCODE_IW_RegisterMultipleVariables, "RegisterMultipleVariables") {} + + int Dump(std::ostream& out, uint16_t value, ASMContext& context, tool::gsc::T8GSCOBJContext& objctx) const override { + byte count = *(context.m_bcl++); + + out << "count: " << std::dec << (int)count << "\n"; + + for (size_t i = 0; i < count; i++) { + uint64_t name = *reinterpret_cast(context.m_bcl); + context.m_bcl += 8; + + if (!context.m_localvars.size()) { + // the local variables starts at 1 + context.m_localvars.insert(context.m_localvars.begin(), { hashutils::Hash32(""), 0 }); + } + + context.m_localvars.insert(context.m_localvars.begin(), { name, 0 }); + context.WritePadding(out) << hashutils::ExtractTmp("var", name) << " (-" << std::dec << context.m_localvars.size() << ")" << std::endl; + } + // don't create statement, we can ignore it + context.m_lastOpCodeBase = -1; + return 0; + } + + int Skip(uint16_t value, ASMSkipContext& ctx) const override { + ctx.m_bcl += 8; // skip hash + return 0; + } +}; class OPCodeInfoSafeCreateLocalVariables : public OPCodeInfo { public: @@ -4906,6 +4940,7 @@ void tool::gsc::opcode::RegisterOpCodes() { // IW RegisterOpCodeHandler(new OPCodeInfoRegisterVariable()); + RegisterOpCodeHandler(new OPCodeInfoRegisterMultipleVariables()); RegisterOpCodeHandler(new OPCodeInfoEvalLocalVariableCached(OPCODE_IW_EvalLocalVariableCached0, "EvalLocalVariableCached0", 1, 0)); RegisterOpCodeHandler(new OPCodeInfoEvalLocalVariableCached(OPCODE_IW_EvalLocalVariableCached1, "EvalLocalVariableCached1", 1, 1)); RegisterOpCodeHandler(new OPCodeInfoEvalLocalVariableCached(OPCODE_IW_EvalLocalVariableCached2, "EvalLocalVariableCached2", 1, 2)); diff --git a/src/acts/tools/gsc_opcodes_load.cpp b/src/acts/tools/gsc_opcodes_load.cpp index a7b1cd9..8b0349b 100644 --- a/src/acts/tools/gsc_opcodes_load.cpp +++ b/src/acts/tools/gsc_opcodes_load.cpp @@ -398,6 +398,181 @@ namespace tool::gsc::opcode { RegisterOpCode(VM_T937, PLATFORM_PLAYSTATION, OPCODE_ScriptFunctionCall, 0x12, 0x25, 0xaa, 0xdd, 0x135, 0x143, 0x1f2, 0x26a, 0x320, 0x37d, 0x4a6, 0x4b8, 0x54c, 0x663, 0x673, 0x679, 0x6c6, 0x813, 0x90d, 0x979, 0x9a3, 0xa6e, 0xacb, 0xb8a, 0xc45, 0xc65, 0xc93, 0xe38, 0xe9b); RegisterOpCode(VM_T937, PLATFORM_PLAYSTATION, OPCODE_SafeCreateLocalVariables, 0x11a, 0x192, 0x1e5, 0x281, 0x289, 0x2bd, 0x30b, 0x363, 0x471, 0x494, 0x4a8, 0x538, 0x5e3, 0x653, 0x8e4, 0x921, 0x9bf, 0x9fa, 0xb54, 0xc6d, 0xd28, 0xe8a, 0xf07); + RegisterVMPlatform(VM_T937, PLATFORM_PC); + + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknown0, 0x0); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknown1, 0x1); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknown2, 0x2); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknown3, 0x3); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknown4, 0x4); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknown5, 0x5); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknown6, 0x6); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknown7, 0x7); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_EvalLocalVariableCachedDebug, 0x8); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_EvalLocalVariableRefCachedDebug, 0x9); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknowna, 0xa); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Unknownb, 0xb); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_ClearParams, 0xc); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_CheckClearParams, 0xd); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_PreScriptCall, 0xe); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_CallBuiltinFunction, 0xf); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_CallBuiltinMethod, 0x10); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_End, 0x11); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x1a, 0x1f, 0x23, 0x28, 0x2d, 0x31, 0x39, 0x3a, 0x3b, 0x3e, 0x3f, 0x42, 0x46, 0x48, 0x4b, 0x53, 0x57, 0x5a, 0x5b, 0x60, 0x61, 0x62, 0x68, 0x69, 0x6c, 0x6e, 0x6f, 0x70, 0x71, 0x73, 0x76, 0x77, 0x78, 0x80, 0x83, 0x85, 0x86, 0x89, 0x8b, 0x8f, 0x91, 0xa2, 0xa7, 0xa8, 0xab, 0xad, 0xb0, 0xb4, 0xb8, 0xbb, 0xbc, 0xc1, 0xc5, 0xce, 0xd3, 0xd6, 0xd7, 0xd9, 0xdd, 0xe1, 0xe2, 0xe8, 0xf1, 0xf3, 0xf5, 0xf7, 0xfa, 0xfc, 0xfe, 0xff, 0x103, 0x108, 0x10a, 0x10c, 0x10d, 0x10f, 0x111, 0x112, 0x119, 0x11c, 0x11d, 0x123, 0x126, 0x128, 0x130, 0x133, 0x134, 0x139, 0x141, 0x142, 0x143, 0x145, 0x146); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x148, 0x149, 0x14f, 0x154, 0x156, 0x159, 0x15c, 0x160, 0x167, 0x169, 0x16a, 0x16b, 0x16f, 0x171, 0x173, 0x174, 0x17a, 0x17f, 0x182, 0x184, 0x188, 0x18a, 0x18b, 0x18e, 0x18f, 0x190, 0x191, 0x193, 0x196, 0x197, 0x198, 0x19a, 0x19b, 0x19e, 0x1a6, 0x1a7, 0x1a8, 0x1b0, 0x1b1, 0x1b3, 0x1b4, 0x1b8, 0x1b9, 0x1ba, 0x1bd, 0x1be, 0x1c4, 0x1c6, 0x1c7, 0x1c9, 0x1ca, 0x1cd, 0x1cf, 0x1d2, 0x1d3, 0x1d5, 0x1d7, 0x1d9, 0x1e3, 0x1e4, 0x1e6, 0x1eb, 0x1ec, 0x1ed, 0x1f8, 0x1fa, 0x1fb, 0x1fc, 0x206, 0x209, 0x20e, 0x20f, 0x213, 0x216, 0x218, 0x21b, 0x221, 0x224, 0x22c, 0x22e, 0x230, 0x231, 0x232); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x234, 0x238, 0x23b, 0x241, 0x24a, 0x24c, 0x250, 0x252, 0x254, 0x259, 0x25d, 0x25f, 0x260, 0x262, 0x264, 0x266, 0x26e, 0x271, 0x272, 0x27d, 0x27e, 0x280, 0x282, 0x285, 0x286, 0x287, 0x288, 0x289, 0x299, 0x29b, 0x29d, 0x29f, 0x2a3, 0x2a4, 0x2a7, 0x2a9, 0x2aa, 0x2ae, 0x2b2, 0x2b5, 0x2b6, 0x2ba, 0x2bd, 0x2c4, 0x2c5, 0x2c6, 0x2cd, 0x2d3, 0x2d5, 0x2d6, 0x2d8, 0x2db, 0x2e0, 0x2e4, 0x2e5, 0x2e8, 0x2ef, 0x2f0, 0x2f2, 0x2f5, 0x2fd, 0x302, 0x305, 0x30a, 0x317, 0x31b, 0x31f, 0x321, 0x322, 0x323, 0x326, 0x327, 0x328, 0x329, 0x32d, 0x32f, 0x332, 0x335, 0x33c, 0x33e, 0x341, 0x342, 0x349); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x34a, 0x34e, 0x34f, 0x351, 0x353, 0x35a, 0x35c, 0x35d, 0x360, 0x367, 0x36b, 0x373, 0x374, 0x379, 0x37b, 0x38d, 0x38e, 0x390, 0x393, 0x398, 0x399, 0x39f, 0x3a3, 0x3a6, 0x3a7, 0x3ad, 0x3b4, 0x3b7, 0x3bb, 0x3bc, 0x3c0, 0x3c1, 0x3c6, 0x3ca, 0x3cb, 0x3cf, 0x3d0, 0x3d1, 0x3d5, 0x3dc, 0x3dd, 0x3e1, 0x3e4, 0x3e8, 0x3e9, 0x3eb, 0x3f0, 0x3f2, 0x3f9, 0x3fb, 0x400, 0x401, 0x402, 0x403, 0x407, 0x409, 0x40a, 0x40b, 0x40d, 0x411, 0x416, 0x418, 0x41a, 0x41b, 0x41e, 0x420, 0x421, 0x422, 0x425, 0x426, 0x42a, 0x42c, 0x42d, 0x42e, 0x431, 0x432, 0x436, 0x43b, 0x446, 0x44b, 0x44e, 0x453, 0x457); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x45a, 0x45d, 0x45f, 0x462, 0x463, 0x464, 0x465, 0x46b, 0x46d, 0x46f, 0x471, 0x472, 0x473, 0x474, 0x479, 0x47a, 0x47d, 0x47f, 0x480, 0x486, 0x487, 0x488, 0x489, 0x48d, 0x491, 0x493, 0x495, 0x499, 0x49a, 0x49c, 0x49e, 0x4a0, 0x4a4, 0x4a7, 0x4ac, 0x4ad, 0x4ae, 0x4c1, 0x4c7, 0x4c8, 0x4ce, 0x4d3, 0x4d6, 0x4d8, 0x4d9, 0x4db, 0x4de, 0x4df, 0x4e0, 0x4e1, 0x4e4, 0x4e9, 0x4eb, 0x4f0, 0x4f6, 0x4f7, 0x4fa, 0x4fe, 0x50b, 0x50c, 0x50d, 0x50e, 0x50f, 0x518, 0x51d, 0x51f, 0x520, 0x522, 0x529, 0x530, 0x531, 0x532, 0x535, 0x537, 0x538, 0x53c, 0x541, 0x543, 0x545, 0x549, 0x54e, 0x556, 0x55a); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x561, 0x562, 0x567, 0x56b, 0x575, 0x576, 0x578, 0x57a, 0x58a, 0x58d, 0x58e, 0x58f, 0x595, 0x596, 0x59b, 0x5a1, 0x5a5, 0x5ac, 0x5b3, 0x5b4, 0x5b9, 0x5bb, 0x5bd, 0x5bf, 0x5c0, 0x5c1, 0x5c2, 0x5c3, 0x5c5, 0x5c6, 0x5c7, 0x5cb, 0x5ce, 0x5cf, 0x5d1, 0x5d8, 0x5da, 0x5e1, 0x5e2, 0x5e4, 0x5e9, 0x5ea, 0x5ed, 0x5ee, 0x5ef, 0x5f0, 0x5f3, 0x5f4, 0x5f7, 0x5f8, 0x5fc, 0x5fd, 0x600, 0x604, 0x605, 0x608, 0x60a, 0x60d, 0x60e, 0x610, 0x613, 0x618, 0x619, 0x61a, 0x61c, 0x620, 0x621, 0x627, 0x62b, 0x62c, 0x631, 0x632, 0x636, 0x63b, 0x63c, 0x63f, 0x642, 0x646, 0x647, 0x64a, 0x64d, 0x651, 0x652); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x658, 0x659, 0x65c, 0x65d, 0x660, 0x663, 0x666, 0x669, 0x66e, 0x66f, 0x673, 0x677, 0x678, 0x679, 0x67b, 0x67f, 0x681, 0x682, 0x685, 0x689, 0x68a, 0x68e, 0x691, 0x698, 0x69b, 0x6a1, 0x6a3, 0x6a4, 0x6a6, 0x6a8, 0x6a9, 0x6aa, 0x6ab, 0x6b0, 0x6b5, 0x6be, 0x6c1, 0x6c3, 0x6c9, 0x6cb, 0x6cc, 0x6cf, 0x6d0, 0x6d1, 0x6d4, 0x6d5, 0x6d6, 0x6e2, 0x6e4, 0x6e6, 0x6e7, 0x6e8, 0x6eb, 0x6f2, 0x6f4, 0x6f7, 0x6f9, 0x6fb, 0x6fe, 0x6ff, 0x704, 0x707, 0x708, 0x70a, 0x70d, 0x710, 0x714, 0x719, 0x71c, 0x722, 0x723, 0x72c, 0x72e, 0x732, 0x735, 0x736, 0x737, 0x739, 0x73c, 0x73f, 0x740, 0x744, 0x749); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x74a, 0x74d, 0x74f, 0x751, 0x752, 0x753, 0x757, 0x758, 0x75a, 0x75d, 0x75e, 0x75f, 0x761, 0x763, 0x768, 0x76c, 0x76f, 0x770, 0x771, 0x772, 0x773, 0x777, 0x78e, 0x78f, 0x791, 0x792, 0x798, 0x799, 0x79c, 0x79d, 0x79f, 0x7a0, 0x7a5, 0x7a6, 0x7a7, 0x7a8, 0x7ae, 0x7b1, 0x7b2, 0x7b3, 0x7b4, 0x7b6, 0x7b7, 0x7ba, 0x7bd, 0x7c0, 0x7c3, 0x7c5, 0x7c7, 0x7c8, 0x7cb, 0x7cd, 0x7cf, 0x7d0, 0x7d1, 0x7d2, 0x7d4, 0x7d7, 0x7da, 0x7db, 0x7dd, 0x7e0, 0x7e1, 0x7e3, 0x7ef, 0x7f2, 0x7f8, 0x7f9, 0x7ff, 0x806, 0x807, 0x809, 0x80b, 0x811, 0x813, 0x814, 0x816, 0x818, 0x81a, 0x821, 0x822, 0x82b, 0x833); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x839, 0x83a, 0x83d, 0x83f, 0x842, 0x843, 0x846, 0x847, 0x84c, 0x84f, 0x853, 0x855, 0x85a, 0x85c, 0x860, 0x861, 0x863, 0x864, 0x865, 0x866, 0x867, 0x868, 0x86e, 0x871, 0x876, 0x877, 0x880, 0x882, 0x883, 0x886, 0x887, 0x88b, 0x88c, 0x88d, 0x88e, 0x88f, 0x890, 0x892, 0x894, 0x899, 0x89f, 0x8a7, 0x8a8, 0x8a9, 0x8ab, 0x8ad, 0x8ae, 0x8b1, 0x8b4, 0x8b7, 0x8b8, 0x8b9, 0x8bc, 0x8c0, 0x8c1, 0x8c4, 0x8c7, 0x8cd, 0x8d0, 0x8d2, 0x8d3, 0x8dc, 0x8de, 0x8e1, 0x8e2, 0x8e3, 0x8e6, 0x8e7, 0x8eb, 0x8ed, 0x8ee, 0x8f8, 0x8f9, 0x8fc, 0x8fd, 0x8fe, 0x900, 0x909, 0x911, 0x912, 0x914, 0x917, 0x918); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0x91a, 0x91c, 0x91f, 0x923, 0x926, 0x929, 0x92a, 0x92b, 0x92c, 0x936, 0x938, 0x93d, 0x93f, 0x942, 0x944, 0x947, 0x94b, 0x94d, 0x950, 0x954, 0x955, 0x95b, 0x95d, 0x962, 0x965, 0x968, 0x969, 0x96a, 0x96b, 0x96e, 0x972, 0x976, 0x978, 0x97b, 0x981, 0x982, 0x983, 0x989, 0x98a, 0x98d, 0x98e, 0x991, 0x994, 0x996, 0x998, 0x999, 0x99f, 0x9a2, 0x9a3, 0x9a4, 0x9aa, 0x9ac, 0x9b0, 0x9b6, 0x9b8, 0x9b9, 0x9bb, 0x9bd, 0x9c0, 0x9c2, 0x9c3, 0x9c9, 0x9ca, 0x9ce, 0x9d7, 0x9d8, 0x9d9, 0x9db, 0x9dd, 0x9de, 0x9df, 0x9e0, 0x9e1, 0x9e4, 0x9ea, 0x9ec, 0x9ed, 0x9f1, 0x9f5, 0x9f6, 0x9fb, 0x9fc, 0xa01); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0xa0b, 0xa0d, 0xa0f, 0xa12, 0xa13, 0xa14, 0xa17, 0xa21, 0xa24, 0xa29, 0xa2b, 0xa2d, 0xa33, 0xa38, 0xa39, 0xa3a, 0xa41, 0xa46, 0xa48, 0xa4a, 0xa4b, 0xa4e, 0xa4f, 0xa57, 0xa58, 0xa5a, 0xa5c, 0xa5d, 0xa5f, 0xa60, 0xa61, 0xa63, 0xa64, 0xa65, 0xa67, 0xa6a, 0xa71, 0xa74, 0xa77, 0xa7c, 0xa7d, 0xa7e, 0xa80, 0xa8f, 0xa91, 0xa93, 0xa94, 0xa97, 0xa9e, 0xaa2, 0xaaa, 0xaae, 0xaaf, 0xab1, 0xab2, 0xab4, 0xab5, 0xabc, 0xac1, 0xac3, 0xac4, 0xac7, 0xac9, 0xace, 0xacf, 0xad1, 0xad3, 0xad4, 0xad6, 0xad7, 0xad8, 0xade, 0xae1, 0xae3, 0xae7, 0xae8, 0xaf5, 0xaf6, 0xaf8, 0xaff, 0xb07, 0xb09, 0xb0f); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0xb12, 0xb14, 0xb16, 0xb1a, 0xb1e, 0xb1f, 0xb20, 0xb22, 0xb25, 0xb26, 0xb2a, 0xb2b, 0xb2d, 0xb2f, 0xb31, 0xb32, 0xb33, 0xb36, 0xb43, 0xb44, 0xb48, 0xb4a, 0xb4c, 0xb50, 0xb52, 0xb54, 0xb57, 0xb5e, 0xb64, 0xb68, 0xb70, 0xb71, 0xb72, 0xb73, 0xb77, 0xb7a, 0xb7b, 0xb7c, 0xb7e, 0xb80, 0xb83, 0xb84, 0xb88, 0xb89, 0xb8b, 0xb8d, 0xb8e, 0xb8f, 0xb91, 0xb95, 0xb97, 0xb9a, 0xb9b, 0xb9e, 0xb9f, 0xba7, 0xba9, 0xbaa, 0xbad, 0xbae, 0xbb5, 0xbb7, 0xbbb, 0xbbc, 0xbbd, 0xbc3, 0xbc6, 0xbcc, 0xbcd, 0xbcf, 0xbd4, 0xbd5, 0xbd8, 0xbd9, 0xbdf, 0xbe1, 0xbe3, 0xbf5, 0xbfa, 0xbfb, 0xbfc, 0xbfe, 0xbff); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0xc0a, 0xc10, 0xc12, 0xc14, 0xc15, 0xc17, 0xc1b, 0xc20, 0xc21, 0xc24, 0xc26, 0xc28, 0xc29, 0xc2c, 0xc2e, 0xc35, 0xc36, 0xc3b, 0xc3d, 0xc40, 0xc47, 0xc48, 0xc49, 0xc4e, 0xc4f, 0xc51, 0xc52, 0xc54, 0xc5a, 0xc5b, 0xc68, 0xc6c, 0xc70, 0xc71, 0xc72, 0xc75, 0xc78, 0xc7b, 0xc7c, 0xc80, 0xc83, 0xc87, 0xc8a, 0xc8b, 0xc8d, 0xc8e, 0xc90, 0xc92, 0xc96, 0xc9a, 0xca0, 0xca1, 0xcab, 0xcac, 0xcad, 0xcb6, 0xcbc, 0xcc1, 0xcc2, 0xcc5, 0xcc6, 0xcc8, 0xcca, 0xcce, 0xcd0, 0xcd1, 0xcdb, 0xce1, 0xce5, 0xce8, 0xcec, 0xcef, 0xcf2, 0xcf3, 0xcf5, 0xcf6, 0xcf9, 0xd03, 0xd0d, 0xd0e, 0xd0f, 0xd10, 0xd11); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0xd12, 0xd14, 0xd18, 0xd19, 0xd1d, 0xd1f, 0xd20, 0xd22, 0xd23, 0xd24, 0xd25, 0xd28, 0xd3d, 0xd3f, 0xd41, 0xd42, 0xd44, 0xd46, 0xd48, 0xd4a, 0xd4b, 0xd4c, 0xd4f, 0xd55, 0xd56, 0xd5a, 0xd5b, 0xd5f, 0xd60, 0xd62, 0xd63, 0xd64, 0xd67, 0xd69, 0xd71, 0xd73, 0xd74, 0xd75, 0xd7a, 0xd7d, 0xd7e, 0xd81, 0xd83, 0xd86, 0xd89, 0xd90, 0xd92, 0xd94, 0xd99, 0xd9d, 0xda1, 0xda4, 0xda5, 0xda7, 0xdad, 0xdb6, 0xdb7, 0xdb8, 0xdbd, 0xdbf, 0xdc5, 0xdcd, 0xdcf, 0xdd0, 0xdd2, 0xdd5, 0xddb, 0xddc, 0xddd, 0xdde, 0xde2, 0xde3, 0xde8, 0xde9, 0xdeb, 0xded, 0xdf3, 0xdf4, 0xdf7, 0xdf9, 0xdfe, 0xe00, 0xe05); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0xe0a, 0xe0b, 0xe0d, 0xe0f, 0xe13, 0xe15, 0xe16, 0xe17, 0xe18, 0xe1b, 0xe20, 0xe22, 0xe28, 0xe29, 0xe2a, 0xe2d, 0xe30, 0xe34, 0xe36, 0xe37, 0xe3a, 0xe3b, 0xe3c, 0xe4c, 0xe4e, 0xe4f, 0xe51, 0xe54, 0xe57, 0xe59, 0xe5d, 0xe60, 0xe6c, 0xe6e, 0xe77, 0xe7b, 0xe82, 0xe83, 0xe87, 0xe89, 0xe93, 0xe96, 0xe98, 0xe9b, 0xea4, 0xea6, 0xeaa, 0xeac, 0xead, 0xeaf, 0xeb0, 0xeb4, 0xeba, 0xebb, 0xebd, 0xebf, 0xec3, 0xec5, 0xec7, 0xece, 0xecf, 0xed6, 0xed7, 0xedb, 0xedc, 0xede, 0xedf, 0xee1, 0xee2, 0xee7, 0xee8, 0xee9, 0xeee, 0xef7, 0xef9, 0xefa, 0xefb, 0xefd, 0xf04, 0xf08, 0xf0c, 0xf0d, 0xf10); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Nop, 0xf14, 0xf15, 0xf1e, 0xf1f, 0xf21, 0xf22, 0xf24, 0xf26, 0xf28, 0xf29, 0xf2d, 0xf2e, 0xf30, 0xf31, 0xf35, 0xf38, 0xf3c, 0xf3d, 0xf3e, 0xf3f, 0xf48, 0xf4c, 0xf4f, 0xf53, 0xf57, 0xf5b, 0xf5e, 0xf60, 0xf65, 0xf69, 0xf6e, 0xf76, 0xf77, 0xf79, 0xf7a, 0xf7d, 0xf7e, 0xf80, 0xf82, 0xf86, 0xf89, 0xf8a, 0xf8b, 0xf93, 0xf95, 0xf9d, 0xfa1, 0xfaa, 0xfab, 0xfad, 0xfae, 0xfb0, 0xfb4, 0xfb7, 0xfb8, 0xfba, 0xfbb, 0xfbc, 0xfc2, 0xfc6, 0xfc8, 0xfca, 0xfd0, 0xfd3, 0xfd7, 0xfd8, 0xfdc, 0xfdd, 0xfe2, 0xfe3, 0xfe8, 0xfeb, 0xfef, 0xff5, 0xff9, 0xffe, 0xfff); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetUndefined, 0x1e, 0x34, 0x50, 0xc9, 0x124, 0x3f6, 0x40e, 0x428, 0x523, 0x53a, 0x5d3, 0x664, 0x726, 0x743, 0x793, 0x90b, 0x977, 0x984, 0xa0a, 0xa9a, 0xada, 0xbb4, 0xbd1, 0xc53, 0xc79, 0xcff, 0xe10, 0xe46, 0xf83, 0xfaf); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetResolveFunction, 0x82, 0xb2, 0x1ac, 0x273, 0x377, 0x4f4, 0x66c, 0x71e, 0x7bc, 0x820, 0x95e, 0xaeb, 0xb5c, 0xc16, 0xced, 0xe41, 0xe7e, 0xf7f); + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetHash, 0x51, 0x64, 0x6d, 0x81, 0x187, 0x20d, 0x28c, 0x570, 0x588, 0x63d, 0x70c, 0x80a, 0x8db, 0x9c1, 0xafa, 0xb2c, 0xb4b, 0xbc5, 0xbf3, 0xcaf, 0xd31, 0xe1e, 0xf17, 0xf61); // a2d360 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_ScriptFunctionCall, 0x304, 0x359, 0x3cd, 0x405, 0x48b, 0x4d2, 0x572, 0x57b, 0x5dc, 0x8a3, 0xa05, 0xa16, 0xb42, 0xbbe, 0xbe5, 0xbee, 0xbf2, 0xc73, 0xc9e, 0xcbf, 0xd16, 0xd27, 0xdcb, 0xdef, 0xdf0, 0xe26, 0xe32, 0xe68, 0xf1d, 0xf20); // a30930 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_DecTop, 0x222, 0x2a6, 0x2d4, 0x454, 0x4b1, 0x4b6, 0x4f2, 0x4f5, 0x4fd, 0x747, 0x769, 0x830, 0xa4c, 0xb75, 0xbf1, 0xcb8, 0xd1c, 0xdd8, 0xe04, 0xec8); // a32ec0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_EvalGlobalObjectFieldVariable, 0x7a, 0x110, 0x17c, 0x1f4, 0x220, 0x278, 0x30e, 0x316, 0x3f4, 0x59d, 0x6c8, 0x72b, 0x734, 0x7b5, 0x7ca, 0x856, 0x8b2, 0x986, 0x988, 0xabe, 0xbc4, 0xc32, 0xc5e, 0xc76, 0xcbe, 0xcea, 0xe35, 0xe71, 0xea3); // a349d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_IsDefined, 0x129, 0x14c, 0x251, 0x36e, 0x49d, 0x4cc, 0x591, 0x5ae, 0x60c, 0x6bc, 0x6e9, 0x7f1, 0x808, 0x84b, 0x94e, 0xab0, 0xba1, 0xbb0, 0xc99, 0xd8e, 0xea8, 0xf23, 0xfee); // a351d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_JumpOnTrue, 0x30, 0x157, 0x3fe, 0x527, 0x5a8, 0x731, 0x781, 0x89d, 0x8a5, 0x8e8, 0xccd, 0xd5c, 0xe62, 0xe92); // a2ddb0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_EvalArray, 0x9e, 0x16d, 0x281, 0x2cc, 0x38f, 0x392, 0x3bd, 0x3fc, 0x4d5, 0x5a2, 0x5fe, 0x70b, 0x80f, 0x81d, 0xb19, 0xb82, 0xbab, 0xd8c); // a33690 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetZero, 0x239, 0x269, 0x283, 0x4bb, 0x51a, 0x5d2, 0x5db, 0x628, 0x674, 0x7a3, 0x7f4, 0x87f, 0x8aa, 0x92d, 0xa20, 0xaca, 0xd2c, 0xd51, 0xd59, 0xe79, 0xef0, 0xf7b, 0xffb); // a2d760 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_T9_EvalFieldVariableFromGlobalObject, 0xbe, 0x513, 0x514, 0x676, 0x92f, 0x9f4, 0xa7b, 0xb53, 0xb67, 0xba6, 0xc13, 0xc8c, 0xca8, 0xcc3, 0xd5d, 0xdec, 0xeb3, 0xec1, 0xf73); // a34930 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Minus, 0x7c, 0x17d, 0x204, 0x39c, 0x42b, 0x437, 0x492, 0x87d, 0x9a5, 0xb0a, 0xc3f, 0xda3, 0xecd); // a2e130 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_T9_SetVariableFieldFromEvalArrayRef, 0x1ce, 0x1ea, 0x2b0, 0x2cf, 0x524, 0x703, 0x81b, 0x82d, 0x9bc, 0xa10, 0xc09, 0xc19, 0xc45, 0xcd3, 0xd26, 0xe33); // a33200 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetByte, 0x58, 0xc8, 0x1dd, 0x217, 0x31d, 0x3a2, 0x448, 0x6a2, 0x7bb, 0x84a, 0x852, 0x8a2, 0xa0e, 0xaab, 0xac0, 0xaed, 0xaf9, 0xb41, 0xb51, 0xb81, 0xb87, 0xbf4, 0xcd5, 0xcfe, 0xd4e, 0xe74, 0xeda, 0xef5, 0xf51); // a2d2b0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetUnsignedShort, 0x1c, 0x14a, 0x19c, 0x2a8, 0x2c9, 0x362, 0x369, 0x3c3, 0x3df, 0x4a2, 0x4ca, 0x6ba, 0x759, 0x819, 0x96f, 0x99c, 0x9b5, 0xa6e, 0xafb, 0xbfd, 0xc58, 0xcb4, 0xd2e, 0xe14, 0xe9f, 0xea5, 0xf1b); // a2d6a0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Divide, 0x9b, 0x162, 0x248, 0x2dd, 0x324, 0x6d7, 0x702, 0x930, 0xa02, 0xb06, 0xb0b, 0xb3d, 0xc86, 0xcae, 0xd40, 0xebe, 0xf19, 0xf5f, 0xf67, 0xff4); // a2d120 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_DevblockBegin, 0xd4, 0xdc, 0x15e, 0x2c8, 0x370, 0x452, 0x80d, 0x90d, 0xa06, 0xae6, 0xbe0, 0xc5d, 0xcf0, 0xd15, 0xdb5); // a2d0c0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Equal, 0x150, 0x181, 0x1bb, 0x1bf, 0x4b0, 0x512, 0x55e, 0x586, 0x69f, 0x6fc, 0x7e8, 0x873, 0x8f6, 0x8f7, 0x94a, 0x9e7, 0xa27, 0xa34, 0xa62, 0xaf1, 0xbdb, 0xc03, 0xc0c, 0xd36, 0xdd6, 0xdea, 0xdf1, 0xe08, 0xf9f); // a2d260 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetNegByte, 0x1ef, 0x55b, 0x5e7, 0x742, 0xaea, 0xcc7, 0xdab, 0xdb3, 0xe6a, 0xfcb); // a2d420 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_JumpOnFalse, 0x102, 0x121, 0x1b7, 0x1df, 0x2d9, 0x334, 0x337, 0x3bf, 0x3c8, 0x3fd, 0x43c, 0x510, 0x521, 0x615, 0x6a7, 0x6dd, 0x728, 0x824, 0x953, 0xa55, 0xb4f, 0xe4a, 0xedd, 0xfc3); // a2dc00 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_SafeCreateLocalVariables, 0x101, 0x2c3, 0x2f3, 0x41d, 0x565, 0x577, 0x5b5, 0x625, 0x802, 0x835, 0x8cb, 0xb02, 0xc0e, 0xd45, 0xdd9); // a2f8d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_ScriptThreadCall, 0xbf, 0xe4, 0xee, 0x100, 0x350, 0x35f, 0x36a, 0x497, 0x5aa, 0x715, 0xabb, 0xb37, 0xc1d, 0xc66, 0xeff, 0xf58); // a31e30 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_EvalLocalVariableCached, 0x99, 0x140, 0x205, 0x246, 0x2b4, 0x2be, 0x3e6, 0x475, 0x4e8, 0x504, 0x50a, 0x624, 0x6bd, 0x7de, 0x7ed, 0x85e, 0xa1d, 0xa45, 0xbcb, 0xbef, 0xbf9, 0xcba, 0xd50, 0xdbe, 0xdcc, 0xe5a, 0xe63, 0xebc, 0xfa7, 0xfb1); // a34620 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_EvalLocalVariableCachedSafe, 0x15d, 0x2ee, 0x484, 0x606, 0x73a, 0x9c5, 0xa7a, 0xaba, 0xacc, 0xc01, 0xd6c, 0xe9e); // a35420 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_SetVariableField, 0x7e, 0xd1, 0x1d6, 0x34b, 0x4c2, 0x61d, 0x786, 0x862, 0x922, 0x9cc, 0xa2c, 0xa66, 0xc81, 0xeb5); // a35730 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_CreateArray, 0x381, 0x4ed, 0x568, 0x585, 0x5a9, 0x638, 0x665, 0x6b2, 0x810, 0x81c, 0x975, 0x9e5, 0xa6b, 0xa95, 0xab6, 0xaf2, 0xc22, 0xc3c, 0xd09, 0xe42, 0xe49); // a32d80 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_SetLocalVariableCached, 0xb7, 0x376, 0x394, 0x408, 0x412, 0x470, 0x4e7, 0x5cd, 0x5e6, 0x61b, 0x697, 0x6b1, 0x8e0, 0x8ef, 0x8f5, 0x921, 0x9e3, 0xa6c, 0xa82, 0xa8e, 0xb65, 0xbf7, 0xca5, 0xd0c, 0xdc0, 0xf55, 0xf6c, 0xf87); // a344c0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetString, 0x12, 0x11f, 0x153, 0x364, 0x3f8, 0x434, 0x5c4, 0x612, 0x626, 0x634, 0x68d, 0x6fa, 0x902, 0x9b2, 0xb15, 0xc30, 0xca7, 0xe95); // a2d530 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_T9_EvalLocalVariableCachedDouble, 0x98, 0xae, 0x277, 0x306, 0x4f3, 0x52b, 0x59e, 0x5a6, 0x6f6, 0x7ac, 0x884, 0x8fa, 0x95c, 0xc0f, 0xc4a, 0xd3c, 0xdc9, 0xea7, 0xfc0); // a340e0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_SizeOf, 0xf6, 0x295, 0x298, 0x29c, 0x2ff, 0x3c4, 0x49b, 0x4d0, 0x602, 0x609, 0x65a, 0x6f3, 0x762, 0x850, 0x9d0, 0xd04, 0xd2f, 0xe52, 0xf3b); // a357d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_JumpOnGreaterThan, 0x26, 0x307, 0x37a, 0x3e2, 0x3e5, 0x502, 0x52a, 0x57e, 0x5c8, 0x5d6, 0x6da, 0x74c, 0x79e, 0x7ad, 0x9da, 0xa15, 0xb5d, 0xb78, 0xcdf, 0xce2, 0xd88, 0xe38, 0xfac); // a2df20 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_EvalLocalVariableRefCached, 0x6b, 0x8c, 0x2bf, 0x44a, 0x45e, 0x6ce, 0x6f1, 0x794, 0x7c1, 0x85d, 0x90a, 0xa3f, 0xb3e, 0xbce, 0xd2b, 0xd6a, 0xfe6); // a345e0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Jump, 0x1f6, 0x290, 0x2f6, 0x39d, 0x3f7, 0x925, 0x957, 0xb0c, 0xc2f, 0xd3a, 0xddf, 0xe1c, 0xe78, 0xe9a, 0xf64, 0xf6d, 0xf8f, 0xfb5); // a2de90 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_T9_EvalArrayCached, 0x106, 0x137, 0x1e7, 0x1f5, 0x203, 0x325, 0x338, 0x354, 0x3da, 0x423, 0x496, 0x525, 0x57c, 0x581, 0x69e, 0x733, 0x73b, 0x80e, 0x9ad, 0x9e2, 0xa5e, 0xb96, 0xd65, 0xd68, 0xe24, 0xe75); // a34520 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Plus, 0xc4, 0xeb, 0x17b, 0x1e0, 0x2e9, 0x3ae, 0x4a9, 0x4f1, 0x4f8, 0x501, 0x590, 0x878, 0x8d6, 0x939, 0x943, 0x946, 0x9c7, 0x9ef, 0xa90, 0xc23, 0xc44, 0xd21, 0xd6f, 0xe3d, 0xf0f); // a2e2d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Return, 0x9a, 0x144, 0x275, 0x3ab, 0x415, 0x6ad, 0x8d4, 0x974, 0xb17, 0xbb9, 0xc02, 0xca9, 0xcc9, 0xccf, 0xfd9, 0xff1); // a2f6b0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_T9_IncLocalVariableCached, 0xf2, 0x155, 0x175, 0x1ae, 0x21f, 0x225, 0x244, 0x35b, 0x361, 0x413, 0x445, 0x4a5, 0x4b2, 0x4bd, 0x589, 0x680, 0x71a, 0x785, 0x8f0, 0x8f2, 0xa30, 0xa78, 0xd32, 0xd4d, 0xe44, 0xf92, 0xfe1, 0xfe7); // a34420 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_EvalLocalVariableDefined, 0x29, 0x245, 0x28f, 0x385, 0x4fc, 0x557, 0x653, 0x82f, 0x9cb, 0xa72, 0xaa7, 0xaef, 0xafd, 0xb10, 0xb6f, 0xbec); // a34200 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_BoolNot, 0x1a2, 0x226, 0x46e, 0x582, 0x583, 0x687, 0x6fd, 0x7fb, 0x8b6, 0x961, 0x9e9, 0xa53, 0xab9, 0xb8a, 0xc4b, 0xc57, 0xd01, 0xe5e, 0xe8d, 0xf00, 0xf97, 0xfa6); // a2ce70 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_JumpOnTrueExpr, 0x9d, 0xb3, 0x207, 0x21a, 0x315, 0x3c9, 0x640, 0x889, 0x992, 0xb30, 0xb5b, 0xc64, 0xd0b, 0xe8f, 0xf74, 0xffa); // a2dd10 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_CastBool, 0x65, 0x249, 0x276, 0x346, 0x34d, 0x404, 0x447, 0x611, 0x62d, 0x727, 0x754, 0x79b, 0x7af, 0x7fe, 0x888, 0x8bd, 0xa9c, 0xbe8, 0xbea, 0xd05, 0xdd3, 0xdff, 0xe81, 0xeab); // a2ceb0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetUnsignedInteger, 0x14, 0xea, 0xfb, 0x388, 0x3d6, 0x410, 0x43e, 0x482, 0x4c6, 0x599, 0x5bc, 0x690, 0x874, 0x937, 0x9d2, 0xa54, 0xa81, 0xbd6, 0xcb3, 0xd96, 0xdb9, 0xe6d, 0xe94, 0xeb8, 0xf8d, 0xfe5); // a2d640 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetFloat, 0x4d, 0xbd, 0xc6, 0x2b7, 0x300, 0x3d9, 0x4b9, 0x526, 0x5e3, 0x63a, 0x827, 0x838, 0x88a, 0x8be, 0x941, 0x9af, 0x9c4, 0x9c6, 0x9ff, 0xaf3, 0xb3b, 0xbba, 0xc06, 0xca3, 0xcf8, 0xd6d, 0xe02, 0xf12, 0xf84); // a2d300 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_WaitFrame, 0x189, 0x29e, 0x2ac, 0x2fa, 0x47b, 0x635, 0x688, 0x804, 0x893, 0x8e9, 0x910, 0x9d1, 0xaa1, 0xb76, 0xba2, 0xc50, 0xd00); // a36810 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_ScriptMethodCall, 0x11a, 0x177, 0x433, 0x451, 0x548, 0x594, 0x616, 0x661, 0x686, 0x6a0, 0x919, 0xa52, 0xbb2, 0xbc0, 0xc34, 0xc9d, 0xf0e, 0xfa4); // a30db0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Wait, 0x36, 0x7f, 0xca, 0xd5, 0xde, 0x186, 0x200, 0x386, 0x584, 0x6e5, 0x711, 0x778, 0x815, 0x963, 0x985, 0xab3, 0xac2, 0xc7e, 0xd8d, 0xdfc, 0xe7f, 0xf13, 0xfc5); // a383b0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GreaterThanOrEqualTo, 0xe5, 0x31e, 0x331, 0x3a8, 0x4c3, 0x756, 0x788, 0x7a2, 0xb13, 0xc43, 0xc82, 0xd9f, 0xe23, 0xe97, 0xecc, 0xf71, 0xf9a); // a2d920 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_LessThanOrEqualTo, 0xac, 0xf0, 0x113, 0x12d, 0x14b, 0x427, 0x5ff, 0x829, 0x832, 0x891, 0xa00, 0xa25, 0xa3e, 0xa7f, 0xaa6, 0xc1e, 0xc41, 0xcb5, 0xec4, 0xeea, 0xf6f); // a2e050 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_NotEqual, 0x9f, 0x117, 0x138, 0x18c, 0x256, 0x2dc, 0x2e6, 0x3ed, 0x494, 0x4b3, 0x622, 0x69d, 0x716, 0x79a, 0xa3c, 0xa42, 0xb47, 0xc18, 0xc4d, 0xc6e); // a2e270 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_CastAndEvalFieldVariable, 0xaa, 0x382, 0x3ea, 0x569, 0x6c7, 0x6f5, 0x71b, 0x7e2, 0x844, 0x97d, 0xb92, 0xbd0, 0xd7b, 0xe7c, 0xf44, 0xf56, 0xfc7); // a32b10 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Vector, 0x22f, 0x2c2, 0x312, 0x35e, 0x459, 0x468, 0x64c, 0x7ee, 0xa03, 0xa22, 0xa47, 0xb11, 0xb38, 0xc7a, 0xeed, 0xf2f, 0xfa8); // a2ea00 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_JumpOnLessThan, 0x4c, 0x5f, 0x6a, 0x183, 0x1d0, 0x253, 0x267, 0x2c0, 0x552, 0x566, 0x56f, 0x59c, 0x5b0, 0x60b, 0x76a, 0x7f5, 0x825, 0x8cc, 0x905, 0xa3d, 0xae4, 0xae9, 0xb18, 0xbac, 0xbb1, 0xbda, 0xcfd, 0xde7, 0xeeb); // a2d7f0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Multiply, 0x3c, 0x16c, 0x294, 0x368, 0x41c, 0x43d, 0x4c4, 0x54d, 0x845, 0x87b, 0x8ea, 0x960, 0xafe, 0xc5f, 0xceb, 0xcf7, 0xda2, 0xdc7, 0xeb1, 0xef3, 0xff7); // a2e1f0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_GetSelf, 0x33, 0x47, 0xef, 0x229, 0x265, 0x430, 0x564, 0x574, 0x5b2, 0x650, 0x6c6, 0x826, 0x8bf, 0xb29, 0xb62, 0xc7f, 0xc91, 0xd85, 0xe11, 0xf16); // a35070 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_T9_IteratorKey, 0x16, 0x25, 0x2a2, 0x2e2, 0x2ec, 0x725, 0x774, 0x797, 0x8e4, 0x945, 0x9fa, 0xa89, 0xec0); // a34b90 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_T9_IteratorVal, 0xa5, 0x52f, 0x667, 0x6b3, 0x6dc, 0x72a, 0x746, 0x8ec, 0x928, 0xb5f, 0xb66, 0xd58, 0xdb2); // a32f50 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_FirstArrayKey, 0x1c8, 0x449, 0x4a1, 0x4aa, 0x823, 0x970, 0x97a, 0x995, 0x9f7, 0xb55, 0xba5, 0xcee, 0xecb, 0xfbd); // a34720 + + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x17, 0x136, 0x1ee, 0x3af, 0x3d7, 0x61f, 0x675, 0x82e, 0x8b5, 0xc6a, 0xce3, 0xdca); // a2cce0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x75, 0x95, 0x11b, 0x372, 0x4b8, 0x705, 0x924, 0x9cf, 0xcfa, 0xe53, 0xe9d, 0xf6b); // a2cd20 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xf9, 0x1c0, 0x21e, 0x2e1, 0x52c, 0x5c9, 0x766, 0x9be, 0xb05, 0xb28, 0xc55, 0xd1a, 0xe01, 0xe7d, 0xf49, 0xfb9); // a2cd80 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x17e, 0x1fe, 0x2af, 0x4ef, 0x77a, 0x7a4, 0x979, 0xb6b, 0xc85, 0xce4, 0xd2a, 0xd98, 0xe12, 0xfa3); // a2cde0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x107, 0x1e8, 0x261, 0x3c5, 0x505, 0x528, 0x558, 0x672, 0x68f, 0x69c, 0x87e, 0x904, 0xb00, 0xf2b); // a2ce30 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x56, 0xe3, 0xf8, 0x15b, 0x2cb, 0x308, 0x641, 0x993, 0xa51, 0xc77, 0xd97, 0xf36); // a2cef0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x292, 0x343, 0x519, 0x657, 0x724, 0x782, 0x7d8, 0x915, 0x997, 0x9f3, 0xb03, 0xc11, 0xd08, 0xd8a, 0xe7a, 0xfdb); // a2cf30 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x63, 0x120, 0x19d, 0x1a5, 0x1ab, 0x25a, 0x3a4, 0x3c2, 0x3db, 0x481, 0x48f, 0x5be, 0x5cc, 0x6ca, 0x748, 0x77f, 0x7a9, 0x8a4, 0x8c8, 0x8cf, 0x907, 0xcc0, 0xccc, 0xd93, 0xf7c, 0xfbe); // a2cf70 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xba, 0x42f, 0x4c9, 0x655, 0x695, 0x83b, 0xc37, 0xcb1, 0xd72, 0xe69, 0xe6b); // a2d180 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xa4, 0x195, 0x1c3, 0x242, 0x36d, 0x396, 0x39e, 0x540, 0x7d6, 0x7f0, 0x875, 0x8f3, 0xaf4, 0xbc7, 0xbdd, 0xc00, 0xc60, 0xee4); // a2d1c0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x172, 0x192, 0x1dc, 0x1fd, 0x309, 0x406, 0x414, 0x417, 0x466, 0x61e, 0x67d, 0x775, 0x790, 0x8a6, 0x940, 0xa1f, 0xa98, 0xb39, 0xda8, 0xed0, 0xed3, 0xefe, 0xf8c, 0xf91, 0xfce, 0xfcf); // a2d3c0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x2c, 0x72, 0xe6, 0x122, 0x23c, 0x23d, 0x293, 0x30c, 0x340, 0x375, 0x500, 0x5ec, 0x64e, 0x66a, 0x6ac, 0x6b6, 0x934, 0x973, 0x9ae, 0x9fe, 0xb0e, 0xb9c, 0xc2a, 0xcb0, 0xd06, 0xd29, 0xdb1, 0xe70, 0xf9b, 0xf9c); // a2d470 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x22, 0x1c5, 0x2a0, 0x2e3, 0x365, 0x391, 0x579, 0x6c0, 0x6ed, 0x741, 0x817, 0x9fd, 0xa43, 0xb7d, 0xcd2, 0xe85, 0xf78); // a2d4d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x52, 0x12f, 0x13a, 0x1a0, 0x214, 0x26c, 0x2a5, 0x2fc, 0x363, 0x387, 0x69a, 0x6b9, 0x75c, 0x8c5, 0xa6f, 0xa76, 0xb1c, 0xba8, 0xbc2, 0xc1a, 0xd17, 0xdc2, 0xdda, 0xdf6, 0xe5f, 0xf40, 0xf42, 0xf88); // a2d5a0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x66, 0x32a, 0x46a, 0x5d7, 0x6d9, 0x913, 0xa40, 0xaee, 0xb79, 0xc08, 0xe1f, 0xe3e, 0xe4d, 0xe9c, 0xf07); // a2d700 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x7d, 0x88, 0xf4, 0x10e, 0x270, 0x3d3, 0x55c, 0x637, 0x648, 0x6c2, 0x760, 0x8c6, 0x931, 0xc4c, 0xc62, 0xc84, 0xc88, 0xcc4, 0xf2a, 0xf98); // a2d9a0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x2b, 0xa6, 0x38c, 0x4f9, 0x62e, 0x701, 0x99b, 0xb49, 0xf02, 0xfa0); // a2d9f0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x45, 0x93, 0xc0, 0x185, 0x2bb, 0x345, 0x395, 0x43f, 0x4dd, 0x592, 0x5a3, 0x67a, 0x72f, 0x75b, 0x7d9, 0x7f3, 0x86c, 0x872, 0x935, 0xa08, 0xc63, 0xcaa, 0xda9, 0xdc1, 0xde1, 0xfc9); // a2db60 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xda, 0x178, 0x1cb, 0x297, 0x2f9, 0x384, 0x3fa, 0x4ff, 0x5b7, 0x68b, 0x750, 0x86d, 0x881, 0x89b, 0x9d5, 0xa1c, 0xa26, 0xb45, 0xb8c, 0xb94, 0xbf0, 0xce0, 0xd30, 0xe1a, 0xe50); // a2e0d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x37, 0xcb, 0x180, 0x27a, 0x32b, 0x330, 0x38a, 0x39b, 0x441, 0x515, 0x517, 0x639, 0x779, 0xa8b, 0xacb, 0xaec, 0xbc8, 0xbd3, 0xd38, 0xd47, 0xd82, 0xdba, 0xe61, 0xf4e, 0xf68); // a2e190 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x1a1, 0x1a3, 0x29a, 0x3d8, 0x53b, 0x542, 0x9eb, 0xc9b, 0xce7, 0xf90); // a2e330 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xe7, 0x147, 0x23e, 0x279, 0x2de, 0x313, 0x467, 0x4ba, 0x5f9, 0x77b, 0x859, 0x898, 0x92e, 0xa28, 0xad2, 0xb3f, 0xc3a, 0xcdd, 0xd07, 0xdae, 0xdc6, 0xdc8, 0xe09, 0xe4b, 0xe84, 0xec9, 0xf45, 0xf4a, 0xfc1); // a2e390 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x1f2, 0x237, 0x2f7, 0x3b0, 0x478, 0x4a6, 0x5a0, 0x800, 0x8ff, 0x9ab, 0xa2f, 0xa68); // a2e410 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x38, 0xc2, 0x1f1, 0x211, 0x48e, 0x490, 0x4ee, 0x5f6, 0x68c, 0x72d, 0x828, 0x83c, 0x920, 0x99d, 0xa09, 0xaa9, 0xaac, 0xae0, 0xc61, 0xd9a, 0xe0c, 0xeb2, 0xffd); // a2e490 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xcf, 0x1a4, 0x228, 0x2bc, 0x4e6, 0x5a7, 0x776, 0x7f7, 0x849, 0x964, 0xa32, 0xac6, 0xc56, 0xcda, 0xd87); // a2e540 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x4e, 0xa9, 0x13f, 0x1f7, 0x1ff, 0x20c, 0x24f, 0x274, 0x27f, 0x28e, 0x356, 0x3e3, 0x3f5, 0x40f, 0x485, 0x511, 0x539, 0x5a4, 0x5ab, 0x65e, 0x81f, 0x8ce, 0x9f0, 0xa70, 0xa8d, 0xa9f, 0xd1e, 0xda6, 0xdd4); // a2e760 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x87, 0x1db, 0x1f3, 0x3ac, 0x3ef, 0x729, 0x8f1, 0xa9b, 0xaa5, 0xc6b, 0xc97, 0xe07, 0xe27, 0xe43, 0xe88); // a2e7a0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x67, 0x135, 0x43a, 0x4ea, 0x55d, 0x5ca, 0x796, 0x906, 0x948, 0x95f, 0x987, 0xa88, 0xab7, 0xb2e, 0xcdc, 0xd53, 0xdaa, 0xea1, 0xeef, 0xf1a); // a2e8a0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x8a, 0xa0, 0x16e, 0x2c1, 0x4fb, 0x623, 0x6a5, 0x71f, 0x7bf, 0x7ce, 0x82a, 0x8dd, 0x95a, 0xa4d, 0xd80, 0xf05, 0xf70, 0xff8); // a2fd40 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x20, 0x90, 0xaf, 0xe0, 0x161, 0x165, 0x1da, 0x1f0, 0x2ea, 0x348, 0x4a3, 0x4c5, 0x5e0, 0x717, 0x7ab, 0x908, 0x96d, 0xa9d, 0xac5, 0xb27, 0xb63, 0xb6d, 0xc74, 0xd77, 0xdf5, 0xe0e, 0xe47, 0xf6a, 0xfe4, 0xff3); // a2ffb0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x40, 0x163, 0x208, 0x3a0, 0x40c, 0x4af, 0x5af, 0x6f8, 0x7f6, 0x831, 0x89c, 0x8c9, 0xc42, 0xcd8); // a30240 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x43, 0xd0, 0x21d, 0x2c7, 0x3b2, 0x458, 0x4a8, 0x54f, 0x593, 0x649, 0x64f, 0x654, 0x670, 0x789, 0x980, 0xa8c, 0xa96, 0xaf7, 0xb1b, 0xb98, 0xbc1, 0xbe7, 0xc7d, 0xd43, 0xe48, 0xee3); // a304a0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x7b, 0x151, 0x33b, 0x47c, 0x544, 0x58b, 0x8ca, 0x8d7, 0x93e, 0x97e, 0xa0c, 0xd9c, 0xdd7, 0xe86, 0xee5, 0xf0b); // a306b0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x116, 0x247, 0x2ce, 0x38b, 0x3a5, 0x6e1, 0x82c, 0x8fb, 0xa99, 0xaa0, 0xacd, 0xbd2, 0xbdc, 0xd52, 0xef1, 0xfa9); // a30b30 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xcc, 0x109, 0x1b6, 0x268, 0x30f, 0x587, 0x62a, 0x684, 0x765, 0x869, 0x8b3, 0x90c, 0xad0, 0xb01, 0xc89, 0xd35, 0xf81, 0xfcd); // a30fb0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x49, 0x10b, 0x125, 0x12b, 0x1c1, 0x24b, 0x33a, 0x36c, 0x389, 0x44c, 0x4cb, 0x503, 0x51e, 0x721, 0x7b9, 0x7eb, 0x7fd, 0xa44, 0xa49, 0xba3, 0xd57, 0xd84, 0xea2, 0xea9, 0xeca, 0xf85, 0xfd2, 0xfdf); // a31240 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x194, 0x1b2, 0x1c2, 0x1e2, 0x25b, 0x284, 0x31c, 0x36f, 0x633, 0x70e, 0x854, 0x971, 0xa86, 0xb08, 0xc69, 0xcf1, 0xeb7, 0xf46); // a31490 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x2a, 0x79, 0x13b, 0x179, 0x2b1, 0x2e7, 0x2f8, 0x54a, 0x5b8, 0x617, 0x644, 0x6d3, 0x6f0, 0x801, 0x857, 0x903, 0x951, 0x958, 0x9d6, 0xa50, 0xc05, 0xd34, 0xde4, 0xe2b, 0xe45, 0xe5b, 0xef8); // a31710 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x114, 0x11e, 0x28d, 0x303, 0x37d, 0x51b, 0x5eb, 0x7df, 0x86a, 0x9a0, 0xa83, 0xe64, 0xe6f, 0xf37, 0xf5d); // a31950 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x131, 0x1aa, 0x508, 0x53f, 0x7c6, 0x89a, 0x8df, 0x9f8, 0xb4e, 0xb90, 0xbb6, 0xda0, 0xdfd, 0xeb9, 0xf01, 0xf09); // a31bb0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x35, 0x26f, 0x450, 0x48c, 0x534, 0x63e, 0x693, 0x699, 0x6cd, 0x6d8, 0x76e, 0x784, 0x836, 0x8b0, 0x93a, 0xb74, 0xc07, 0xd66, 0xef4, 0xf0a); // a324f0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x118, 0x2b9, 0x355, 0x3ec, 0x3f3, 0x439, 0x442, 0x630, 0x67c, 0x6ae, 0x6c5, 0x738, 0xa69, 0xa87, 0xbed, 0xc59, 0xc93, 0xc9f, 0xd79, 0xd8f, 0xdaf, 0xdf8, 0xed4, 0xf43, 0xf94, 0xfe0); // a32540 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x15a, 0x1f9, 0x2d7, 0x310, 0x34c, 0x3e7, 0x45b, 0x59f, 0x9b1, 0xa5b, 0xd8b, 0xdbb, 0xe25, 0xe40); // a32750 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xd2, 0x28a, 0x476, 0x547, 0x5b1, 0x7e7, 0x85b, 0x96c, 0x9cd, 0xaa3, 0xadb, 0xadf, 0xbb3, 0xbc9, 0xd7f, 0xdce, 0xe8a); // a32920 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x92, 0x23f, 0x32e, 0x344, 0x371, 0x477, 0x4b5, 0x553, 0x5fa, 0x6d2, 0x74e, 0x901, 0x966, 0xa2e); // a32c20 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x212, 0x2eb, 0x4cf, 0x5ad, 0x5b6, 0x7a1, 0x83e, 0x8d5, 0x8d8, 0x9ee, 0xa04, 0xa19, 0xa23, 0xa56, 0xad5, 0xc0b, 0xea0, 0xfb2, 0xfd6); // a32ce0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x97, 0xb1, 0x104, 0x1af, 0x235, 0x30d, 0x483, 0x5e8, 0x694, 0x709, 0x7dc, 0x7e6, 0x967, 0xa37, 0xc31, 0xcd4, 0xdbc, 0xdc3, 0xe39, 0xfed); // a32d10 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x59, 0x14d, 0x202, 0x219, 0x2ca, 0x2fb, 0x380, 0x3d4, 0x3de, 0x460, 0x4e2, 0x507, 0x571, 0x5e5, 0x645, 0x668, 0x90e, 0x932, 0x94f, 0xa1b, 0xabd, 0xadc, 0xc1f, 0xc67, 0xc98, 0xccb, 0xd54, 0xdfa, 0xe8c, 0xff6); // a32d40 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x1d, 0x164, 0x199, 0x223, 0x22b, 0x22d, 0x236, 0x2a1, 0x2d2, 0x311, 0x435, 0x461, 0x4ec, 0x551, 0x563, 0x580, 0x6ef, 0x7fc, 0xa35, 0xb04, 0xb0d, 0xd1b, 0xde6, 0xed9, 0xf96); // a32e20 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x21, 0x27, 0xc3, 0x546, 0x9f9, 0xa1e, 0xb6e, 0xba4, 0xcd7, 0xe5c, 0xe80, 0xefc, 0xf72); // a330a0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x168, 0x1e5, 0x27c, 0x3aa, 0x54b, 0x58c, 0x656, 0x7aa, 0x9b3, 0x9c8, 0x9e6, 0xa75, 0xb23, 0xdb0, 0xde0, 0xe72, 0xf47); // a33460 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x27b, 0x3cc, 0x440, 0x6ea, 0x85f, 0x8e5, 0xa2a, 0xca6, 0xdd1, 0xe19, 0xf50, 0xfb3); // a33710 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x44, 0x94, 0x13e, 0x1cc, 0x23a, 0x25e, 0x2ad, 0x3b5, 0x54c, 0x5d4, 0x755, 0x8d1, 0xa18, 0xabf, 0xb60, 0xcde, 0xd95, 0xe55, 0xf39, 0xfd4); // a33770 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x13d, 0x240, 0x263, 0x366, 0x64b, 0x712, 0x73e, 0x837, 0x840, 0x86f, 0x91b, 0x93c, 0x9a8, 0xa84, 0xa8a, 0xbbf, 0xbe2, 0xd49, 0xdf2, 0xe1d, 0xe2e, 0xe66, 0xf4b); // a33890 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x19, 0xb9, 0x105, 0x1de, 0x1e1, 0x227, 0x25c, 0x2b3, 0x498, 0x57d, 0x66d, 0x6db, 0x718, 0x7be, 0x89e, 0xa79, 0xa85, 0xc8f, 0xca4, 0xe2c, 0xe67, 0xe91, 0xf75, 0xf9e, 0xfd1); // a339d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x8d, 0x132, 0x33d, 0x44f, 0x4d7, 0x598, 0x607, 0x6c4, 0x78a, 0xb1d, 0xfec); // a33a60 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x8e, 0xb5, 0xed, 0x1ad, 0x2d1, 0x314, 0x37e, 0x45c, 0x506, 0x560, 0x66b, 0x6bf, 0x86b, 0x91e, 0x9a6, 0xb40, 0xc2b, 0xef2, 0xf41); // a33b40 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x5e, 0x18d, 0x3b6, 0x3b8, 0x41f, 0x4e5, 0x52d, 0x52e, 0x533, 0x555, 0x56e, 0x767, 0x76b, 0x78d, 0x7e4, 0x7e9, 0x8ba, 0xa07, 0xac8, 0xb5a, 0xbf6, 0xc1c, 0xc6f, 0xc9c, 0xec2, 0xf5a, 0xffc); // a33d10 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x13, 0xb6, 0x3ce, 0x46c, 0x5fb, 0x60f, 0x65b, 0x73d, 0x745, 0x764, 0x780, 0x99e, 0x9a9, 0xae2, 0xb3a, 0xc38, 0xcbb, 0xff0); // a33e60 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xd8, 0x13c, 0x210, 0x22a, 0x339, 0x48a, 0x516, 0x62f, 0x77c, 0x77e, 0xb35, 0xd70, 0xd78, 0xe8b, 0xe90, 0xeae); // a34020 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x41, 0xa3, 0xdb, 0x1b5, 0x1d8, 0x257, 0x32c, 0x469, 0x5f1, 0x614, 0x6df, 0x6ee, 0x70f, 0x7b8, 0x7c9, 0x7cc, 0x916, 0x99a, 0xad9, 0xb3c, 0xb58, 0xbd7, 0xcb9, 0xd0a, 0xd2d, 0xd3b, 0xf8e); // a34380 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x3d, 0x4a, 0x5c, 0xa1, 0x378, 0x424, 0x6de, 0x74b, 0x7c2, 0x7ea, 0x812, 0x87a, 0x8af, 0xa92, 0xb34, 0xb4d, 0xb61, 0xc5c, 0xd9b, 0xdac, 0xe3f, 0xf03); // a346c0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x158, 0x24e, 0x318, 0x3ee, 0x4bf, 0x6b4, 0x6e0, 0x7e5, 0x84e, 0x895, 0xa3b, 0xb56, 0xb99, 0xba0, 0xbe6, 0xcbd, 0xce9, 0xd39, 0xd5e, 0xe03, 0xf3a, 0xf5c, 0xf63); // a34a70 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x2e, 0x84, 0x215, 0x26a, 0x26d, 0x2b8, 0x3b1, 0x84d, 0x949, 0xc94, 0xeec, 0xf27); // a34ae0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_T9_IteratorNext, 0x152, 0x201, 0x233, 0x291, 0x444, 0x4be, 0x4d4, 0x554, 0x559, 0x5ba, 0x5d0, 0x5d9, 0x643, 0x662, 0x6e3, 0x720, 0x8bb, 0x8da, 0x9b7, 0xa11, 0xb21, 0xb24, 0xb9d, 0xbf8, 0xdb4, 0xed2, 0xfb6); // a34cc0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x18, 0xe9, 0xec, 0x12c, 0x319, 0x320, 0x49f, 0x4dc, 0x629, 0x692, 0x783, 0x803, 0x805, 0x87c, 0x98b, 0xb46, 0xc6d, 0xcf4, 0xd76, 0xde5, 0xdfb, 0xf34, 0xfd5); // a34e60 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x15, 0x24, 0x74, 0x96, 0x12e, 0x26b, 0x296, 0x3b9, 0x53e, 0x56d, 0x5f2, 0x76d, 0x7b0, 0x7d5, 0x858, 0x94c, 0x9bf, 0xaa4, 0xb86, 0xbe9, 0xc25, 0xc95, 0xcfc, 0xd61, 0xe56, 0xe73, 0xf11); // a34fc0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x1d4, 0x30b, 0x429, 0x730, 0x933, 0x9e8, 0x9f2, 0xbe4, 0xcd9, 0xf32); // a35110 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x20b, 0x2df, 0x31a, 0x383, 0x419, 0x597, 0x59a, 0x65f, 0x7c4, 0x9dc, 0xc2d, 0xc3e, 0xc65, 0xcd6, 0xf33, 0xf4d, 0xf62); // a352d0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x21c, 0x258, 0x2f1, 0x397, 0x3a1, 0x3c7, 0x438, 0x455, 0x4d1, 0x536, 0x56c, 0x573, 0x67e, 0x696, 0x841, 0x97c, 0xa59, 0xb69, 0xbeb, 0xc04, 0xce6, 0xd02, 0xd3e, 0xd6b, 0xf1c); // a354f0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x54, 0xc7, 0x1bc, 0x255, 0x357, 0x44d, 0x47e, 0x4b4, 0x509, 0x706, 0x787, 0x8c3, 0x8d9, 0x952, 0xb6c, 0xc33, 0xdc4, 0xdee, 0xe21, 0xe8e, 0xec6, 0xed8, 0xf99); // a355b0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xdf, 0x166, 0x28b, 0x2ab, 0x2da, 0x333, 0x37c, 0x3be, 0x443, 0x4ab, 0x4b7, 0x4c0, 0x4da, 0x51c, 0x81e, 0x9a7, 0x9b4, 0x9ba, 0xa31, 0xcb2, 0xe2f, 0xed1, 0xfa2); // a35630 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x55, 0x20a, 0x2ed, 0x352, 0x700, 0x9d4, 0xaad, 0xbca, 0xc27, 0xc46, 0xfea); // a35850 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x170, 0x550, 0x7ec, 0x879, 0x896, 0x8a0, 0x93b, 0xae5, 0xb7f, 0xb85, 0xd13, 0xd33, 0xd37, 0xd9e, 0xe58, 0xee0, 0xf06, 0xfbf, 0xfcc); // a35cb0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x32, 0x1a9, 0x243, 0x37f, 0x3ba, 0x3ff, 0x5df, 0x671, 0x6bb, 0x6ec, 0x77d, 0x795, 0x80c, 0x834, 0x91d, 0x956, 0x990, 0xab8, 0xd6e, 0xe76, 0xed5); // a360f0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x4f, 0x115, 0x12a, 0x39a, 0x3b3, 0x3f1, 0x53d, 0x603, 0x683, 0x6b7, 0x6b8, 0x713, 0x78b, 0x8a1, 0x8f4, 0x90f, 0x97f, 0x9a1, 0xadd, 0xbb8, 0xbde, 0xca2, 0xf54); // a365c0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x1e9, 0x2d0, 0x456, 0x71d, 0x8c2, 0xa73, 0xaf0, 0xafc, 0xbaf, 0xe31, 0xe99, 0xf25, 0xff2); // a36940 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x1b, 0x5d, 0x9c, 0x15f, 0x19f, 0x33f, 0x56a, 0x5d5, 0x601, 0x6af, 0x848, 0x8ac, 0xa1a, 0xa6d, 0xc39, 0xcfb, 0xee6, 0xf18, 0xfa5); // a36b30 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x2f, 0x2fe, 0x301, 0x358, 0x3d2, 0x4bc, 0x5f5, 0x851, 0x885, 0x897, 0xaa8, 0xb6a, 0xc0d, 0xe06, 0xe65, 0xef6, 0xf2c, 0xfc4); // a371e0 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0xcd, 0xfd, 0x127, 0x336, 0x347, 0x3e0, 0x4cd, 0x4e3, 0x57f, 0x5dd, 0x5de, 0x78c, 0x7d3, 0x7fa, 0x870, 0x959, 0x98f, 0x9d3, 0xa36, 0xb59, 0xd7c, 0xeb6, 0xf59); // a37840 + RegisterOpCode(VM_T937, PLATFORM_PC, OPCODE_Undefined, 0x14e, 0x176, 0x1d1, 0x24d, 0x2f4, 0x3a9, 0x55f, 0x927, 0x98c, 0xb93, 0xcb7, 0xd91, 0xf52, 0xf66, 0xfda, 0xfde, 0xfe9); // a37eb0 RegisterVM(VM_T9, "Call of Duty: Black ops Cold War", "t9", VmFlags::VMF_OPCODE_U16 | VmFlags::VMF_ALIGN | VmFlags::VMF_INV_ADD_TO_OBJECT | VmFlags::VMF_CLIENT_VM); RegisterVMPlatform(VM_T9, PLATFORM_PC); @@ -671,7 +846,26 @@ namespace tool::gsc::opcode { RegisterVMHashOPCode(VM_MW23, '@', OPCODE_IW_GetDVarHash, 8, [](const char* str) { return hash::HashPattern(str); }); RegisterVMHashOPCode(VM_MW23, '%', OPCODE_IW_GetUnk9, 8, [](const char* str) { return hash::Hash64Pattern(str, 0x47F5817A5EF961BA); }); RegisterVMHashOPCode(VM_MW23, 't', OPCODE_IW_GetUnkb, 4, [](const char* str) { return hash::Hash64Pattern(str, 0x811C9DC5, 0x1000193) & 0xFFFFFFFF; }); - RegisterDevCall(VM_MW23, "assert", "assertmsg", "assertex", "println"); + RegisterDevCall(VM_MW23, "assert", "assertmsg", "assertex", "println"); + + RegisterVM(VM_MW23B, "Call of Duty: Modern Warfare III (8B)", "jup8b", VmFlags::VMF_HASH64 | VmFlags::VMF_NO_VERSION | VmFlags::VMF_NO_PARAM_FLAGS | VmFlags::VMF_FULL_FILE_NAMESPACE | VmFlags::VMF_HASH_IW | VmFlags::VMF_CALL_NO_PARAMS | VmFlags::VMF_IW_CALLS); + RegisterVMPlatform(VM_MW23B, PLATFORM_PC); + RegisterVMGlobalVariable(VM_MW23B, "level", OPCODE_IW_GetLevel); + RegisterVMGlobalVariable(VM_MW23B, "game", OPCODE_IW_GetGame); + RegisterVMGlobalVariable(VM_MW23B, "anim", OPCODE_IW_GetAnim); + RegisterVMOperatorFunction(VM_MW23B, "waittill", " waittill(event, var*)", OPCODE_IW_SingleWaitTill, VPFD_SELF_PARAM | VPFD_UNPACK, 1); + RegisterVMOperatorFunction(VM_MW23B, "isdefined", "isdefined(object) -> bool", OPCODE_IsDefined, VPFD_RETURN_VALUE, 1, 1); + RegisterVMOperatorFunction(VM_MW23B, "notify", " notify(event, param*)", OPCODE_IW_Notify, VPFD_SELF_PARAM | VPFD_USE_PRE_SCRIPT_CALL, 1); + RegisterVMOperatorFunction(VM_MW23B, "endon", " endon(event)", OPCODE_IW_SingleEndon, VPFD_SELF_PARAM, 1, 1); + RegisterVMOperatorFunction(VM_MW23B, "wait", "wait(time)", OPCODE_Wait, VPFD_NONE, 1, 1); + RegisterVMOperatorFunction(VM_MW23B, "waitframe", "waitframe()", OPCODE_IW_WaitFrame, VPFD_NONE, 0, 0); + RegisterVMOperatorFunction(VM_MW23B, "getthread", "getthread() -> thread", OPCODE_IW_GetThread, VPFD_RETURN_VALUE, 0, 0); + RegisterVMOperatorFunction(VM_MW23B, "istrue", "istrue(object) -> bool", OPCODE_IW_IsTrue, VPFD_RETURN_VALUE, 1, 1); + RegisterVMHashOPCode(VM_MW23B, '#', OPCODE_GetHash, 8, [](const char* str) { return hash::Hash64Pattern(str); }); + RegisterVMHashOPCode(VM_MW23B, '@', OPCODE_IW_GetDVarHash, 8, [](const char* str) { return hash::HashPattern(str); }); + RegisterVMHashOPCode(VM_MW23B, '%', OPCODE_IW_GetUnk9, 8, [](const char* str) { return hash::Hash64Pattern(str, 0x47F5817A5EF961BA); }); + RegisterVMHashOPCode(VM_MW23B, 't', OPCODE_IW_GetUnkb, 4, [](const char* str) { return hash::Hash64Pattern(str, 0x811C9DC5, 0x1000193) & 0xFFFFFFFF; }); + RegisterDevCall(VM_MW23B, "assert", "assertmsg", "assertex", "println"); #ifdef SP23_INCLUDES sp23::opcodes::RegisterMW23OpCodes(); #endif @@ -1241,6 +1435,7 @@ namespace tool::gsc::opcode { RegisterOpCode(OPCODE_Wait2, "Wait2"); RegisterOpCode(OPCODE_WaitTillMatch2, "WaitTillMatch2"); RegisterOpCode(OPCODE_IgnoreWaittillVariableFieldCached, "IgnoreWaittillVariableFieldCached"); + RegisterOpCode(OPCODE_IW_RegisterMultipleVariables, "RegisterMultipleVariables"); } }; namespace { diff --git a/src/acts/tools/gsc_opcodes_load.hpp b/src/acts/tools/gsc_opcodes_load.hpp index 7611bd3..5e2a608 100644 --- a/src/acts/tools/gsc_opcodes_load.hpp +++ b/src/acts/tools/gsc_opcodes_load.hpp @@ -10,7 +10,8 @@ namespace tool::gsc::opcode { VM_T937 = 0x37, VM_T9 = 0x38, - VM_MW23 = 0xF0, + VM_MW23 = 0x8a, + VM_MW23B = 0x8b, }; enum Platform : byte { @@ -267,6 +268,7 @@ namespace tool::gsc::opcode { OPCODE_WaitTillMatch2, OPCODE_IgnoreWaittillVariableFieldCached, + OPCODE_IW_RegisterMultipleVariables, OPCODE_COUNT, }; diff --git a/src/acts/tools/gsc_vm.hpp b/src/acts/tools/gsc_vm.hpp index 534401f..38985a9 100644 --- a/src/acts/tools/gsc_vm.hpp +++ b/src/acts/tools/gsc_vm.hpp @@ -888,7 +888,7 @@ class MW23GSCOBJHandler : public GSCOBJHandler { return sizeof(GscObj23); } char* DecryptString(char* str) override { - return str; // iw + return str; // iw -> need usage of decryption dumper } bool IsValidHeader(size_t size) override { return size >= sizeof(GscObj23) && *reinterpret_cast(file) == 0xa0d4353478a; @@ -1101,6 +1101,356 @@ class MW23GSCOBJHandler : public GSCOBJHandler { } }; + +/*****************************************************************************************************************************/ + +class MW23BGSCOBJHandler : public GSCOBJHandler { +public: + MW23BGSCOBJHandler(byte* file, size_t fileSize) : GSCOBJHandler(file, fileSize, GOHF_ANIMTREE | GOHF_ANIMTREE_DOUBLE | GOHF_FOREACH_TYPE_JUP) {} + + void DumpHeader(std::ostream& asmout, const GscInfoOption& opt) override { + auto* data = Ptr(); + asmout + << std::left << std::setfill(' ') + << "// size ...... " << std::dec << std::setw(3) << data->size1 << " (0x" << std::hex << data->size1 << ")" << "\n" + << "// includes .. " << std::dec << std::setw(3) << data->includes_count << " (offset: 0x" << std::hex << data->include_table << ")\n" + << "// strings ... " << std::dec << std::setw(3) << data->string_count << " (offset: 0x" << std::hex << data->string_table << ")\n" + << "// exports ... " << std::dec << std::setw(3) << data->export_count << " (offset: 0x" << std::hex << data->export_offset << ")\n" + << "// imports ... " << std::dec << std::setw(3) << data->imports_count << " (offset: 0x" << std::hex << data->import_table << ")\n" + << "// animtree1 . " << std::dec << std::setw(3) << data->animtree_use_count << " (offset: 0x" << std::hex << data->animtree_use_offset << ")\n" + << "// animtree2 . " << std::dec << std::setw(3) << data->animtree_count << " (offset: 0x" << std::hex << data->animtree_offset << ")\n" + //<< "// globals .. " << std::dec << std::setw(3) << data->globalvar_count << " (offset: 0x" << std::hex << data->globalvar_offset << ")\n" + << "// cseg ..... 0x" << std::hex << data->cseg_offset << " + 0x" << std::hex << data->cseg_size << "\n" + << std::right + << std::flush; + + if (opt.m_test_header) { + // fillme + asmout + << "unk16 :" << std::dec << std::setw(3) << (int)data->unk16 << " (0x" << std::hex << data->unk16 << ")\n" + << "unk1C :" << std::dec << std::setw(3) << (int)data->unk1C << " (0x" << std::hex << data->unk1C << ")\n" + << "unk22 :" << std::dec << std::setw(3) << (int)data->unk22 << " (0x" << std::hex << data->unk22 << ")\n" + << "unk26 :" << std::dec << std::setw(3) << (int)data->unk26 << " (0x" << std::hex << data->unk26 << ")\n" + << "unk28 :" << std::dec << std::setw(3) << (int)data->unk28 << " (0x" << std::hex << data->unk28 << ")\n" + << "unk2A :" << std::dec << std::setw(3) << (int)data->unk2A << " (0x" << std::hex << data->unk2A << ")\n" + << "unk3C :" << std::dec << std::setw(3) << (int)data->unk3C << " (0x" << std::hex << data->unk3C << ")\n" + << "unk48 :" << std::dec << std::setw(3) << (int)data->size1 << " (0x" << std::hex << data->size1 << ")\n" + << "unk54 :" << std::dec << std::setw(3) << (int)data->size2 << " (0x" << std::hex << data->size2 << ")\n" + << "unk5C :" << std::dec << std::setw(3) << (int)data->unk5C << " (0x" << std::hex << data->unk5C << ")\n" + ; + } + } + void DumpExperimental(std::ostream& asmout, const GscInfoOption& opt) override { + auto* data = Ptr(); + + if (opt.m_test_header) { + uintptr_t unk2c_location = reinterpret_cast(data->magic) + data->animtree_use_offset; + for (size_t i = 0; i < data->animtree_use_count; i++) { + const auto* unk2c = reinterpret_cast(unk2c_location); + + auto* s = Ptr(unk2c->address); + + asmout << std::hex << "animtree #" << s << std::endl; + + hashutils::Add(s, true, true); + + const auto* vars = reinterpret_cast(&unk2c[1]); + asmout << "location(s): "; + for (size_t j = 0; j < unk2c->num_address; j++) { + // no align, no opcode to pass, directly the fucking location, cool. + //Ref(vars[j]) = ref; + if (j) asmout << ","; + asmout << std::hex << vars[j]; + } + asmout << "\n"; + unk2c_location += sizeof(*unk2c) + sizeof(*vars) * unk2c->num_address; + } + if (data->animtree_use_count) { + asmout << "\n"; + } + + uintptr_t animt_location = reinterpret_cast(data->magic) + data->animtree_offset; + for (size_t i = 0; i < data->animtree_count; i++) { + const auto* animt = reinterpret_cast(animt_location); + + auto* s1 = Ptr(animt->address_str1); + auto* s2 = Ptr(animt->address_str2); + + hashutils::Add(s1, true, true); + hashutils::Add(s2, true, true); + + asmout << std::hex << "animtree " << s1 << "%" << s2 << std::endl; + + const auto* vars = reinterpret_cast(&animt[1]); + asmout << "location(s): "; + for (size_t j = 0; j < animt->num_address; j++) { + // no align, no opcode to pass, directly the fucking location, cool. + //Ref(vars[j]) = ref; + if (j) asmout << ","; + asmout << std::hex << vars[j]; + } + asmout << "\n"; + animt_location += sizeof(*animt) + sizeof(*vars) * animt->num_address; + } + if (data->animtree_count) { + asmout << "\n"; + } + } + } + + uint64_t GetName() override { + return Ptr()->name; + } + uint16_t GetExportsCount() override { + return Ptr()->export_count; + } + uint32_t GetExportsOffset() override { + return Ptr()->export_offset; + } + uint16_t GetIncludesCount() override { + return Ptr()->includes_count; + } + uint32_t GetIncludesOffset() override { + return Ptr()->include_table; + } + uint16_t GetImportsCount() override { + return Ptr()->imports_count; + } + uint32_t GetImportsOffset() override { + return Ptr()->import_table; + } + uint16_t GetGVarsCount() override { + return 0; //return Ptr()->globalvar_count; + } + uint32_t GetGVarsOffset() override { + return 0; //return Ptr()->globalvar_offset; + } + uint16_t GetStringsCount() override { + return Ptr()->string_count; + } + uint32_t GetStringsOffset() override { + return Ptr()->string_table; + } + uint32_t GetFileSize() override { + return Ptr()->size1; + } + size_t GetHeaderSize() override { + return sizeof(GscObj23); + } + char* DecryptString(char* str) override { + return str; // iw + } + bool IsValidHeader(size_t size) override { + return size >= sizeof(GscObj23) && *reinterpret_cast(file) == 0xa0d4353478b; + } + byte RemapFlagsImport(byte flags) override { + byte nflags{}; + + switch (flags & 0xF) { + case 1: nflags |= FUNCTION_CHILDTHREAD; break; // ScriptMethodThreadCallEndOn / ScriptThreadCallEndOn (same script?) + case 2: nflags |= METHOD_THREAD; break; // ScriptMethodThreadCall + case 3: nflags |= FUNCTION_CHILDTHREAD; break; // ScriptThreadCallEndOn (file namespace) + case 6: nflags |= FUNCTION_THREAD; break; // ScriptThreadCall (namspace?) + case 4: nflags |= FUNCTION; break; // ScriptFunctionCall (same script? / file namespace) + case 7: nflags |= FUNCTION; break; // ScriptFunctionCall (namespace?) + case 5: nflags |= FUNC_METHOD; break; // GetFunction (same namespace?) + case 8: // params(1) + CallBuiltinFunction + case 0xA:nflags |= FUNCTION; break; // api call / GetBuiltinFunction + case 9: // params(1) + CallBuiltinMethod + case 0xB:nflags |= METHOD; break; // api call / GetBuiltinMethod + default: nflags |= flags & 0xF; break; // wtf? + } + + if (flags & 0x10) nflags |= DEV_CALL; + if (flags & 0x20) nflags |= ACTS_USE_FULL_NAMESPACE; + + /* + 0x10: Dev import + 0x20: use file namespace + GetFunction = 0x5 + ScriptFunctionCall = 0x4, 0x7 + ScriptThreadCall = 0x2, 0x6 + ScriptThreadCallEndOn = 0x3, 0x1 + ScriptMethodCall = 0x7 + ScriptMethodThreadCall = 0x2 + ScriptMethodThreadCallEndOn = 0x1 + CallBuiltinFunction = 0x8 + CallBuiltinMethod = 0x9 + GetBuiltinFunction = 0xa + GetBuiltinMethod = 0xb + */ + + return nflags; + } + + byte MapFlagsImportToInt(byte flags) override { + byte nflags{}; + switch (flags & 0xF) { + case FUNC_METHOD: nflags |= 0x5; break; + case FUNCTION: nflags |= 0x4; break; + case METHOD: nflags |= 0x7; break; + case METHOD_CHILDTHREAD: + case FUNCTION_CHILDTHREAD: nflags |= 0x1; break; + case FUNCTION_THREAD: + case METHOD_THREAD: nflags |= 0x2; break; + case ACTS_CALL_BUILTIN_FUNCTION: nflags |= 0x8; break; + case ACTS_CALL_BUILTIN_METHOD: nflags |= 0x9; break; + case ACTS_GET_BUILTIN_FUNCTION: nflags |= 0xa; break; + case ACTS_GET_BUILTIN_METHOD: nflags |= 0xb; break; + default: nflags |= flags & 0xF; break; // wtf? + } + if (flags & DEV_CALL) nflags |= 0x10; + if (flags & ACTS_USE_FULL_NAMESPACE) nflags |= 0x20; + + return nflags; + } + + byte RemapFlagsExport(byte flags) override { + byte nflags{}; + if (flags & 1) { + nflags |= T8GSCExportFlags::AUTOEXEC; + } + if (flags & 2) { + nflags |= T8GSCExportFlags::LINKED; + } + if (flags & 4) { + nflags |= T8GSCExportFlags::PRIVATE; + } + if (flags & 0x40) { + nflags |= T8GSCExportFlags::VE; + } + + return nflags; + } + + byte MapFlagsExportToInt(byte flags) override { + byte nflags = 0; + + if (flags & AUTOEXEC) nflags |= 1; + if (flags & LINKED) nflags |= 2; + if (flags & PRIVATE) nflags |= 4; + if (flags & VE) nflags |= 0x40; + + return nflags; + } + uint16_t GetAnimTreeSingleCount() override { + return Ptr()->animtree_use_count; + }; + uint32_t GetAnimTreeSingleOffset() override { + return Ptr()->animtree_use_offset; + }; + uint16_t GetAnimTreeDoubleCount() override { + return Ptr()->animtree_count; + }; + uint32_t GetAnimTreeDoubleOffset() override { + return Ptr()->animtree_offset; + }; + + void SetName(uint64_t name) override { + Ptr()->name = name; + } + void SetHeader() override { + Ref() = 0xa0d4353478a; + } + void SetExportsCount(uint16_t val) override { + Ptr()->export_count = val; + } + void SetExportsOffset(uint32_t val) override { + Ptr()->export_offset = val; + } + void SetIncludesCount(uint16_t val) override { + Ptr()->includes_count = val; + } + void SetIncludesOffset(uint32_t val) override { + Ptr()->include_table = val; + } + void SetImportsCount(uint16_t val) override { + Ptr()->imports_count = val; + } + void SetImportsOffset(uint32_t val) override { + Ptr()->import_table = val; + } + void SetStringsCount(uint16_t val) override { + Ptr()->string_count = val; + } + void SetStringsOffset(uint32_t val) override { + Ptr()->string_table = val; + } + void SetFileSize(uint32_t val) override { + // idk + Ptr()->size1 = val; + Ptr()->size2 = val; + } + void SetCSEGOffset(uint16_t val) override { + Ptr()->cseg_offset = val; + } + void SetCSEGSize(uint32_t val) override { + Ptr()->cseg_size = val; + } + void SetAnimTreeSingleCount(uint16_t val) override { + Ptr()->animtree_use_count = val; + } + void SetAnimTreeSingleOffset(uint32_t val) override { + Ptr()->animtree_use_offset = val; + } + void SetAnimTreeDoubleCount(uint16_t val) override { + Ptr()->animtree_count = val; + } + void SetAnimTreeDoubleOffset(uint32_t val) override { + Ptr()->animtree_offset = val; + } + void SetGVarsCount(uint16_t val) override {} + void SetGVarsOffset(uint32_t val) override {} + + size_t GetImportSize() override { + return sizeof(tool::gsc::IW23GSCImport); + } + size_t GetExportSize() override { + return sizeof(tool::gsc::IW23GSCExport); + } + size_t GetStringSize() override { + return sizeof(tool::gsc::T8GSCString); + } + size_t GetGVarSize() override { + return 0; + } + size_t GetAnimTreeSingleSize() override { + return sizeof(tool::gsc::GSC_USEANIMTREE_ITEM); + } + size_t GetAnimTreeDoubleSize() override { + return sizeof(tool::gsc::GSC_ANIMTREE_ITEM); + } + void WriteExport(byte* data, const tool::gsc::IW23GSCExport& item) override { + *reinterpret_cast(data) = item; + } + void WriteImport(byte* data, const tool::gsc::IW23GSCImport& item) override { + *reinterpret_cast(data) = item; + } + void WriteGVar(byte* data, const tool::gsc::T8GSCGlobalVar& item) override {} + void WriteString(byte* data, const tool::gsc::T8GSCString& item) override { + *reinterpret_cast(data) = item; + } + void WriteAnimTreeSingle(byte* data, const tool::gsc::GSC_USEANIMTREE_ITEM& item) override { + *reinterpret_cast(data) = item; + } + void WriteAnimTreeDouble(byte* data, const tool::gsc::GSC_ANIMTREE_ITEM& item) override { + *reinterpret_cast(data) = item; + } + int64_t GetDefaultChecksum(bool client) override { + return 0; // no checksum + } + void SetChecksum(uint64_t val) override { } + uint32_t GetChecksum() override { + return 0; + } + const char* GetDefaultName(bool client) override { + return ""; // idc + } + bool IsVTableImportFlags(byte flags) override { + return false; + } +}; + /*****************************************************************************************************************************/ class T7GSCOBJHandler : public GSCOBJHandler {