{"type": "func", "start": 6442724208, "end": 6442724397, "name": "sub_180042B70", "pseudocode": "// \n// sub_180042B70 from 0x180042b70 to 0x180042c2d (189 bytes)\n// \n// 7 xrefs:\n// > sub_180041D20 @ 0x180041df4\n// > sub_180041D20 @ 0x180041e3e\n// > sub_180041F40 @ 0x180041fbf\n// > sub_180041F40 @ 0x180042081\n// > sub_180041F40 @ 0x180042194\n// > sub_180042340 @ 0x18004239b\n// > sub_180042340 @ 0x18004248e\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 10:53:11 +0000\n// \n\n__int64 __fastcall sub_180042B70(__int64 a1, unsigned __int64 a2)\n{\n  __int64 result; // rax\n  unsigned __int64 v3; // r8\n\n  result = *(unsigned int *)(a1 + 32);\n  v3 = *(unsigned int *)(a1 + 28);\n  switch ( (_DWORD)result )\n  {\n    case 0:\n      a2 = (unsigned int)a2;\n      LODWORD(v3) = dword_1801ABCE0[((unsigned __int64)(unsigned int)a2 >> 24) ^ (v3 >> 8)] ^ ((unsigned __int8)v3 << 8);\n      goto LABEL_9;\n    case 8:\n      a2 = (unsigned int)a2;\nLABEL_9:\n      LODWORD(v3) = dword_1801ABCE0[((unsigned int)v3 ^ (a2 >> 8) & 0xFF00) >> 8] ^ ((unsigned __int8)v3 << 8);\nLABEL_10:\n      LODWORD(v3) = dword_1801ABCE0[((unsigned int)v3 ^ (unsigned __int64)((unsigned __int16)a2 & 0xFF00)) >> 8]\n                  ^ ((unsigned __int8)v3 << 8);\n      goto LABEL_11;\n    case 0x10:\n      goto LABEL_10;\n  }\n  if ( (_DWORD)result != 24 )\n  {\n    *(_DWORD *)(a1 + 32) = 0;\n    return result;\n  }\nLABEL_11:\n  result = dword_1801ABCE0[(unsigned __int8)a2 ^ ((unsigned __int64)(unsigned int)v3 >> 8)] ^ ((unsigned __int8)v3 << 8);\n  *(_QWORD *)(a1 + 28) = (unsigned int)result;\n  return result;\n}", "assembly": "; \n; sub_180042B70 from 0x180042b70 to 0x180042c2d (189 bytes)\n; \n; 7 xrefs:\n; > sub_180041D20 @ 0x180041df4\n; > sub_180041D20 @ 0x180041e3e\n; > sub_180041F40 @ 0x180041fbf\n; > sub_180041F40 @ 0x180042081\n; > sub_180041F40 @ 0x180042194\n; > sub_180042340 @ 0x18004239b\n; > sub_180042340 @ 0x18004248e\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 10:53:11 +0000\n; \nmov     eax, [rcx+20h]                                                 ; +0x0, 0x180042b70\nlea     r10, dword_1801ABCE0                                           ; +0x3, 0x180042b73\nmov     r8d, [rcx+1Ch]                                                 ; +0xa, 0x180042b7a\nmov     r9, rcx                                                        ; +0xe, 0x180042b7e\ntest    eax, eax                                                       ; +0x11, 0x180042b81\njz      short loc_180042BA8                                            ; +0x13, 0x180042b83\ncmp     eax, 8                                                         ; +0x15, 0x180042b85\njz      short loc_180042BA4                                            ; +0x18, 0x180042b88\ncmp     eax, 10h                                                       ; +0x1a, 0x180042b8a\njz      short loc_180042BA0                                            ; +0x1d, 0x180042b8d\ncmp     eax, 18h                                                       ; +0x1f, 0x180042b8f\njnz     short loc_180042B98                                            ; +0x22, 0x180042b92\nmov     edx, edx                                                       ; +0x24, 0x180042b94\njmp     short loc_180042C08                                            ; +0x26, 0x180042b96\nmov     dword ptr [rcx+20h], 0                                         ; +0x28, 0x180042b98\nretn                                                                   ; +0x2f, 0x180042b9f\nmov     edx, edx                                                       ; +0x30, 0x180042ba0\njmp     short loc_180042BE9                                            ; +0x32, 0x180042ba2\nmov     edx, edx                                                       ; +0x34, 0x180042ba4\njmp     short loc_180042BC6                                            ; +0x36, 0x180042ba6\nmov     rcx, r8                                                        ; +0x38, 0x180042ba8\nmov     edx, edx                                                       ; +0x3b, 0x180042bab\nshr     rcx, 8                                                         ; +0x3d, 0x180042bad\nmov     eax, edx                                                       ; +0x41, 0x180042bb1\nshr     rax, 18h                                                       ; +0x43, 0x180042bb3\nmovzx   r8d, r8b                                                       ; +0x47, 0x180042bb7\nxor     rcx, rax                                                       ; +0x4b, 0x180042bbb\nshl     r8d, 8                                                         ; +0x4e, 0x180042bbe\nxor     r8d, [r10+rcx*4]                                               ; +0x52, 0x180042bc2\nmov     eax, r8d                                                       ; +0x56, 0x180042bc6\nmov     rcx, rdx                                                       ; +0x59, 0x180042bc9\nshr     rcx, 8                                                         ; +0x5c, 0x180042bcc\nand     ecx, 0FF00h                                                    ; +0x60, 0x180042bd0\nmovzx   r8d, r8b                                                       ; +0x66, 0x180042bd6\nxor     rcx, rax                                                       ; +0x6a, 0x180042bda\nshl     r8d, 8                                                         ; +0x6d, 0x180042bdd\nshr     rcx, 8                                                         ; +0x71, 0x180042be1\nxor     r8d, [r10+rcx*4]                                               ; +0x75, 0x180042be5\nmov     eax, r8d                                                       ; +0x79, 0x180042be9\nmov     rcx, rdx                                                       ; +0x7c, 0x180042bec\nand     ecx, 0FF00h                                                    ; +0x7f, 0x180042bef\nmovzx   r8d, r8b                                                       ; +0x85, 0x180042bf5\nxor     rcx, rax                                                       ; +0x89, 0x180042bf9\nshl     r8d, 8                                                         ; +0x8c, 0x180042bfc\nshr     rcx, 8                                                         ; +0x90, 0x180042c00\nxor     r8d, [r10+rcx*4]                                               ; +0x94, 0x180042c04\nmovzx   eax, dl                                                        ; +0x98, 0x180042c08\nmov     ecx, r8d                                                       ; +0x9b, 0x180042c0b\nshr     rcx, 8                                                         ; +0x9e, 0x180042c0e\nxor     rcx, rax                                                       ; +0xa2, 0x180042c12\nmovzx   eax, r8b                                                       ; +0xa5, 0x180042c15\nshl     eax, 8                                                         ; +0xa9, 0x180042c19\nxor     eax, [r10+rcx*4]                                               ; +0xac, 0x180042c1c\nmov     [r9+1Ch], eax                                                  ; +0xb0, 0x180042c20\nmov     dword ptr [r9+20h], 0                                          ; +0xb4, 0x180042c24\nretn                                                                   ; +0xbc, 0x180042c2c", "xrefs": ["sub_180041D20 @ 0x180041df4", "sub_180041D20 @ 0x180041e3e", "sub_180041F40 @ 0x180041fbf", "sub_180041F40 @ 0x180042081", "sub_180041F40 @ 0x180042194", "sub_180042340 @ 0x18004239b", "sub_180042340 @ 0x18004248e"], "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"}