{"type": "func", "start": 4299237424, "end": 4299237938, "name": "GJSmartTemplate::flipKey", "pseudocode": "// \n// GJSmartTemplate::flipKey from 0x100412830 to 0x100412a32 (514 bytes)\n// \n// 4 xrefs:\n// > GJSmartTemplate::scanForPrefab @ 0x100410c28\n// > GJSmartTemplate::scanForPrefab @ 0x100410d51\n// > GJSmartTemplate::scanForPrefab @ 0x100410e80\n// > GJSmartTemplate::scanForPrefab @ 0x100410e96\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:30:10 +0000\n// \n\nstd::string *__fastcall GJSmartTemplate::flipKey(\n        std::string *a1,\n        std::string *a2,\n        unsigned __int8 a3,\n        unsigned __int8 a4)\n{\n  unsigned int v6; // r12d\n  unsigned int v7; // ebx\n  unsigned int v8; // eax\n  unsigned int v9; // r13d\n  unsigned int v10; // ecx\n  unsigned int 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  unsigned int v18; // [rsp+18h] [rbp-48h]\n  std::string::value_type v19; // [rsp+18h] [rbp-48h]\n  unsigned int v20; // [rsp+20h] [rbp-40h]\n  unsigned int v21; // [rsp+24h] [rbp-3Ch]\n  unsigned int v22; // [rsp+28h] [rbp-38h]\n  std::string::value_type v23; // [rsp+28h] [rbp-38h]\n  unsigned int v24; // [rsp+2Ch] [rbp-34h]\n  std::string::value_type v25; // [rsp+2Ch] [rbp-34h]\n  unsigned int v26; // [rsp+30h] [rbp-30h]\n  std::string::value_type v27; // [rsp+30h] [rbp-30h]\n  unsigned int v28; // [rsp+34h] [rbp-2Ch]\n  unsigned int 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 0x100412830 to 0x100412a32 (514 bytes)\n; \n; 4 xrefs:\n; > GJSmartTemplate::scanForPrefab @ 0x100410c28\n; > GJSmartTemplate::scanForPrefab @ 0x100410d51\n; > GJSmartTemplate::scanForPrefab @ 0x100410e80\n; > GJSmartTemplate::scanForPrefab @ 0x100410e96\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:30:10 +0000\n; \npush    rbp                                                            ; +0x0, 0x100412830\nmov     rbp, rsp                                                       ; +0x1, 0x100412831\npush    r15                                                            ; +0x4, 0x100412834\npush    r14                                                            ; +0x6, 0x100412836\npush    r13                                                            ; +0x8, 0x100412838\npush    r12                                                            ; +0xa, 0x10041283a\npush    rbx                                                            ; +0xc, 0x10041283c\nsub     rsp, 38h                                                       ; +0xd, 0x10041283d\nmov     r14d, ecx                                                      ; +0x11, 0x100412841\nmov     r15d, edx                                                      ; +0x14, 0x100412844\nmov     r13, rsi                                                       ; +0x17, 0x100412847\nmov     eax, r15d                                                      ; +0x1a, 0x10041284a\nor      al, r14b                                                       ; +0x1d, 0x10041284d\njz      loc_100412922                                                  ; +0x20, 0x100412850\nmov     [rbp+var_58], rdi                                              ; +0x26, 0x100412856\nmov     rdi, r13; this                                                 ; +0x2a, 0x10041285a\nxor     esi, esi; __n                                                  ; +0x2d, 0x10041285d\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x2f, 0x10041285f\nmovsx   eax, byte ptr [rax]                                            ; +0x34, 0x100412864\nmov     [rbp+var_38], eax                                              ; +0x37, 0x100412867\nmov     esi, 1; __n                                                    ; +0x3a, 0x10041286a\nmov     rdi, r13; this                                                 ; +0x3f, 0x10041286f\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x42, 0x100412872\nmovsx   r12d, byte ptr [rax]                                           ; +0x47, 0x100412877\nmov     esi, 2; __n                                                    ; +0x4b, 0x10041287b\nmov     rdi, r13; this                                                 ; +0x50, 0x100412880\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x53, 0x100412883\nmovsx   eax, byte ptr [rax]                                            ; +0x58, 0x100412888\nmov     [rbp+var_2C], eax                                              ; +0x5b, 0x10041288b\nmov     esi, 3; __n                                                    ; +0x5e, 0x10041288e\nmov     rdi, r13; this                                                 ; +0x63, 0x100412893\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x66, 0x100412896\nmovsx   eax, byte ptr [rax]                                            ; +0x6b, 0x10041289b\nmov     [rbp+var_34], eax                                              ; +0x6e, 0x10041289e\nmov     esi, 4; __n                                                    ; +0x71, 0x1004128a1\nmov     rdi, r13; this                                                 ; +0x76, 0x1004128a6\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x79, 0x1004128a9\nmovsx   eax, byte ptr [rax]                                            ; +0x7e, 0x1004128ae\nmov     [rbp+var_48], eax                                              ; +0x81, 0x1004128b1\nmov     esi, 5; __n                                                    ; +0x84, 0x1004128b4\nmov     rdi, r13; this                                                 ; +0x89, 0x1004128b9\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x8c, 0x1004128bc\nmovsx   eax, byte ptr [rax]                                            ; +0x91, 0x1004128c1\nmov     [rbp+var_40], eax                                              ; +0x94, 0x1004128c4\nmov     esi, 6; __n                                                    ; +0x97, 0x1004128c7\nmov     rdi, r13; this                                                 ; +0x9c, 0x1004128cc\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0x9f, 0x1004128cf\nmovsx   eax, byte ptr [rax]                                            ; +0xa4, 0x1004128d4\nmov     [rbp+var_3C], eax                                              ; +0xa7, 0x1004128d7\nmov     esi, 7; __n                                                    ; +0xaa, 0x1004128da\nmov     rdi, r13; this                                                 ; +0xaf, 0x1004128df\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xb2, 0x1004128e2\nmovsx   ebx, byte ptr [rax]                                            ; +0xb7, 0x1004128e7\nmov     esi, 8; __n                                                    ; +0xba, 0x1004128ea\nmov     rdi, r13; this                                                 ; +0xbf, 0x1004128ef\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE2atEm; std::string::at(ulong) ; +0xc2, 0x1004128f2\nmovsx   eax, byte ptr [rax]                                            ; +0xc7, 0x1004128f7\ntest    r15b, r15b                                                     ; +0xca, 0x1004128fa\njz      short loc_10041294A                                            ; +0xcd, 0x1004128fd\nmov     r13d, [rbp+var_2C]                                             ; +0xcf, 0x1004128ff\nmov     ecx, [rbp+var_48]                                              ; +0xd3, 0x100412903\nmov     [rbp+var_30], ecx                                              ; +0xd6, 0x100412906\nmov     ecx, [rbp+var_34]                                              ; +0xd9, 0x100412909\nmov     [rbp+var_48], ecx                                              ; +0xdc, 0x10041290c\nmov     ecx, [rbp+var_3C]                                              ; +0xdf, 0x10041290f\nmov     [rbp+var_2C], ecx                                              ; +0xe2, 0x100412912\nmov     ecx, [rbp+var_40]                                              ; +0xe5, 0x100412915\nmov     [rbp+var_40], eax                                              ; +0xe8, 0x100412918\nmov     [rbp+var_3C], ebx                                              ; +0xeb, 0x10041291b\nmov     ebx, ecx                                                       ; +0xee, 0x10041291e\njmp     short loc_10041295C                                            ; +0xf0, 0x100412920\nmov     rax, [r13+10h]                                                 ; +0xf2, 0x100412922\nmov     [rdi+10h], rax                                                 ; +0xf6, 0x100412926\nmovups  xmm0, xmmword ptr [r13+0]                                      ; +0xfa, 0x10041292a\nmovups  xmmword ptr [rdi], xmm0                                        ; +0xff, 0x10041292f\nxorps   xmm0, xmm0                                                     ; +0x102, 0x100412932\nmovups  xmmword ptr [r13+0], xmm0                                      ; +0x105, 0x100412935\nmov     qword ptr [r13+10h], 0                                         ; +0x10a, 0x10041293a\nmov     rax, rdi                                                       ; +0x112, 0x100412942\njmp     loc_100412A23                                                  ; +0x115, 0x100412945\nmov     r13d, r12d                                                     ; +0x11a, 0x10041294a\nmov     r12d, [rbp+var_2C]                                             ; +0x11d, 0x10041294d\nmov     ecx, [rbp+var_34]                                              ; +0x121, 0x100412951\nmov     [rbp+var_30], ecx                                              ; +0x124, 0x100412954\nmov     [rbp+var_2C], ebx                                              ; +0x127, 0x100412957\nmov     ebx, eax                                                       ; +0x12a, 0x10041295a\nmovzx   r15d, r15b                                                     ; +0x12c, 0x10041295c\nmovzx   r14d, r14b                                                     ; +0x130, 0x100412960\nmov     edi, [rbp+var_38]                                              ; +0x134, 0x100412964\nmov     esi, r15d                                                      ; +0x137, 0x100412967\nmov     edx, r14d                                                      ; +0x13a, 0x10041296a\ncall    GJSmartTemplate__flipBlockType                                 ; +0x13d, 0x10041296d\nmov     [rbp+var_38], eax                                              ; +0x142, 0x100412972\nmov     edi, r12d                                                      ; +0x145, 0x100412975\nmov     esi, r15d                                                      ; +0x148, 0x100412978\nmov     edx, r14d                                                      ; +0x14b, 0x10041297b\ncall    GJSmartTemplate__flipBlockType                                 ; +0x14e, 0x10041297e\nmov     [rbp+var_34], eax                                              ; +0x153, 0x100412983\nmov     edi, r13d                                                      ; +0x156, 0x100412986\nmov     esi, r15d                                                      ; +0x159, 0x100412989\nmov     edx, r14d                                                      ; +0x15c, 0x10041298c\ncall    GJSmartTemplate__flipBlockType                                 ; +0x15f, 0x10041298f\nmov     [rbp+var_4C], eax                                              ; +0x164, 0x100412994\nmov     edi, [rbp+var_30]                                              ; +0x167, 0x100412997\nmov     esi, r15d                                                      ; +0x16a, 0x10041299a\nmov     edx, r14d                                                      ; +0x16d, 0x10041299d\ncall    GJSmartTemplate__flipBlockType                                 ; +0x170, 0x1004129a0\nmov     [rbp+var_30], eax                                              ; +0x175, 0x1004129a5\nmov     edi, [rbp+var_48]                                              ; +0x178, 0x1004129a8\nmov     esi, r15d                                                      ; +0x17b, 0x1004129ab\nmov     edx, r14d                                                      ; +0x17e, 0x1004129ae\ncall    GJSmartTemplate__flipBlockType                                 ; +0x181, 0x1004129b1\nmov     r13d, eax                                                      ; +0x186, 0x1004129b6\nmov     edi, [rbp+var_2C]                                              ; +0x189, 0x1004129b9\nmov     esi, r15d                                                      ; +0x18c, 0x1004129bc\nmov     edx, r14d                                                      ; +0x18f, 0x1004129bf\ncall    GJSmartTemplate__flipBlockType                                 ; +0x192, 0x1004129c2\nmov     qword ptr [rbp+var_48], rax                                    ; +0x197, 0x1004129c7\nmov     edi, ebx                                                       ; +0x19b, 0x1004129cb\nmov     esi, r15d                                                      ; +0x19d, 0x1004129cd\nmov     edx, r14d                                                      ; +0x1a0, 0x1004129d0\ncall    GJSmartTemplate__flipBlockType                                 ; +0x1a3, 0x1004129d3\nmov     ebx, eax                                                       ; +0x1a8, 0x1004129d8\nmov     edi, [rbp+var_40]                                              ; +0x1aa, 0x1004129da\nmov     esi, r15d                                                      ; +0x1ad, 0x1004129dd\nmov     edx, r14d                                                      ; +0x1b0, 0x1004129e0\ncall    GJSmartTemplate__flipBlockType                                 ; +0x1b3, 0x1004129e3\nmov     r12d, eax                                                      ; +0x1b8, 0x1004129e8\nmov     edi, [rbp+var_3C]                                              ; +0x1bb, 0x1004129eb\nmov     esi, r15d                                                      ; +0x1be, 0x1004129ee\nmov     edx, r14d                                                      ; +0x1c1, 0x1004129f1\ncall    GJSmartTemplate__flipBlockType                                 ; +0x1c4, 0x1004129f4\nmov     r14, [rbp+var_58]                                              ; +0x1c9, 0x1004129f9\nmov     rdi, r14; this                                                 ; +0x1cd, 0x1004129fd\nmov     esi, [rbp+var_38]                                              ; +0x1d0, 0x100412a00\nmov     edx, [rbp+var_34]                                              ; +0x1d3, 0x100412a03\nmov     ecx, [rbp+var_4C]                                              ; +0x1d6, 0x100412a06\nmov     r8d, [rbp+var_30]                                              ; +0x1d9, 0x100412a09\nmov     r9d, r13d                                                      ; +0x1dd, 0x100412a0d\npush    rax; int                                                       ; +0x1e0, 0x100412a10\npush    r12; int                                                       ; +0x1e1, 0x100412a11\npush    rbx; int                                                       ; +0x1e3, 0x100412a13\npush    qword ptr [rbp+var_48]; int                                    ; +0x1e4, 0x100412a14\ncall    GJSmartTemplate__keyFromNeighbors_1                            ; +0x1e7, 0x100412a17\nadd     rsp, 20h                                                       ; +0x1ec, 0x100412a1c\nmov     rax, r14                                                       ; +0x1f0, 0x100412a20\nadd     rsp, 38h                                                       ; +0x1f3, 0x100412a23\npop     rbx                                                            ; +0x1f7, 0x100412a27\npop     r12                                                            ; +0x1f8, 0x100412a28\npop     r13                                                            ; +0x1fa, 0x100412a2a\npop     r14                                                            ; +0x1fc, 0x100412a2c\npop     r15                                                            ; +0x1fe, 0x100412a2e\npop     rbp                                                            ; +0x200, 0x100412a30\nretn                                                                   ; +0x201, 0x100412a31", "xrefs": ["GJSmartTemplate::scanForPrefab @ 0x100410c28", "GJSmartTemplate::scanForPrefab @ 0x100410d51", "GJSmartTemplate::scanForPrefab @ 0x100410e80", "GJSmartTemplate::scanForPrefab @ 0x100410e96"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}