{"type": "func", "start": 6443268976, "end": 6443269319, "name": "sub_1800C7B70", "pseudocode": "// \n// sub_1800C7B70 from 0x1800c7b70 to 0x1800c7cc7 (343 bytes)\n// \n// 4 xrefs:\n// > sub_1800C8E90 @ 0x1800c8e99\n// > sub_1800C9E90 @ 0x1800c9e9f\n// > <???> @ 0x18016bb78\n// > <???> @ 0x18016bc58\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:54:06 +0000\n// \n\n__int64 __fastcall sub_1800C7B70(__int64 a1, int a2)\n{\n  unsigned int v2; // eax\n  int v3; // eax\n  unsigned int v4; // r9d\n  unsigned int v5; // eax\n  unsigned int v6; // r9d\n  int v7; // eax\n  __int64 v8; // rax\n\n  if ( (a2 & 7) != 0 )\n  {\n    v2 = *(_DWORD *)(a1 + 56) & 0xFFFFFFF8;\n    *(_DWORD *)(a1 + 56) = v2;\n    if ( (a2 & 1) != 0 )\n    {\n      v3 = v2 | 1;\n    }\n    else if ( (a2 & 2) != 0 )\n    {\n      v3 = v2 | 2;\n    }\n    else\n    {\n      if ( (a2 & 4) == 0 )\n        goto LABEL_9;\n      v3 = v2 | 4;\n    }\n    *(_DWORD *)(a1 + 56) = v3;\n  }\nLABEL_9:\n  if ( (a2 & 0x40000) != 0 )\n  {\n    *(_DWORD *)(a1 + 56) &= ~0x80000u;\n    *(_DWORD *)(a1 + 56) |= 0x40000u;\n  }\n  else if ( (a2 & 0x80000) != 0 )\n  {\n    *(_DWORD *)(a1 + 56) &= ~0x40000u;\n    *(_DWORD *)(a1 + 56) |= 0x80000u;\n  }\n  if ( (a2 & 0x100000) != 0 )\n  {\n    *(_DWORD *)(a1 + 56) &= 0xFB1FFFFF;\n    *(_DWORD *)(a1 + 56) |= 0x100000u;\n  }\n  else if ( (a2 & 0x200000) != 0 )\n  {\n    *(_DWORD *)(a1 + 56) &= 0xFB2FFFFF;\n    *(_DWORD *)(a1 + 56) |= 0x200000u;\n  }\n  else if ( (a2 & 0x400000) != 0 )\n  {\n    *(_DWORD *)(a1 + 56) &= 0xFB4FFFFF;\n    *(_DWORD *)(a1 + 56) |= 0x400000u;\n  }\n  else if ( (a2 & 0x800000) != 0 )\n  {\n    *(_DWORD *)(a1 + 56) &= 0xFB8FFFFF;\n    *(_DWORD *)(a1 + 56) |= 0x800000u;\n  }\n  else if ( (a2 & 0x4000000) != 0 )\n  {\n    *(_DWORD *)(a1 + 56) &= 0xFF0FFFFF;\n    *(_DWORD *)(a1 + 56) |= 0x4000000u;\n  }\n  v4 = *(_DWORD *)(a1 + 56) | 0x40000000;\n  if ( (a2 & 0x40000000) == 0 )\n    v4 = *(_DWORD *)(a1 + 56) & 0xBFFFFFFF;\n  v5 = v4;\n  v6 = v4 | 0x80000000;\n  v7 = v5 & 0x7FFFFFFF;\n  if ( a2 >= 0 )\n    v6 = v7;\n  *(_DWORD *)(a1 + 56) = v6;\n  if ( (a2 & 8) != 0 )\n  {\n    v8 = *(_QWORD *)(a1 + 24);\n    if ( v8 )\n    {\n      *(_DWORD *)(a1 + 56) = v6 & 0xFFFFFFE7 | 8;\n      *(_DWORD *)(v8 + 120) = 1065353216;\n      *(_DWORD *)(*(_QWORD *)(a1 + 24) + 192LL) = 0;\n      *(_DWORD *)(*(_QWORD *)(a1 + 24) + 164LL) = 1065353216;\n      *(_DWORD *)(*(_QWORD *)(a1 + 24) + 124LL) = 1065353216;\n      return 0;\n    }\n  }\n  else if ( (a2 & 0x10) != 0 )\n  {\n    *(_DWORD *)(a1 + 56) = v6 & 0xFFFFFFE7 | 0x10;\n  }\n  return 0;\n}", "assembly": "; \n; sub_1800C7B70 from 0x1800c7b70 to 0x1800c7cc7 (343 bytes)\n; \n; 4 xrefs:\n; > sub_1800C8E90 @ 0x1800c8e99\n; > sub_1800C9E90 @ 0x1800c9e9f\n; > <???> @ 0x18016bb78\n; > <???> @ 0x18016bc58\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:54:06 +0000\n; \nmov     r8, rcx                                                        ; +0x0, 0x1800c7b70\ntest    dl, 7                                                          ; +0x3, 0x1800c7b73\njz      short loc_1800C7BA0                                            ; +0x6, 0x1800c7b76\nmov     eax, [rcx+38h]                                                 ; +0x8, 0x1800c7b78\nand     eax, 0FFFFFFF8h                                                ; +0xb, 0x1800c7b7b\nmov     [rcx+38h], eax                                                 ; +0xe, 0x1800c7b7e\ntest    dl, 1                                                          ; +0x11, 0x1800c7b81\njz      short loc_1800C7B8B                                            ; +0x14, 0x1800c7b84\nor      eax, 1                                                         ; +0x16, 0x1800c7b86\njmp     short loc_1800C7B9D                                            ; +0x19, 0x1800c7b89\ntest    dl, 2                                                          ; +0x1b, 0x1800c7b8b\njz      short loc_1800C7B95                                            ; +0x1e, 0x1800c7b8e\nor      eax, 2                                                         ; +0x20, 0x1800c7b90\njmp     short loc_1800C7B9D                                            ; +0x23, 0x1800c7b93\ntest    dl, 4                                                          ; +0x25, 0x1800c7b95\njz      short loc_1800C7BA0                                            ; +0x28, 0x1800c7b98\nor      eax, 4                                                         ; +0x2a, 0x1800c7b9a\nmov     [rcx+38h], eax                                                 ; +0x2d, 0x1800c7b9d\nbt      edx, 12h                                                       ; +0x30, 0x1800c7ba0\njnb     short loc_1800C7BB6                                            ; +0x34, 0x1800c7ba4\nand     dword ptr [rcx+38h], 0FFF7FFFFh                                ; +0x36, 0x1800c7ba6\nor      dword ptr [rcx+38h], 40000h                                    ; +0x3d, 0x1800c7bad\njmp     short loc_1800C7BCA                                            ; +0x44, 0x1800c7bb4\nbt      edx, 13h                                                       ; +0x46, 0x1800c7bb6\njnb     short loc_1800C7BCA                                            ; +0x4a, 0x1800c7bba\nand     dword ptr [rcx+38h], 0FFFBFFFFh                                ; +0x4c, 0x1800c7bbc\nor      dword ptr [rcx+38h], 80000h                                    ; +0x53, 0x1800c7bc3\nbt      edx, 14h                                                       ; +0x5a, 0x1800c7bca\njnb     short loc_1800C7BE0                                            ; +0x5e, 0x1800c7bce\nand     dword ptr [rcx+38h], 0FB1FFFFFh                                ; +0x60, 0x1800c7bd0\nor      dword ptr [rcx+38h], 100000h                                   ; +0x67, 0x1800c7bd7\njmp     short loc_1800C7C36                                            ; +0x6e, 0x1800c7bde\nbt      edx, 15h                                                       ; +0x70, 0x1800c7be0\njnb     short loc_1800C7BF6                                            ; +0x74, 0x1800c7be4\nand     dword ptr [rcx+38h], 0FB2FFFFFh                                ; +0x76, 0x1800c7be6\nor      dword ptr [rcx+38h], 200000h                                   ; +0x7d, 0x1800c7bed\njmp     short loc_1800C7C36                                            ; +0x84, 0x1800c7bf4\nbt      edx, 16h                                                       ; +0x86, 0x1800c7bf6\njnb     short loc_1800C7C0C                                            ; +0x8a, 0x1800c7bfa\nand     dword ptr [rcx+38h], 0FB4FFFFFh                                ; +0x8c, 0x1800c7bfc\nor      dword ptr [rcx+38h], 400000h                                   ; +0x93, 0x1800c7c03\njmp     short loc_1800C7C36                                            ; +0x9a, 0x1800c7c0a\nbt      edx, 17h                                                       ; +0x9c, 0x1800c7c0c\njnb     short loc_1800C7C22                                            ; +0xa0, 0x1800c7c10\nand     dword ptr [rcx+38h], 0FB8FFFFFh                                ; +0xa2, 0x1800c7c12\nor      dword ptr [rcx+38h], 800000h                                   ; +0xa9, 0x1800c7c19\njmp     short loc_1800C7C36                                            ; +0xb0, 0x1800c7c20\nbt      edx, 1Ah                                                       ; +0xb2, 0x1800c7c22\njnb     short loc_1800C7C36                                            ; +0xb6, 0x1800c7c26\nand     dword ptr [rcx+38h], 0FF0FFFFFh                                ; +0xb8, 0x1800c7c28\nor      dword ptr [rcx+38h], 4000000h                                  ; +0xbf, 0x1800c7c2f\nmov     r9d, [rcx+38h]                                                 ; +0xc6, 0x1800c7c36\nmov     eax, r9d                                                       ; +0xca, 0x1800c7c3a\nbtr     eax, 1Eh                                                       ; +0xcd, 0x1800c7c3d\nbts     r9d, 1Eh                                                       ; +0xd1, 0x1800c7c41\nmov     ecx, edx                                                       ; +0xd6, 0x1800c7c46\nand     ecx, 40000000h                                                 ; +0xd8, 0x1800c7c48\ncmovz   r9d, eax                                                       ; +0xde, 0x1800c7c4e\nmov     eax, r9d                                                       ; +0xe2, 0x1800c7c52\nbts     r9d, 1Fh                                                       ; +0xe5, 0x1800c7c55\nbtr     eax, 1Fh                                                       ; +0xea, 0x1800c7c5a\ntest    edx, edx                                                       ; +0xee, 0x1800c7c5e\ncmovns  r9d, eax                                                       ; +0xf0, 0x1800c7c60\nmov     [r8+38h], r9d                                                  ; +0xf4, 0x1800c7c64\ntest    dl, 8                                                          ; +0xf8, 0x1800c7c68\njz      short loc_1800C7CB3                                            ; +0xfb, 0x1800c7c6b\nmov     rax, [r8+18h]                                                  ; +0xfd, 0x1800c7c6d\ntest    rax, rax                                                       ; +0x101, 0x1800c7c71\njz      short loc_1800C7CC4                                            ; +0x104, 0x1800c7c74\nand     r9d, 0FFFFFFEFh                                                ; +0x106, 0x1800c7c76\nor      r9d, 8                                                         ; +0x10a, 0x1800c7c7a\nmov     [r8+38h], r9d                                                  ; +0x10e, 0x1800c7c7e\nmov     dword ptr [rax+78h], 3F800000h                                 ; +0x112, 0x1800c7c82\nmov     rax, [r8+18h]                                                  ; +0x119, 0x1800c7c89\nmov     dword ptr [rax+0C0h], 0                                        ; +0x11d, 0x1800c7c8d\nmov     rax, [r8+18h]                                                  ; +0x127, 0x1800c7c97\nmov     dword ptr [rax+0A4h], 3F800000h                                ; +0x12b, 0x1800c7c9b\nmov     rax, [r8+18h]                                                  ; +0x135, 0x1800c7ca5\nmov     dword ptr [rax+7Ch], 3F800000h                                 ; +0x139, 0x1800c7ca9\nxor     eax, eax                                                       ; +0x140, 0x1800c7cb0\nretn                                                                   ; +0x142, 0x1800c7cb2\ntest    dl, 10h                                                        ; +0x143, 0x1800c7cb3\njz      short loc_1800C7CC4                                            ; +0x146, 0x1800c7cb6\nand     r9d, 0FFFFFFF7h                                                ; +0x148, 0x1800c7cb8\nor      r9d, 10h                                                       ; +0x14c, 0x1800c7cbc\nmov     [r8+38h], r9d                                                  ; +0x150, 0x1800c7cc0\nxor     eax, eax                                                       ; +0x154, 0x1800c7cc4\nretn                                                                   ; +0x156, 0x1800c7cc6", "xrefs": ["sub_1800C8E90 @ 0x1800c8e99", "sub_1800C9E90 @ 0x1800c9e9f", "<???> @ 0x18016bb78", "<???> @ 0x18016bc58"], "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"}