{"type": "func", "start": 6443080592, "end": 6443080781, "name": "sub_180099B90", "pseudocode": "// \n// sub_180099B90 from 0x180099b90 to 0x180099c4d (189 bytes)\n// \n// 7 xrefs:\n// > sub_18001C780 @ 0x18001c8db\n// > sub_180022480 @ 0x180022614\n// > sub_1800273E0 @ 0x18002753c\n// > sub_180037A60 @ 0x180037bbb\n// > sub_18003F610 @ 0x18003f76b\n// > sub_1800BCAD0 @ 0x1800bcc08\n// > <???> @ 0x1801fab78\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n__int64 __fastcall sub_180099B90(__int64 a1, __int64 a2, unsigned int a3, int a4)\n{\n  int v5; // ebx\n  __int64 result; // rax\n  int v7; // eax\n  int v8; // r9d\n  __int64 v9; // r8\n  __int64 v10; // rax\n  __int64 v11; // rdx\n  __int64 v12; // rcx\n  bool v13; // [rsp+60h] [rbp+18h] BYREF\n\n  *(_WORD *)(a2 + 90) = a3;\n  v5 = 0;\n  *(_DWORD *)(a2 + 44) = 0x100000;\n  *(_WORD *)(a2 + 88) = 0;\n  v13 = 0;\n  *(_DWORD *)(a1 + 60) = 0;\n  result = sub_180099840(a2 + 8, a1, a2 + 8, a3, 0, a3, a4, &v13);\n  if ( !(_DWORD)result )\n  {\n    v7 = *(_DWORD *)(a1 + 12);\n    if ( *(_DWORD *)(a1 + 60) < v7 )\n    {\n      v8 = 0;\n      if ( v7 > 0 )\n      {\n        v9 = 0;\n        v10 = 0;\n        do\n        {\n          v11 = *(_QWORD *)(a1 + 32);\n          v12 = *(_QWORD *)(v10 + v11);\n          if ( (*(_DWORD *)(v12 + 92) & 0x40000) != 0 )\n          {\n            ++v8;\n            *(_QWORD *)(v9 + v11) = v12;\n            v9 += 8;\n          }\n          else\n          {\n            _InterlockedAnd((volatile signed __int32 *)(v12 + 92), 0xFFE7FFFF);\n          }\n          ++v5;\n          v10 += 8;\n        }\n        while ( v5 < *(_DWORD *)(a1 + 12) );\n      }\n      *(_DWORD *)(a1 + 12) = v8;\n    }\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_180099B90 from 0x180099b90 to 0x180099c4d (189 bytes)\n; \n; 7 xrefs:\n; > sub_18001C780 @ 0x18001c8db\n; > sub_180022480 @ 0x180022614\n; > sub_1800273E0 @ 0x18002753c\n; > sub_180037A60 @ 0x180037bbb\n; > sub_18003F610 @ 0x18003f76b\n; > sub_1800BCAD0 @ 0x1800bcc08\n; > <???> @ 0x1801fab78\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180099b90\npush    rdi                                                            ; +0x5, 0x180099b95\nsub     rsp, 40h                                                       ; +0x6, 0x180099b96\nmov     rdi, rcx                                                       ; +0xa, 0x180099b9a\nmov     [rdx+5Ah], r8w                                                 ; +0xd, 0x180099b9d\nlea     rcx, [rdx+8]                                                   ; +0x12, 0x180099ba2\nxor     ebx, ebx                                                       ; +0x16, 0x180099ba6\nlea     rax, [rsp+48h+arg_10]                                          ; +0x18, 0x180099ba8\nmov     dword ptr [rcx+24h], 100000h                                   ; +0x1d, 0x180099bad\nmov     [rsp+48h+var_10], rax                                          ; +0x24, 0x180099bb4\nmov     rdx, rdi                                                       ; +0x29, 0x180099bb9\nmov     [rsp+48h+var_18], r9d                                          ; +0x2c, 0x180099bbc\nmov     r9d, r8d                                                       ; +0x31, 0x180099bc1\nmov     [rsp+48h+var_20], r8d                                          ; +0x34, 0x180099bc4\nmov     r8, rcx                                                        ; +0x39, 0x180099bc9\nmov     [rcx+50h], bx                                                  ; +0x3c, 0x180099bcc\nmov     [rsp+48h+arg_10], 0                                            ; +0x40, 0x180099bd0\nmov     [rdi+3Ch], ebx                                                 ; +0x45, 0x180099bd5\nmov     [rsp+48h+var_28], ebx                                          ; +0x48, 0x180099bd8\ncall    sub_180099840                                                  ; +0x4c, 0x180099bdc\ntest    eax, eax                                                       ; +0x51, 0x180099be1\njnz     short loc_180099C42                                            ; +0x53, 0x180099be3\nmov     eax, [rdi+0Ch]                                                 ; +0x55, 0x180099be5\ncmp     [rdi+3Ch], eax                                                 ; +0x58, 0x180099be8\njge     short loc_180099C40                                            ; +0x5b, 0x180099beb\nmov     r9d, ebx                                                       ; +0x5d, 0x180099bed\ntest    eax, eax                                                       ; +0x60, 0x180099bf0\njle     short loc_180099C3C                                            ; +0x62, 0x180099bf2\nmov     r8d, ebx                                                       ; +0x64, 0x180099bf4\nmov     eax, ebx                                                       ; +0x67, 0x180099bf7\nnop     dword ptr [rax+00000000h]                                      ; +0x69, 0x180099bf9\nmov     rcx, [rdi+20h]                                                 ; +0x70, 0x180099c00\nmov     rdx, [rcx+rax]                                                 ; +0x74, 0x180099c04\nmov     ecx, [rdx+5Ch]                                                 ; +0x78, 0x180099c08\nnop                                                                    ; +0x7b, 0x180099c0b\nmov     rdx, [rdi+20h]                                                 ; +0x7c, 0x180099c0c\nshr     ecx, 12h                                                       ; +0x80, 0x180099c10\ntest    cl, 1                                                          ; +0x83, 0x180099c13\nmov     rcx, [rax+rdx]                                                 ; +0x86, 0x180099c16\njz      short loc_180099C29                                            ; +0x8a, 0x180099c1a\ninc     r9d                                                            ; +0x8c, 0x180099c1c\nmov     [r8+rdx], rcx                                                  ; +0x8f, 0x180099c1f\nadd     r8, 8                                                          ; +0x93, 0x180099c23\njmp     short loc_180099C31                                            ; +0x97, 0x180099c27\nlock and dword ptr [rcx+5Ch], 0FFE7FFFFh                               ; +0x99, 0x180099c29\ninc     ebx                                                            ; +0xa1, 0x180099c31\nadd     rax, 8                                                         ; +0xa3, 0x180099c33\ncmp     ebx, [rdi+0Ch]                                                 ; +0xa7, 0x180099c37\njl      short loc_180099C00                                            ; +0xaa, 0x180099c3a\nmov     [rdi+0Ch], r9d                                                 ; +0xac, 0x180099c3c\nxor     eax, eax                                                       ; +0xb0, 0x180099c40\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xb2, 0x180099c42\nadd     rsp, 40h                                                       ; +0xb7, 0x180099c47\npop     rdi                                                            ; +0xbb, 0x180099c4b\nretn                                                                   ; +0xbc, 0x180099c4c", "xrefs": ["sub_18001C780 @ 0x18001c8db", "sub_180022480 @ 0x180022614", "sub_1800273E0 @ 0x18002753c", "sub_180037A60 @ 0x180037bbb", "sub_18003F610 @ 0x18003f76b", "sub_1800BCAD0 @ 0x1800bcc08", "<???> @ 0x1801fab78"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}