{"type": "func", "start": 4299241584, "end": 4299241686, "name": "GJSmartTemplate::flipBlockType", "pseudocode": "// \n// GJSmartTemplate::flipBlockType from 0x100413870 to 0x1004138d6 (102 bytes)\n// \n// 9 xrefs:\n// > GJSmartTemplate::flipKey @ 0x10041296d\n// > GJSmartTemplate::flipKey @ 0x10041297e\n// > GJSmartTemplate::flipKey @ 0x10041298f\n// > GJSmartTemplate::flipKey @ 0x1004129a0\n// > GJSmartTemplate::flipKey @ 0x1004129b1\n// > GJSmartTemplate::flipKey @ 0x1004129c2\n// > GJSmartTemplate::flipKey @ 0x1004129d3\n// > GJSmartTemplate::flipKey @ 0x1004129e3\n// > GJSmartTemplate::flipKey @ 0x1004129f4\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\n__int64 __fastcall GJSmartTemplate::flipBlockType(unsigned int a1, char a2, char a3)\n{\n  __int64 result; // rax\n  unsigned int v4; // ecx\n  unsigned int v5; // ecx\n\n  result = a1;\n  if ( !(((a1 & 0xFFFFFFFE) == 48) | (unsigned __int8)(a3 | a2) ^ 1) )\n  {\n    if ( a2 )\n    {\n      v4 = 51;\n      if ( a1 - 51 <= 0x19 )\n        v4 = *(_DWORD *)&a2_6[4 * a1 - 204];\n      if ( a3 )\n        goto LABEL_6;\n    }\n    else\n    {\n      v4 = a1;\n      if ( a3 )\n      {\nLABEL_6:\n        v5 = v4 - 51;\n        result = 52;\n        if ( v5 <= 0x19 )\n          return *(unsigned int *)&a5_5[4 * v5];\n        return result;\n      }\n    }\n    return v4;\n  }\n  return result;\n}", "assembly": "; \n; GJSmartTemplate::flipBlockType from 0x100413870 to 0x1004138d6 (102 bytes)\n; \n; 9 xrefs:\n; > GJSmartTemplate::flipKey @ 0x10041296d\n; > GJSmartTemplate::flipKey @ 0x10041297e\n; > GJSmartTemplate::flipKey @ 0x10041298f\n; > GJSmartTemplate::flipKey @ 0x1004129a0\n; > GJSmartTemplate::flipKey @ 0x1004129b1\n; > GJSmartTemplate::flipKey @ 0x1004129c2\n; > GJSmartTemplate::flipKey @ 0x1004129d3\n; > GJSmartTemplate::flipKey @ 0x1004129e3\n; > GJSmartTemplate::flipKey @ 0x1004129f4\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, 0x100413870\nmov     rbp, rsp                                                       ; +0x1, 0x100413871\nmov     eax, edi                                                       ; +0x4, 0x100413874\nmov     ecx, edi                                                       ; +0x6, 0x100413876\nand     ecx, 0FFFFFFFEh                                                ; +0x8, 0x100413878\ncmp     ecx, 30h ; '0'                                                 ; +0xb, 0x10041387b\nsetz    cl                                                             ; +0xe, 0x10041387e\nmov     edi, esi                                                       ; +0x11, 0x100413881\nor      dil, dl                                                        ; +0x13, 0x100413883\nxor     dil, 1                                                         ; +0x16, 0x100413886\nor      dil, cl                                                        ; +0x1a, 0x10041388a\njnz     short loc_1004138CA                                            ; +0x1d, 0x10041388d\ntest    sil, sil                                                       ; +0x1f, 0x10041388f\njz      short loc_1004138CC                                            ; +0x22, 0x100413892\nadd     eax, 0FFFFFFCDh                                                ; +0x24, 0x100413894\nmov     ecx, 33h ; '3'                                                 ; +0x27, 0x100413897\ncmp     eax, 19h                                                       ; +0x2c, 0x10041389c\nja      short loc_1004138AD                                            ; +0x2f, 0x10041389f\nmov     eax, eax                                                       ; +0x31, 0x1004138a1\nlea     rcx, a2_6; \"2\"                                                 ; +0x33, 0x1004138a3\nmov     ecx, [rcx+rax*4]                                               ; +0x3a, 0x1004138aa\ntest    dl, dl                                                         ; +0x3d, 0x1004138ad\njz      short loc_1004138D2                                            ; +0x3f, 0x1004138af\nadd     ecx, 0FFFFFFCDh                                                ; +0x41, 0x1004138b1\nmov     eax, 34h ; '4'                                                 ; +0x44, 0x1004138b4\ncmp     ecx, 19h                                                       ; +0x49, 0x1004138b9\nja      short loc_1004138CA                                            ; +0x4c, 0x1004138bc\nmov     eax, ecx                                                       ; +0x4e, 0x1004138be\nlea     rcx, a5_5; \"5\"                                                 ; +0x50, 0x1004138c0\nmov     eax, [rcx+rax*4]                                               ; +0x57, 0x1004138c7\npop     rbp                                                            ; +0x5a, 0x1004138ca\nretn                                                                   ; +0x5b, 0x1004138cb\nmov     ecx, eax                                                       ; +0x5c, 0x1004138cc\ntest    dl, dl                                                         ; +0x5e, 0x1004138ce\njnz     short loc_1004138B1                                            ; +0x60, 0x1004138d0\nmov     eax, ecx                                                       ; +0x62, 0x1004138d2\npop     rbp                                                            ; +0x64, 0x1004138d4\nretn                                                                   ; +0x65, 0x1004138d5", "xrefs": ["GJSmartTemplate::flipKey @ 0x10041296d", "GJSmartTemplate::flipKey @ 0x10041297e", "GJSmartTemplate::flipKey @ 0x10041298f", "GJSmartTemplate::flipKey @ 0x1004129a0", "GJSmartTemplate::flipKey @ 0x1004129b1", "GJSmartTemplate::flipKey @ 0x1004129c2", "GJSmartTemplate::flipKey @ 0x1004129d3", "GJSmartTemplate::flipKey @ 0x1004129e3", "GJSmartTemplate::flipKey @ 0x1004129f4"], "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"}