{"type": "func", "start": 6443090608, "end": 6443090907, "name": "sub_18009C2B0", "pseudocode": "// \n// sub_18009C2B0 from 0x18009c2b0 to 0x18009c3db (299 bytes)\n// \n// 5 xrefs:\n// > sub_1800C8FD0 @ 0x1800c90a1\n// > sub_1800FC980 @ 0x1800fcd20\n// > <???> @ 0x180185360\n// > <???> @ 0x180185370\n// > <???> @ 0x1801fac2c\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_18009C2B0(__int64 a1, __int64 a2, char a3, __int64 a4)\n{\n  char v5; // dl\n  __int64 result; // rax\n  __int64 v9; // r8\n  int v10; // edi\n  int v11; // ebp\n  _QWORD *v12; // rax\n  int i; // ecx\n  __int64 v14; // rdx\n  void (__fastcall ***v15)(_QWORD, __int64); // rcx\n  __int64 v16; // [rsp+30h] [rbp+8h] BYREF\n\n  v5 = 0;\n  if ( (*(_DWORD *)(a1 + 100) & 0x100) == 0 )\n    v5 = a4;\n  if ( !v5 )\n  {\n    if ( a3 )\n    {\n      v10 = 0;\n      v11 = *(__int16 *)(a1 + 424);\n      if ( v11 > 0 )\n      {\n        do\n        {\n          if ( v10 >= *(__int16 *)(a1 + 424) )\n            goto LABEL_16;\n          v12 = *(_QWORD **)(a1 + 120);\n          if ( v12 == (_QWORD *)(a1 + 120) )\n            goto LABEL_16;\n          for ( i = 0; ; ++i )\n          {\n            v14 = v12[2];\n            if ( i >= v10 )\n              break;\n            v12 = (_QWORD *)*v12;\n          }\n          if ( !v14 )\nLABEL_16:\n            v15 = nullptr;\n          else\n            v15 = *(void (__fastcall ****)(_QWORD, __int64))(v14 + 88);\n          (**v15)(v15, a2);\n          ++v10;\n        }\n        while ( v10 < v11 );\n      }\n    }\n    (**(void (__fastcall ***)(__int64, __int64))a1)(a1, a2);\n    return 0;\n  }\n  LOBYTE(a4) = 1;\n  result = sub_1800FCF40(*(_QWORD *)(a1 + 168), &v16, 32, a4);\n  if ( !(_DWORD)result )\n  {\n    *(_BYTE *)v16 = 12;\n    *(_QWORD *)(v16 + 8) = a1;\n    *(_QWORD *)(v16 + 16) = a2;\n    *(_BYTE *)(v16 + 24) = a3;\n    *(_QWORD *)(a1 + 440) = a2;\n    _InterlockedOr((volatile signed __int32 *)(a1 + 100), 0x800u);\n    LOBYTE(v9) = 1;\n    result = sub_1800FD370(*(_QWORD *)(a1 + 168), v16, v9);\n    if ( !(_DWORD)result )\n      return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_18009C2B0 from 0x18009c2b0 to 0x18009c3db (299 bytes)\n; \n; 5 xrefs:\n; > sub_1800C8FD0 @ 0x1800c90a1\n; > sub_1800FC980 @ 0x1800fcd20\n; > <???> @ 0x180185360\n; > <???> @ 0x180185370\n; > <???> @ 0x1801fac2c\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_10], rbx                                              ; +0x0, 0x18009c2b0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x18009c2b5\npush    rdi                                                            ; +0xa, 0x18009c2ba\nsub     rsp, 20h                                                       ; +0xb, 0x18009c2bb\nmov     eax, [rcx+64h]                                                 ; +0xf, 0x18009c2bf\nmov     rbx, rdx                                                       ; +0x12, 0x18009c2c2\nshr     eax, 8                                                         ; +0x15, 0x18009c2c5\nmov     edx, 0                                                         ; +0x18, 0x18009c2c8\ntest    al, 1                                                          ; +0x1d, 0x18009c2cd\nmovzx   edi, r8b                                                       ; +0x1f, 0x18009c2cf\nmovzx   eax, r9b                                                       ; +0x23, 0x18009c2d3\nmov     rsi, rcx                                                       ; +0x27, 0x18009c2d7\ncmovz   edx, eax                                                       ; +0x2a, 0x18009c2da\nnop                                                                    ; +0x2d, 0x18009c2dd\ntest    dl, dl                                                         ; +0x2e, 0x18009c2de\njz      short loc_18009C35E                                            ; +0x30, 0x18009c2e0\nmov     rcx, [rcx+0A8h]                                                ; +0x32, 0x18009c2e2\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x39, 0x18009c2e9\nmov     r9b, 1                                                         ; +0x3e, 0x18009c2ee\nmov     r8d, 20h ; ' '                                                 ; +0x41, 0x18009c2f1\ncall    sub_1800FCF40                                                  ; +0x47, 0x18009c2f7\ntest    eax, eax                                                       ; +0x4c, 0x18009c2fc\njnz     loc_18009C3CB                                                  ; +0x4e, 0x18009c2fe\nmov     rax, [rsp+28h+arg_0]                                           ; +0x54, 0x18009c304\nmov     byte ptr [rax], 0Ch                                            ; +0x59, 0x18009c309\nmov     rax, [rsp+28h+arg_0]                                           ; +0x5c, 0x18009c30c\nmov     [rax+8], rsi                                                   ; +0x61, 0x18009c311\nmov     rax, [rsp+28h+arg_0]                                           ; +0x65, 0x18009c315\nmov     [rax+10h], rbx                                                 ; +0x6a, 0x18009c31a\nmov     rax, [rsp+28h+arg_0]                                           ; +0x6e, 0x18009c31e\nmov     [rax+18h], dil                                                 ; +0x73, 0x18009c323\nmov     [rsi+1B8h], rbx                                                ; +0x77, 0x18009c327\nlock or dword ptr [rsi+64h], 800h                                      ; +0x7e, 0x18009c32e\nmov     rdx, [rsp+28h+arg_0]                                           ; +0x86, 0x18009c336\nmov     r8b, 1                                                         ; +0x8b, 0x18009c33b\nmov     rcx, [rsi+0A8h]                                                ; +0x8e, 0x18009c33e\ncall    sub_1800FD370                                                  ; +0x95, 0x18009c345\ntest    eax, eax                                                       ; +0x9a, 0x18009c34a\njz      short loc_18009C3C9                                            ; +0x9c, 0x18009c34c\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x9e, 0x18009c34e\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xa3, 0x18009c353\nadd     rsp, 20h                                                       ; +0xa8, 0x18009c358\npop     rdi                                                            ; +0xac, 0x18009c35c\nretn                                                                   ; +0xad, 0x18009c35d\ntest    dil, dil                                                       ; +0xae, 0x18009c35e\njz      short loc_18009C3BE                                            ; +0xb1, 0x18009c361\nmov     [rsp+28h+arg_8], rbp                                           ; +0xb3, 0x18009c363\nxor     edi, edi                                                       ; +0xb8, 0x18009c368\nmovsx   ebp, word ptr [rcx+1A8h]                                       ; +0xba, 0x18009c36a\ntest    ebp, ebp                                                       ; +0xc1, 0x18009c371\njle     short loc_18009C3B9                                            ; +0xc3, 0x18009c373\nmovsx   eax, word ptr [rsi+1A8h]                                       ; +0xc5, 0x18009c375\ncmp     edi, eax                                                       ; +0xcc, 0x18009c37c\njge     short loc_18009C3A9                                            ; +0xce, 0x18009c37e\nmov     rax, [rsi+78h]                                                 ; +0xd0, 0x18009c380\nlea     rcx, [rsi+78h]                                                 ; +0xd4, 0x18009c384\ncmp     rax, rcx                                                       ; +0xd8, 0x18009c388\njz      short loc_18009C3A9                                            ; +0xdb, 0x18009c38b\nxor     ecx, ecx                                                       ; +0xdd, 0x18009c38d\nmov     rdx, [rax+10h]                                                 ; +0xdf, 0x18009c38f\ncmp     ecx, edi                                                       ; +0xe3, 0x18009c393\njge     short loc_18009C39E                                            ; +0xe5, 0x18009c395\nmov     rax, [rax]                                                     ; +0xe7, 0x18009c397\ninc     ecx                                                            ; +0xea, 0x18009c39a\njmp     short loc_18009C38F                                            ; +0xec, 0x18009c39c\ntest    rdx, rdx                                                       ; +0xee, 0x18009c39e\njz      short loc_18009C3A9                                            ; +0xf1, 0x18009c3a1\nmov     rcx, [rdx+58h]                                                 ; +0xf3, 0x18009c3a3\njmp     short loc_18009C3AB                                            ; +0xf7, 0x18009c3a7\nxor     ecx, ecx                                                       ; +0xf9, 0x18009c3a9\nmov     rax, [rcx]                                                     ; +0xfb, 0x18009c3ab\nmov     rdx, rbx                                                       ; +0xfe, 0x18009c3ae\ncall    qword ptr [rax]                                                ; +0x101, 0x18009c3b1\ninc     edi                                                            ; +0x103, 0x18009c3b3\ncmp     edi, ebp                                                       ; +0x105, 0x18009c3b5\njl      short loc_18009C375                                            ; +0x107, 0x18009c3b7\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x109, 0x18009c3b9\nmov     rax, [rsi]                                                     ; +0x10e, 0x18009c3be\nmov     rdx, rbx                                                       ; +0x111, 0x18009c3c1\nmov     rcx, rsi                                                       ; +0x114, 0x18009c3c4\ncall    qword ptr [rax]                                                ; +0x117, 0x18009c3c7\nxor     eax, eax                                                       ; +0x119, 0x18009c3c9\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x11b, 0x18009c3cb\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x120, 0x18009c3d0\nadd     rsp, 20h                                                       ; +0x125, 0x18009c3d5\npop     rdi                                                            ; +0x129, 0x18009c3d9\nretn                                                                   ; +0x12a, 0x18009c3da", "xrefs": ["sub_1800C8FD0 @ 0x1800c90a1", "sub_1800FC980 @ 0x1800fcd20", "<???> @ 0x180185360", "<???> @ 0x180185370", "<???> @ 0x1801fac2c"], "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"}