{"type": "func", "start": 4299316160, "end": 4299316674, "name": "GJSmartTemplate::flipKey", "pseudocode": "// \n// GJSmartTemplate::flipKey from 0x100425bc0 to 0x100425dc2 (514 bytes)\n// \n// 4 xrefs:\n// > GJSmartTemplate::scanForPrefab @ 0x100423fb8\n// > GJSmartTemplate::scanForPrefab @ 0x1004240e1\n// > GJSmartTemplate::scanForPrefab @ 0x100424210\n// > GJSmartTemplate::scanForPrefab @ 0x100424226\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nstd::string *__fastcall GJSmartTemplate::flipKey(std::string *a1, std::string *a2, bool a3, bool a4)\n{\n  SmartBlockType v6; // r12d\n  SmartBlockType v7; // ebx\n  SmartBlockType v8; // eax\n  SmartBlockType v9; // r13d\n  SmartBlockType v10; // ecx\n  SmartBlockType v11; // ebx\n  std::string::value_type v13; // r13\n  std::string::value_type v14; // bl\n  std::string::value_type v15; // r12\n  std::string::value_type v16; // al\n  std::string::value_type v17; // [rsp+14h] [rbp-4Ch]\n  SmartBlockType v18; // [rsp+18h] [rbp-48h]\n  std::string::value_type v19; // [rsp+18h] [rbp-48h]\n  SmartBlockType v20; // [rsp+20h] [rbp-40h]\n  SmartBlockType v21; // [rsp+24h] [rbp-3Ch]\n  SmartBlockType v22; // [rsp+28h] [rbp-38h]\n  std::string::value_type v23; // [rsp+28h] [rbp-38h]\n  SmartBlockType v24; // [rsp+2Ch] [rbp-34h]\n  std::string::value_type v25; // [rsp+2Ch] [rbp-34h]\n  SmartBlockType v26; // [rsp+30h] [rbp-30h]\n  std::string::value_type v27; // [rsp+30h] [rbp-30h]\n  SmartBlockType v28; // [rsp+34h] [rbp-2Ch]\n  SmartBlockType v29; // [rsp+34h] [rbp-2Ch]\n\n  if ( a4 || a3 )\n  {\n    v22 = *std::string::at(a2, 0);\n    v6 = *std::string::at(a2, 1u);\n    v28 = *std::string::at(a2, 2u);\n    v24 = *std::string::at(a2, 3u);\n    v18 = *std::string::at(a2, 4u);\n    v20 = *std::string::at(a2, 5u);\n    v21 = *std::string::at(a2, 6u);\n    v7 = *std::string::at(a2, 7u);\n    v8 = *std::string::at(a2, 8u);\n    if ( a3 )\n    {\n      v9 = v28;\n      v26 = v18;\n      v18 = v24;\n      v29 = v21;\n      v10 = v20;\n      v20 = v8;\n      v21 = v7;\n      v11 = v10;\n    }\n    else\n    {\n      v9 = v6;\n      v6 = v28;\n      v26 = v24;\n      v29 = v7;\n      v11 = v8;\n    }\n    v23 = GJSmartTemplate::flipBlockType(v22, a3, a4);\n    v25 = GJSmartTemplate::flipBlockType(v6, a3, a4);\n    v17 = GJSmartTemplate::flipBlockType(v9, a3, a4);\n    v27 = GJSmartTemplate::flipBlockType(v26, a3, a4);\n    v13 = GJSmartTemplate::flipBlockType(v18, a3, a4);\n    v19 = GJSmartTemplate::flipBlockType(v29, a3, a4);\n    v14 = GJSmartTemplate::flipBlockType(v11, a3, a4);\n    v15 = GJSmartTemplate::flipBlockType(v20, a3, a4);\n    v16 = GJSmartTemplate::flipBlockType(v21, a3, a4);\n    GJSmartTemplate::keyFromNeighbors_1(a1, v23, v25, v17, v27, v13, v19, v14, v15, v16);\n    return a1;\n  }\n  else\n  {\n    a1->__r_.__value_.__r.__words[2] = a2->__r_.__value_.__r.__words[2];\n    *(_OWORD *)&a1->__r_.__value_.__l.0 = *(_OWORD *)&a2->__r_.__value_.__l.0;\n    *(_OWORD *)&a2->__r_.__value_.__l.0 = 0;\n    a2->__r_.__value_.__r.__words[2] = 0;\n    return a1;\n  }\n}", "assembly": "; \n; GJSmartTemplate::flipKey from 0x100425bc0 to 0x100425dc2 (514 bytes)\n; \n; 4 xrefs:\n; > GJSmartTemplate::scanForPrefab @ 0x100423fb8\n; > GJSmartTemplate::scanForPrefab @ 0x1004240e1\n; > GJSmartTemplate::scanForPrefab @ 0x100424210\n; > GJSmartTemplate::scanForPrefab @ 0x100424226\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbp                                                            ; +0x0, 0x100425bc0\nmov     rbp, rsp                                                       ; +0x1, 0x100425bc1\npush    r15                                                            ; +0x4, 0x100425bc4\npush    r14                                                            ; +0x6, 0x100425bc6\npush    r13                                                            ; +0x8, 0x100425bc8\npush    r12                                                            ; +0xa, 0x100425bca\npush    rbx                                                            ; +0xc, 0x100425bcc\nsub     rsp, 38h                                                       ; +0xd, 0x100425bcd\nmov     r14d, ecx                                                      ; +0x11, 0x100425bd1\nmov     r15d, edx                                                      ; +0x14, 0x100425bd4\nmov     r13, rsi                                                       ; +0x17, 0x100425bd7\nmov     eax, r15d                                                      ; +0x1a, 0x100425bda\nor      al, r14b                                                       ; +0x1d, 0x100425bdd\njz      loc_100425CB2                                                  ; +0x20, 0x100425be0\nmov     [rbp+var_58], rdi                                              ; +0x26, 0x100425be6\nmov     rdi, r13; this                                                 ; +0x2a, 0x100425bea\nxor     esi, esi; __n                                                  ; +0x2d, 0x100425bed\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x2f, 0x100425bef\nmovsx   eax, byte ptr [rax]                                            ; +0x34, 0x100425bf4\nmov     [rbp+var_38], eax                                              ; +0x37, 0x100425bf7\nmov     esi, 1; __n                                                    ; +0x3a, 0x100425bfa\nmov     rdi, r13; this                                                 ; +0x3f, 0x100425bff\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x42, 0x100425c02\nmovsx   r12d, byte ptr [rax]                                           ; +0x47, 0x100425c07\nmov     esi, 2; __n                                                    ; +0x4b, 0x100425c0b\nmov     rdi, r13; this                                                 ; +0x50, 0x100425c10\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x53, 0x100425c13\nmovsx   eax, byte ptr [rax]                                            ; +0x58, 0x100425c18\nmov     [rbp+var_2C], eax                                              ; +0x5b, 0x100425c1b\nmov     esi, 3; __n                                                    ; +0x5e, 0x100425c1e\nmov     rdi, r13; this                                                 ; +0x63, 0x100425c23\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x66, 0x100425c26\nmovsx   eax, byte ptr [rax]                                            ; +0x6b, 0x100425c2b\nmov     [rbp+var_34], eax                                              ; +0x6e, 0x100425c2e\nmov     esi, 4; __n                                                    ; +0x71, 0x100425c31\nmov     rdi, r13; this                                                 ; +0x76, 0x100425c36\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x79, 0x100425c39\nmovsx   eax, byte ptr [rax]                                            ; +0x7e, 0x100425c3e\nmov     [rbp+var_48], eax                                              ; +0x81, 0x100425c41\nmov     esi, 5; __n                                                    ; +0x84, 0x100425c44\nmov     rdi, r13; this                                                 ; +0x89, 0x100425c49\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x8c, 0x100425c4c\nmovsx   eax, byte ptr [rax]                                            ; +0x91, 0x100425c51\nmov     [rbp+var_40], eax                                              ; +0x94, 0x100425c54\nmov     esi, 6; __n                                                    ; +0x97, 0x100425c57\nmov     rdi, r13; this                                                 ; +0x9c, 0x100425c5c\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x9f, 0x100425c5f\nmovsx   eax, byte ptr [rax]                                            ; +0xa4, 0x100425c64\nmov     [rbp+var_3C], eax                                              ; +0xa7, 0x100425c67\nmov     esi, 7; __n                                                    ; +0xaa, 0x100425c6a\nmov     rdi, r13; this                                                 ; +0xaf, 0x100425c6f\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xb2, 0x100425c72\nmovsx   ebx, byte ptr [rax]                                            ; +0xb7, 0x100425c77\nmov     esi, 8; __n                                                    ; +0xba, 0x100425c7a\nmov     rdi, r13; this                                                 ; +0xbf, 0x100425c7f\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xc2, 0x100425c82\nmovsx   eax, byte ptr [rax]                                            ; +0xc7, 0x100425c87\ntest    r15b, r15b                                                     ; +0xca, 0x100425c8a\njz      short loc_100425CDA                                            ; +0xcd, 0x100425c8d\nmov     r13d, [rbp+var_2C]                                             ; +0xcf, 0x100425c8f\nmov     ecx, [rbp+var_48]                                              ; +0xd3, 0x100425c93\nmov     [rbp+var_30], ecx                                              ; +0xd6, 0x100425c96\nmov     ecx, [rbp+var_34]                                              ; +0xd9, 0x100425c99\nmov     [rbp+var_48], ecx                                              ; +0xdc, 0x100425c9c\nmov     ecx, [rbp+var_3C]                                              ; +0xdf, 0x100425c9f\nmov     [rbp+var_2C], ecx                                              ; +0xe2, 0x100425ca2\nmov     ecx, [rbp+var_40]                                              ; +0xe5, 0x100425ca5\nmov     [rbp+var_40], eax                                              ; +0xe8, 0x100425ca8\nmov     [rbp+var_3C], ebx                                              ; +0xeb, 0x100425cab\nmov     ebx, ecx                                                       ; +0xee, 0x100425cae\njmp     short loc_100425CEC                                            ; +0xf0, 0x100425cb0\nmov     rax, [r13+10h]                                                 ; +0xf2, 0x100425cb2\nmov     [rdi+10h], rax                                                 ; +0xf6, 0x100425cb6\nmovups  xmm0, xmmword ptr [r13+0]                                      ; +0xfa, 0x100425cba\nmovups  xmmword ptr [rdi], xmm0                                        ; +0xff, 0x100425cbf\nxorps   xmm0, xmm0                                                     ; +0x102, 0x100425cc2\nmovups  xmmword ptr [r13+0], xmm0                                      ; +0x105, 0x100425cc5\nmov     qword ptr [r13+10h], 0                                         ; +0x10a, 0x100425cca\nmov     rax, rdi                                                       ; +0x112, 0x100425cd2\njmp     loc_100425DB3                                                  ; +0x115, 0x100425cd5\nmov     r13d, r12d                                                     ; +0x11a, 0x100425cda\nmov     r12d, [rbp+var_2C]                                             ; +0x11d, 0x100425cdd\nmov     ecx, [rbp+var_34]                                              ; +0x121, 0x100425ce1\nmov     [rbp+var_30], ecx                                              ; +0x124, 0x100425ce4\nmov     [rbp+var_2C], ebx                                              ; +0x127, 0x100425ce7\nmov     ebx, eax                                                       ; +0x12a, 0x100425cea\nmovzx   r15d, r15b                                                     ; +0x12c, 0x100425cec\nmovzx   r14d, r14b                                                     ; +0x130, 0x100425cf0\nmov     edi, [rbp+var_38]                                              ; +0x134, 0x100425cf4\nmov     esi, r15d                                                      ; +0x137, 0x100425cf7\nmov     edx, r14d                                                      ; +0x13a, 0x100425cfa\ncall    GJSmartTemplate__flipBlockType                                 ; +0x13d, 0x100425cfd\nmov     [rbp+var_38], eax                                              ; +0x142, 0x100425d02\nmov     edi, r12d                                                      ; +0x145, 0x100425d05\nmov     esi, r15d                                                      ; +0x148, 0x100425d08\nmov     edx, r14d                                                      ; +0x14b, 0x100425d0b\ncall    GJSmartTemplate__flipBlockType                                 ; +0x14e, 0x100425d0e\nmov     [rbp+var_34], eax                                              ; +0x153, 0x100425d13\nmov     edi, r13d                                                      ; +0x156, 0x100425d16\nmov     esi, r15d                                                      ; +0x159, 0x100425d19\nmov     edx, r14d                                                      ; +0x15c, 0x100425d1c\ncall    GJSmartTemplate__flipBlockType                                 ; +0x15f, 0x100425d1f\nmov     [rbp+var_4C], eax                                              ; +0x164, 0x100425d24\nmov     edi, [rbp+var_30]                                              ; +0x167, 0x100425d27\nmov     esi, r15d                                                      ; +0x16a, 0x100425d2a\nmov     edx, r14d                                                      ; +0x16d, 0x100425d2d\ncall    GJSmartTemplate__flipBlockType                                 ; +0x170, 0x100425d30\nmov     [rbp+var_30], eax                                              ; +0x175, 0x100425d35\nmov     edi, [rbp+var_48]                                              ; +0x178, 0x100425d38\nmov     esi, r15d                                                      ; +0x17b, 0x100425d3b\nmov     edx, r14d                                                      ; +0x17e, 0x100425d3e\ncall    GJSmartTemplate__flipBlockType                                 ; +0x181, 0x100425d41\nmov     r13d, eax                                                      ; +0x186, 0x100425d46\nmov     edi, [rbp+var_2C]                                              ; +0x189, 0x100425d49\nmov     esi, r15d                                                      ; +0x18c, 0x100425d4c\nmov     edx, r14d                                                      ; +0x18f, 0x100425d4f\ncall    GJSmartTemplate__flipBlockType                                 ; +0x192, 0x100425d52\nmov     qword ptr [rbp+var_48], rax                                    ; +0x197, 0x100425d57\nmov     edi, ebx                                                       ; +0x19b, 0x100425d5b\nmov     esi, r15d                                                      ; +0x19d, 0x100425d5d\nmov     edx, r14d                                                      ; +0x1a0, 0x100425d60\ncall    GJSmartTemplate__flipBlockType                                 ; +0x1a3, 0x100425d63\nmov     ebx, eax                                                       ; +0x1a8, 0x100425d68\nmov     edi, [rbp+var_40]                                              ; +0x1aa, 0x100425d6a\nmov     esi, r15d                                                      ; +0x1ad, 0x100425d6d\nmov     edx, r14d                                                      ; +0x1b0, 0x100425d70\ncall    GJSmartTemplate__flipBlockType                                 ; +0x1b3, 0x100425d73\nmov     r12d, eax                                                      ; +0x1b8, 0x100425d78\nmov     edi, [rbp+var_3C]                                              ; +0x1bb, 0x100425d7b\nmov     esi, r15d                                                      ; +0x1be, 0x100425d7e\nmov     edx, r14d                                                      ; +0x1c1, 0x100425d81\ncall    GJSmartTemplate__flipBlockType                                 ; +0x1c4, 0x100425d84\nmov     r14, [rbp+var_58]                                              ; +0x1c9, 0x100425d89\nmov     rdi, r14; this                                                 ; +0x1cd, 0x100425d8d\nmov     esi, [rbp+var_38]                                              ; +0x1d0, 0x100425d90\nmov     edx, [rbp+var_34]                                              ; +0x1d3, 0x100425d93\nmov     ecx, [rbp+var_4C]                                              ; +0x1d6, 0x100425d96\nmov     r8d, [rbp+var_30]                                              ; +0x1d9, 0x100425d99\nmov     r9d, r13d                                                      ; +0x1dd, 0x100425d9d\npush    rax; int                                                       ; +0x1e0, 0x100425da0\npush    r12; int                                                       ; +0x1e1, 0x100425da1\npush    rbx; int                                                       ; +0x1e3, 0x100425da3\npush    qword ptr [rbp+var_48]; int                                    ; +0x1e4, 0x100425da4\ncall    GJSmartTemplate__keyFromNeighbors_1                            ; +0x1e7, 0x100425da7\nadd     rsp, 20h                                                       ; +0x1ec, 0x100425dac\nmov     rax, r14                                                       ; +0x1f0, 0x100425db0\nadd     rsp, 38h                                                       ; +0x1f3, 0x100425db3\npop     rbx                                                            ; +0x1f7, 0x100425db7\npop     r12                                                            ; +0x1f8, 0x100425db8\npop     r13                                                            ; +0x1fa, 0x100425dba\npop     r14                                                            ; +0x1fc, 0x100425dbc\npop     r15                                                            ; +0x1fe, 0x100425dbe\npop     rbp                                                            ; +0x200, 0x100425dc0\nretn                                                                   ; +0x201, 0x100425dc1", "xrefs": ["GJSmartTemplate::scanForPrefab @ 0x100423fb8", "GJSmartTemplate::scanForPrefab @ 0x1004240e1", "GJSmartTemplate::scanForPrefab @ 0x100424210", "GJSmartTemplate::scanForPrefab @ 0x100424226"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}