{"type": "func", "start": 6443251360, "end": 6443252055, "name": "sub_1800C36A0", "pseudocode": "// \n// sub_1800C36A0 from 0x1800c36a0 to 0x1800c3957 (695 bytes)\n// \n// 6 xrefs:\n// > sub_1800C3A70 @ 0x1800c3aa4\n// > sub_1800C3B70 @ 0x1800c3b92\n// > sub_1800C3BC0 @ 0x1800c3c05\n// > <???> @ 0x18018a9f4\n// > <???> @ 0x18018aa38\n// > <???> @ 0x1801fdd7c\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_1800C36A0(__int64 a1)\n{\n  int v3; // esi\n  __int64 v4; // rdi\n  _DWORD *v5; // rdx\n  __int64 *v6; // rdi\n  HRESULT Instance; // eax\n  __int64 v8; // rcx\n  int v9; // eax\n  __int64 v10; // rcx\n  unsigned int i; // edi\n  __int16 *v12; // rdx\n  int ppv; // [rsp+20h] [rbp-38h]\n  unsigned int v14; // [rsp+60h] [rbp+8h] BYREF\n  __int64 v15; // [rsp+68h] [rbp+10h] BYREF\n  LPVOID pv; // [rsp+70h] [rbp+18h] BYREF\n  __int64 v17; // [rsp+78h] [rbp+20h] BYREF\n\n  if ( *(_BYTE *)(a1 + 784) )\n    return 0;\n  if ( !(unsigned __int8)sub_1800C0750() )\n  {\n    *(_BYTE *)(a1 + 784) = 1;\n    return 0;\n  }\n  v3 = 0;\n  if ( *(int *)(a1 + 1048) > 0 )\n  {\n    v4 = a1 + 1064;\n    do\n    {\n      CoTaskMemFree(*(LPVOID *)(v4 - 8));\n      v5 = *(_DWORD **)v4;\n      *(_QWORD *)(v4 - 8) = 0;\n      if ( v5 )\n      {\n        LOBYTE(ppv) = 1;\n        sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), v5);\n        *(_QWORD *)v4 = 0;\n      }\n      *(_QWORD *)(v4 + 8) = 0;\n      ++v3;\n      v4 += 24;\n    }\n    while ( v3 < *(_DWORD *)(a1 + 1048) );\n  }\n  v6 = (__int64 *)(a1 + 1824);\n  *(_DWORD *)(a1 + 1048) = 0;\n  if ( !*(_QWORD *)(a1 + 1824) )\n  {\n    Instance = CoCreateInstance(&rclsid, nullptr, 0x17u, &riid, (LPVOID *)(a1 + 1824));\n    if ( Instance == -2147221008 )\n    {\n      if ( CoInitializeEx(nullptr, 2u) < 0 )\n        return 51;\n      Instance = CoCreateInstance(&rclsid, nullptr, 0x17u, &riid, (LPVOID *)(a1 + 1824));\n    }\n    if ( Instance < 0 )\n      return 51;\n  }\n  v8 = *v6;\n  v15 = 0;\n  v9 = (*(__int64 (__fastcall **)(__int64, _QWORD, _QWORD, __int64 *, int))(*(_QWORD *)v8 + 32LL))(v8, 0, 0, &v15, ppv);\n  if ( v9 == -2147023728 )\n    goto LABEL_20;\n  if ( v9 < 0 )\n    return 51;\n  if ( !(unsigned int)sub_1800C4B30(a1, v15, (int)a1 + 24 * (*(_DWORD *)(a1 + 1048) + 44), 0, 0) )\n    ++*(_DWORD *)(a1 + 1048);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v15 + 16LL))(v15);\nLABEL_20:\n  v10 = *v6;\n  v17 = 0;\n  if ( (*(int (__fastcall **)(__int64, _QWORD, __int64, __int64 *))(*(_QWORD *)v10 + 24LL))(v10, 0, 1, &v17) < 0 )\n    return 51;\n  v14 = 0;\n  if ( (*(int (__fastcall **)(__int64, unsigned int *))(*(_QWORD *)v17 + 24LL))(v17, &v14) < 0 )\n    return 51;\n  for ( i = 0; i < v14; ++i )\n  {\n    if ( (*(int (__fastcall **)(__int64, _QWORD, __int64 *))(*(_QWORD *)v17 + 32LL))(v17, i, &v15) >= 0 )\n    {\n      pv = nullptr;\n      if ( !(*(unsigned int (__fastcall **)(__int64, LPVOID *))(*(_QWORD *)v15 + 40LL))(v15, &pv) )\n      {\n        if ( *(int *)(a1 + 1048) >= 32\n          || (v12 = *(__int16 **)(a1 + 1056)) != nullptr && !(unsigned int)sub_1800B82D0((__int64)pv, v12)\n          || (unsigned int)sub_1800C4B30(a1, v15, (int)a1 + 24 * (*(_DWORD *)(a1 + 1048) + 44), (_DWORD)pv, 0) )\n        {\n          CoTaskMemFree(pv);\n        }\n        else\n        {\n          ++*(_DWORD *)(a1 + 1048);\n        }\n      }\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v15 + 16LL))(v15);\n    }\n  }\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v17 + 16LL))(v17);\n  *(_BYTE *)(a1 + 784) = 1;\n  return 0;\n}", "assembly": "; \n; sub_1800C36A0 from 0x1800c36a0 to 0x1800c3957 (695 bytes)\n; \n; 6 xrefs:\n; > sub_1800C3A70 @ 0x1800c3aa4\n; > sub_1800C3B70 @ 0x1800c3b92\n; > sub_1800C3BC0 @ 0x1800c3c05\n; > <???> @ 0x18018a9f4\n; > <???> @ 0x18018aa38\n; > <???> @ 0x1801fdd7c\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\npush    rbx                                                            ; +0x0, 0x1800c36a0\nsub     rsp, 50h                                                       ; +0x2, 0x1800c36a2\ncmp     byte ptr [rcx+310h], 0                                         ; +0x6, 0x1800c36a6\nmov     rbx, rcx                                                       ; +0xd, 0x1800c36ad\njnz     short loc_1800C36C2                                            ; +0x10, 0x1800c36b0\ncall    sub_1800C0750                                                  ; +0x12, 0x1800c36b2\ntest    al, al                                                         ; +0x17, 0x1800c36b7\njnz     short loc_1800C36CA                                            ; +0x19, 0x1800c36b9\nmov     byte ptr [rbx+310h], 1                                         ; +0x1b, 0x1800c36bb\nxor     eax, eax                                                       ; +0x22, 0x1800c36c2\nadd     rsp, 50h                                                       ; +0x24, 0x1800c36c4\npop     rbx                                                            ; +0x28, 0x1800c36c8\nretn                                                                   ; +0x29, 0x1800c36c9\nmov     [rsp+58h+var_10], rbp                                          ; +0x2a, 0x1800c36ca\nxor     ebp, ebp                                                       ; +0x2f, 0x1800c36cf\nmov     [rsp+58h+var_18], rsi                                          ; +0x31, 0x1800c36d1\nmov     esi, ebp                                                       ; +0x36, 0x1800c36d6\nmov     [rsp+58h+var_20], rdi                                          ; +0x38, 0x1800c36d8\ncmp     [rbx+418h], ebp                                                ; +0x3d, 0x1800c36dd\njle     short loc_1800C3740                                            ; +0x43, 0x1800c36e3\nlea     rdi, [rbx+428h]                                                ; +0x45, 0x1800c36e5\nnop     dword ptr [rax+00h]                                            ; +0x4c, 0x1800c36ec\nmov     rcx, [rdi-8]; pv                                               ; +0x50, 0x1800c36f0\ncall    cs:CoTaskMemFree                                               ; +0x54, 0x1800c36f4\nmov     rdx, [rdi]                                                     ; +0x5a, 0x1800c36fa\nmov     [rdi-8], rbp                                                   ; +0x5d, 0x1800c36fd\ntest    rdx, rdx                                                       ; +0x61, 0x1800c3701\njz      short loc_1800C372E                                            ; +0x64, 0x1800c3704\nmov     rcx, cs:off_1801AED20                                          ; +0x66, 0x1800c3706\nlea     r8, aCBuildagent1Wo_48; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x6d, 0x1800c370d\nmov     r9d, 12Ch                                                      ; +0x74, 0x1800c3714\nmov     byte ptr [rsp+58h+ppv], 1                                      ; +0x7a, 0x1800c371a\nmov     rcx, [rcx+1A0h]                                                ; +0x7f, 0x1800c371f\ncall    sub_1800B6AA0                                                  ; +0x86, 0x1800c3726\nmov     [rdi], rbp                                                     ; +0x8b, 0x1800c372b\nmov     [rdi+8], rbp                                                   ; +0x8e, 0x1800c372e\ninc     esi                                                            ; +0x92, 0x1800c3732\nadd     rdi, 18h                                                       ; +0x94, 0x1800c3734\ncmp     esi, [rbx+418h]                                                ; +0x98, 0x1800c3738\njl      short loc_1800C36F0                                            ; +0x9e, 0x1800c373e\nmov     rsi, [rsp+58h+var_18]                                          ; +0xa0, 0x1800c3740\nlea     rdi, [rbx+720h]                                                ; +0xa5, 0x1800c3745\nmov     [rbx+418h], ebp                                                ; +0xac, 0x1800c374c\ncmp     [rdi], rbp                                                     ; +0xb2, 0x1800c3752\njnz     short loc_1800C37B9                                            ; +0xb5, 0x1800c3755\nxor     edx, edx; pUnkOuter                                            ; +0xb7, 0x1800c3757\nmov     qword ptr [rsp+58h+ppv], rdi; ppv                              ; +0xb9, 0x1800c3759\nlea     r9, riid; riid                                                 ; +0xbe, 0x1800c375e\nlea     rcx, rclsid; rclsid                                            ; +0xc5, 0x1800c3765\nlea     r8d, [rdx+17h]; dwClsContext                                   ; +0xcc, 0x1800c376c\ncall    cs:CoCreateInstance                                            ; +0xd0, 0x1800c3770\ncmp     eax, 800401F0h                                                 ; +0xd6, 0x1800c3776\njnz     short loc_1800C37B1                                            ; +0xdb, 0x1800c377b\nmov     edx, 2; dwCoInit                                               ; +0xdd, 0x1800c377d\nxor     ecx, ecx; pvReserved                                           ; +0xe2, 0x1800c3782\ncall    cs:CoInitializeEx                                              ; +0xe4, 0x1800c3784\ntest    eax, eax                                                       ; +0xea, 0x1800c378a\njs      loc_1800C3942                                                  ; +0xec, 0x1800c378c\nxor     edx, edx; pUnkOuter                                            ; +0xf2, 0x1800c3792\nmov     qword ptr [rsp+58h+ppv], rdi; ppv                              ; +0xf4, 0x1800c3794\nlea     r9, riid; riid                                                 ; +0xf9, 0x1800c3799\nlea     rcx, rclsid; rclsid                                            ; +0x100, 0x1800c37a0\nlea     r8d, [rdx+17h]; dwClsContext                                   ; +0x107, 0x1800c37a7\ncall    cs:CoCreateInstance                                            ; +0x10b, 0x1800c37ab\ntest    eax, eax                                                       ; +0x111, 0x1800c37b1\njs      loc_1800C3942                                                  ; +0x113, 0x1800c37b3\nmov     rcx, [rdi]                                                     ; +0x119, 0x1800c37b9\nlea     r9, [rsp+58h+arg_8]                                            ; +0x11c, 0x1800c37bc\nmov     [rsp+58h+arg_8], rbp                                           ; +0x121, 0x1800c37c1\nxor     r8d, r8d                                                       ; +0x126, 0x1800c37c6\nxor     edx, edx                                                       ; +0x129, 0x1800c37c9\nmov     rax, [rcx]                                                     ; +0x12b, 0x1800c37cb\ncall    qword ptr [rax+20h]                                            ; +0x12e, 0x1800c37ce\ncmp     eax, 80070490h                                                 ; +0x131, 0x1800c37d1\njz      short loc_1800C381D                                            ; +0x136, 0x1800c37d6\ntest    eax, eax                                                       ; +0x138, 0x1800c37d8\njs      loc_1800C3942                                                  ; +0x13a, 0x1800c37da\nmovsxd  rax, dword ptr [rbx+418h]                                      ; +0x140, 0x1800c37e0\nxor     r9d, r9d                                                       ; +0x147, 0x1800c37e7\nmov     rdx, [rsp+58h+arg_8]                                           ; +0x14a, 0x1800c37ea\nadd     rax, 2Ch ; ','                                                 ; +0x14f, 0x1800c37ef\nmov     rcx, rbx                                                       ; +0x153, 0x1800c37f3\nmov     byte ptr [rsp+58h+ppv], bpl                                    ; +0x156, 0x1800c37f6\nlea     rax, [rax+rax*2]                                               ; +0x15b, 0x1800c37fb\nlea     r8, [rbx+rax*8]                                                ; +0x15f, 0x1800c37ff\ncall    sub_1800C4B30                                                  ; +0x163, 0x1800c3803\ntest    eax, eax                                                       ; +0x168, 0x1800c3808\njnz     short loc_1800C3812                                            ; +0x16a, 0x1800c380a\ninc     dword ptr [rbx+418h]                                           ; +0x16c, 0x1800c380c\nmov     rcx, [rsp+58h+arg_8]                                           ; +0x172, 0x1800c3812\nmov     rax, [rcx]                                                     ; +0x177, 0x1800c3817\ncall    qword ptr [rax+10h]                                            ; +0x17a, 0x1800c381a\nmov     rcx, [rdi]                                                     ; +0x17d, 0x1800c381d\nlea     r9, [rsp+58h+arg_18]                                           ; +0x180, 0x1800c3820\nxor     edx, edx                                                       ; +0x185, 0x1800c3825\nmov     [rsp+58h+arg_18], rbp                                          ; +0x187, 0x1800c3827\nmov     rax, [rcx]                                                     ; +0x18c, 0x1800c382c\nlea     r8d, [rdx+1]                                                   ; +0x18f, 0x1800c382f\ncall    qword ptr [rax+18h]                                            ; +0x193, 0x1800c3833\ntest    eax, eax                                                       ; +0x196, 0x1800c3836\njs      loc_1800C3942                                                  ; +0x198, 0x1800c3838\nmov     rcx, [rsp+58h+arg_18]                                          ; +0x19e, 0x1800c383e\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x1a3, 0x1800c3843\nmov     [rsp+58h+arg_0], ebp                                           ; +0x1a8, 0x1800c3848\nmov     rax, [rcx]                                                     ; +0x1ac, 0x1800c384c\ncall    qword ptr [rax+18h]                                            ; +0x1af, 0x1800c384f\ntest    eax, eax                                                       ; +0x1b2, 0x1800c3852\njs      loc_1800C3942                                                  ; +0x1b4, 0x1800c3854\nmov     edi, ebp                                                       ; +0x1ba, 0x1800c385a\ncmp     [rsp+58h+arg_0], ebp                                           ; +0x1bc, 0x1800c385c\njbe     loc_1800C391E                                                  ; +0x1c0, 0x1800c3860\nnop     word ptr [rax+rax+00000000h]                                   ; +0x1c6, 0x1800c3866\nmov     rcx, [rsp+58h+arg_18]                                          ; +0x1d0, 0x1800c3870\nlea     r8, [rsp+58h+arg_8]                                            ; +0x1d5, 0x1800c3875\nmov     edx, edi                                                       ; +0x1da, 0x1800c387a\nmov     rax, [rcx]                                                     ; +0x1dc, 0x1800c387c\ncall    qword ptr [rax+20h]                                            ; +0x1df, 0x1800c387f\ntest    eax, eax                                                       ; +0x1e2, 0x1800c3882\njs      loc_1800C3912                                                  ; +0x1e4, 0x1800c3884\nmov     rcx, [rsp+58h+arg_8]                                           ; +0x1ea, 0x1800c388a\nlea     rdx, [rsp+58h+pv]                                              ; +0x1ef, 0x1800c388f\nmov     [rsp+58h+pv], rbp                                              ; +0x1f4, 0x1800c3894\nmov     rax, [rcx]                                                     ; +0x1f9, 0x1800c3899\ncall    qword ptr [rax+28h]                                            ; +0x1fc, 0x1800c389c\ntest    eax, eax                                                       ; +0x1ff, 0x1800c389f\njnz     short loc_1800C3907                                            ; +0x201, 0x1800c38a1\ncmp     dword ptr [rbx+418h], 20h ; ' '                                ; +0x203, 0x1800c38a3\njge     short loc_1800C38FC                                            ; +0x20a, 0x1800c38aa\nmov     rdx, [rbx+420h]                                                ; +0x20c, 0x1800c38ac\ntest    rdx, rdx                                                       ; +0x213, 0x1800c38b3\njz      short loc_1800C38C6                                            ; +0x216, 0x1800c38b6\nmov     rcx, [rsp+58h+pv]                                              ; +0x218, 0x1800c38b8\ncall    sub_1800B82D0                                                  ; +0x21d, 0x1800c38bd\ntest    eax, eax                                                       ; +0x222, 0x1800c38c2\njz      short loc_1800C38FC                                            ; +0x224, 0x1800c38c4\nmovsxd  rax, dword ptr [rbx+418h]                                      ; +0x226, 0x1800c38c6\nmov     rcx, rbx                                                       ; +0x22d, 0x1800c38cd\nmov     r9, [rsp+58h+pv]                                               ; +0x230, 0x1800c38d0\nadd     rax, 2Ch ; ','                                                 ; +0x235, 0x1800c38d5\nmov     rdx, [rsp+58h+arg_8]                                           ; +0x239, 0x1800c38d9\nmov     byte ptr [rsp+58h+ppv], bpl                                    ; +0x23e, 0x1800c38de\nlea     rax, [rax+rax*2]                                               ; +0x243, 0x1800c38e3\nlea     r8, [rbx+rax*8]                                                ; +0x247, 0x1800c38e7\ncall    sub_1800C4B30                                                  ; +0x24b, 0x1800c38eb\ntest    eax, eax                                                       ; +0x250, 0x1800c38f0\njnz     short loc_1800C38FC                                            ; +0x252, 0x1800c38f2\ninc     dword ptr [rbx+418h]                                           ; +0x254, 0x1800c38f4\njmp     short loc_1800C3907                                            ; +0x25a, 0x1800c38fa\nmov     rcx, [rsp+58h+pv]; pv                                          ; +0x25c, 0x1800c38fc\ncall    cs:CoTaskMemFree                                               ; +0x261, 0x1800c3901\nmov     rcx, [rsp+58h+arg_8]                                           ; +0x267, 0x1800c3907\nmov     rax, [rcx]                                                     ; +0x26c, 0x1800c390c\ncall    qword ptr [rax+10h]                                            ; +0x26f, 0x1800c390f\ninc     edi                                                            ; +0x272, 0x1800c3912\ncmp     edi, [rsp+58h+arg_0]                                           ; +0x274, 0x1800c3914\njb      loc_1800C3870                                                  ; +0x278, 0x1800c3918\nmov     rcx, [rsp+58h+arg_18]                                          ; +0x27e, 0x1800c391e\nmov     rax, [rcx]                                                     ; +0x283, 0x1800c3923\ncall    qword ptr [rax+10h]                                            ; +0x286, 0x1800c3926\nmov     rbp, [rsp+58h+var_10]                                          ; +0x289, 0x1800c3929\nxor     eax, eax                                                       ; +0x28e, 0x1800c392e\nmov     rdi, [rsp+58h+var_20]                                          ; +0x290, 0x1800c3930\nmov     byte ptr [rbx+310h], 1                                         ; +0x295, 0x1800c3935\nadd     rsp, 50h                                                       ; +0x29c, 0x1800c393c\npop     rbx                                                            ; +0x2a0, 0x1800c3940\nretn                                                                   ; +0x2a1, 0x1800c3941\nmov     rbp, [rsp+58h+var_10]                                          ; +0x2a2, 0x1800c3942\nmov     eax, 33h ; '3'                                                 ; +0x2a7, 0x1800c3947\nmov     rdi, [rsp+58h+var_20]                                          ; +0x2ac, 0x1800c394c\nadd     rsp, 50h                                                       ; +0x2b1, 0x1800c3951\npop     rbx                                                            ; +0x2b5, 0x1800c3955\nretn                                                                   ; +0x2b6, 0x1800c3956", "xrefs": ["sub_1800C3A70 @ 0x1800c3aa4", "sub_1800C3B70 @ 0x1800c3b92", "sub_1800C3BC0 @ 0x1800c3c05", "<???> @ 0x18018a9f4", "<???> @ 0x18018aa38", "<???> @ 0x1801fdd7c"], "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"}