{"type": "func", "start": 4299241344, "end": 4299241505, "name": "GJSmartTemplate::rotateBlockType", "pseudocode": "// \n// GJSmartTemplate::rotateBlockType from 0x100413780 to 0x100413821 (161 bytes)\n// \n// 0 xrefs:\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::rotateBlockType(unsigned int a1, unsigned int a2)\n{\n  __int64 result; // rax\n  unsigned int v3; // ecx\n  unsigned int v4; // edx\n  int v5; // edi\n  unsigned int v6; // ecx\n  int v7; // edx\n  unsigned int v8; // edi\n  unsigned int v9; // edi\n\n  result = a1;\n  if ( (a1 & 0xFFFFFFFE) != 48 && (int)a2 > 0 )\n  {\n    if ( ((3054198967LL * ((a2 - 1) >> 1)) & 0x2000000000LL) != 0 )\n    {\n      v3 = a2;\n    }\n    else\n    {\n      v3 = a2 - 90;\n      v4 = a1 - 50;\n      if ( a1 - 50 <= 0x1A )\n      {\n        v5 = 134185215;\n        if ( _bittest(&v5, v4) )\n          result = *(unsigned int *)&a3_4[4 * v4];\n      }\n    }\n    if ( a2 >= 0x5B )\n    {\n      v6 = v3 - 1;\n      v7 = 134185215;\n      do\n      {\n        v8 = result - 50;\n        if ( (unsigned int)(result - 50) <= 0x1A && _bittest(&v7, v8) )\n          result = *(unsigned int *)&a3_4[4 * v8];\n        v9 = result - 50;\n        if ( (unsigned int)(result - 50) <= 0x1A )\n        {\n          if ( _bittest(&v7, v9) )\n            result = *(unsigned int *)&a3_4[4 * v9];\n        }\n        v6 -= 180;\n      }\n      while ( v6 < 0xFFFFFFA5 );\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJSmartTemplate::rotateBlockType from 0x100413780 to 0x100413821 (161 bytes)\n; \n; 0 xrefs:\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, 0x100413780\nmov     rbp, rsp                                                       ; +0x1, 0x100413781\nmov     eax, edi                                                       ; +0x4, 0x100413784\nmov     ecx, edi                                                       ; +0x6, 0x100413786\nand     ecx, 0FFFFFFFEh                                                ; +0x8, 0x100413788\ncmp     ecx, 30h ; '0'                                                 ; +0xb, 0x10041378b\nsetz    cl                                                             ; +0xe, 0x10041378e\ntest    esi, esi                                                       ; +0x11, 0x100413791\nsetle   dl                                                             ; +0x13, 0x100413793\nor      dl, cl                                                         ; +0x16, 0x100413796\njnz     short loc_1004137D9                                            ; +0x18, 0x100413798\nlea     ecx, [rsi-1]                                                   ; +0x1a, 0x10041379a\nshr     ecx, 1                                                         ; +0x1d, 0x10041379d\nmov     edx, 0B60B60B7h                                                ; +0x1f, 0x10041379f\nimul    rdx, rcx                                                       ; +0x24, 0x1004137a4\nbt      rdx, 25h ; '%'                                                 ; +0x28, 0x1004137a8\njb      short loc_1004137D2                                            ; +0x2d, 0x1004137ad\nlea     ecx, [rsi-5Ah]                                                 ; +0x2f, 0x1004137af\nlea     edx, [rax-32h]                                                 ; +0x32, 0x1004137b2\ncmp     edx, 1Ah                                                       ; +0x35, 0x1004137b5\nja      short loc_1004137D4                                            ; +0x38, 0x1004137b8\nmov     edi, 7FF80FFh                                                  ; +0x3a, 0x1004137ba\nbt      edi, edx                                                       ; +0x3f, 0x1004137bf\njnb     short loc_1004137D4                                            ; +0x42, 0x1004137c2\nmov     eax, edx                                                       ; +0x44, 0x1004137c4\nlea     rdx, a3_4; \"3\"                                                 ; +0x46, 0x1004137c6\nmov     eax, [rdx+rax*4]                                               ; +0x4d, 0x1004137cd\njmp     short loc_1004137D4                                            ; +0x50, 0x1004137d0\nmov     ecx, esi                                                       ; +0x52, 0x1004137d2\ncmp     esi, 5Bh ; '['                                                 ; +0x54, 0x1004137d4\njnb     short loc_1004137DB                                            ; +0x57, 0x1004137d7\npop     rbp                                                            ; +0x59, 0x1004137d9\nretn                                                                   ; +0x5a, 0x1004137da\ndec     ecx                                                            ; +0x5b, 0x1004137db\nmov     edx, 7FF80FFh                                                  ; +0x5d, 0x1004137dd\nlea     rsi, a3_4; \"3\"                                                 ; +0x62, 0x1004137e2\njmp     short loc_1004137FB                                            ; +0x69, 0x1004137e9\nalign 10h                                                              ; +0x6b, 0x1004137eb\nadd     ecx, 0FFFFFF4Ch                                                ; +0x70, 0x1004137f0\ncmp     ecx, 0FFFFFFA5h                                                ; +0x76, 0x1004137f6\njnb     short loc_1004137D9                                            ; +0x79, 0x1004137f9\nlea     edi, [rax-32h]                                                 ; +0x7b, 0x1004137fb\ncmp     edi, 1Ah                                                       ; +0x7e, 0x1004137fe\nja      short loc_10041380D                                            ; +0x81, 0x100413801\nbt      edx, edi                                                       ; +0x83, 0x100413803\njnb     short loc_10041380D                                            ; +0x86, 0x100413806\nmov     eax, edi                                                       ; +0x88, 0x100413808\nmov     eax, [rsi+rax*4]                                               ; +0x8a, 0x10041380a\nlea     edi, [rax-32h]                                                 ; +0x8d, 0x10041380d\ncmp     edi, 1Ah                                                       ; +0x90, 0x100413810\nja      short loc_1004137F0                                            ; +0x93, 0x100413813\nbt      edx, edi                                                       ; +0x95, 0x100413815\njnb     short loc_1004137F0                                            ; +0x98, 0x100413818\nmov     eax, edi                                                       ; +0x9a, 0x10041381a\nmov     eax, [rsi+rax*4]                                               ; +0x9c, 0x10041381c\njmp     short loc_1004137F0                                            ; +0x9f, 0x10041381f", "xrefs": [], "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"}