{"type": "func", "start": 6442763696, "end": 6442764151, "name": "sub_18004C5B0", "pseudocode": "// \n// sub_18004C5B0 from 0x18004c5b0 to 0x18004c777 (455 bytes)\n// \n// 8 xrefs:\n// > sub_18004C7C0 @ 0x18004c9df\n// > sub_18004CB30 @ 0x18004ce98\n// > sub_180050A30 @ 0x180050ab2\n// > sub_180052A90 @ 0x180052c23\n// > sub_180052E90 @ 0x180053157\n// > <???> @ 0x180181684\n// > <???> @ 0x1801816c0\n// > <???> @ 0x1801f8670\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_18004C5B0(__int64 a1, __int64 a2)\n{\n  __int64 v2; // rbx\n  int v5; // edi\n  int v6; // esi\n  __int64 *v7; // r14\n  int v8; // r14d\n  int *v9; // r15\n  _QWORD *v10; // rsi\n  int v11; // r14d\n  int *v12; // r15\n  _QWORD *v13; // rsi\n  int v14; // r14d\n  int *v15; // r15\n  _QWORD *v16; // rsi\n  _QWORD *v17; // rsi\n  __int64 v18; // rdx\n  __int64 v19; // rdx\n\n  v2 = *(_QWORD *)(a2 + 32);\n  if ( v2 )\n  {\n    v5 = 0;\n    v6 = 0;\n    if ( *(int *)(v2 + 8) > 0 )\n    {\n      v7 = (__int64 *)(v2 + 32);\n      do\n      {\n        if ( *v7 )\n          sub_180033C90(a1, *v7);\n        ++v6;\n        ++v7;\n      }\n      while ( v6 < *(_DWORD *)(v2 + 8) );\n    }\n    v8 = 0;\n    if ( *(int *)(v2 + 12) > 0 )\n    {\n      v9 = (int *)(v2 + 544);\n      v10 = (_QWORD *)(v2 + 800);\n      do\n      {\n        if ( *v10 )\n          (*((void (__fastcall **)(__int64))*(&off_180166E38 + *v9) + 2))(a1);\n        ++v8;\n        ++v10;\n        ++v9;\n      }\n      while ( v8 < *(_DWORD *)(v2 + 12) );\n    }\n    v11 = 0;\n    if ( *(int *)(v2 + 16) > 0 )\n    {\n      v12 = (int *)(v2 + 1312);\n      v13 = (_QWORD *)(v2 + 1568);\n      do\n      {\n        if ( *v13 )\n          (*(void (__fastcall **)(__int64))(qword_180166E10[*v12] + 24))(a1);\n        ++v11;\n        ++v13;\n        ++v12;\n      }\n      while ( v11 < *(_DWORD *)(v2 + 16) );\n    }\n    v14 = 0;\n    if ( *(int *)(v2 + 20) > 0 )\n    {\n      v15 = (int *)(v2 + 2080);\n      v16 = (_QWORD *)(v2 + 2336);\n      do\n      {\n        if ( *v16 )\n          (*((void (__fastcall **)(__int64))*(&off_180166E20 + *v15) + 3))(a1);\n        ++v14;\n        ++v16;\n        ++v15;\n      }\n      while ( v14 < *(_DWORD *)(v2 + 20) );\n    }\n    if ( *(int *)(v2 + 24) > 0 )\n    {\n      v17 = (_QWORD *)(v2 + 2848);\n      do\n      {\n        if ( *v17 )\n          sub_180050090(a1, *v17);\n        v18 = *(_QWORD *)(v2 + 4896);\n        if ( v18 )\n          sub_18004F890(a1, v18 + 72LL * v5);\n        ++v5;\n        ++v17;\n      }\n      while ( v5 < *(_DWORD *)(v2 + 24) );\n    }\n    v19 = *(_QWORD *)(v2 + 4896);\n    if ( v19 )\n      sub_180033C90(a1, v19);\n    sub_180033C90(a1, v2);\n  }\n  *(_OWORD *)a2 = 0;\n  *(_OWORD *)(a2 + 16) = 0;\n  *(_QWORD *)(a2 + 32) = 0;\n  return 0;\n}", "assembly": "; \n; sub_18004C5B0 from 0x18004c5b0 to 0x18004c777 (455 bytes)\n; \n; 8 xrefs:\n; > sub_18004C7C0 @ 0x18004c9df\n; > sub_18004CB30 @ 0x18004ce98\n; > sub_180050A30 @ 0x180050ab2\n; > sub_180052A90 @ 0x180052c23\n; > sub_180052E90 @ 0x180053157\n; > <???> @ 0x180181684\n; > <???> @ 0x1801816c0\n; > <???> @ 0x1801f8670\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, 0x18004c5b0\npush    rbp                                                            ; +0x2, 0x18004c5b2\npush    r13                                                            ; +0x3, 0x18004c5b3\nsub     rsp, 30h                                                       ; +0x5, 0x18004c5b5\nmov     rbx, [rdx+20h]                                                 ; +0x9, 0x18004c5b9\nmov     r13, rdx                                                       ; +0xd, 0x18004c5bd\nmov     rbp, rcx                                                       ; +0x10, 0x18004c5c0\ntest    rbx, rbx                                                       ; +0x13, 0x18004c5c3\njz      loc_18004C75B                                                  ; +0x16, 0x18004c5c6\nmov     [rsp+48h+arg_0], rsi                                           ; +0x1c, 0x18004c5cc\nmov     [rsp+48h+arg_8], rdi                                           ; +0x21, 0x18004c5d1\nxor     edi, edi                                                       ; +0x26, 0x18004c5d6\nmov     esi, edi                                                       ; +0x28, 0x18004c5d8\nmov     [rsp+48h+arg_10], r12                                          ; +0x2a, 0x18004c5da\nmov     [rsp+48h+var_20], r14                                          ; +0x2f, 0x18004c5df\ncmp     [rbx+8], edi                                                   ; +0x34, 0x18004c5e4\njle     short loc_18004C60B                                            ; +0x37, 0x18004c5e7\nlea     r14, [rbx+20h]                                                 ; +0x39, 0x18004c5e9\nnop     dword ptr [rax]                                                ; +0x3d, 0x18004c5ed\nmov     rdx, [r14]                                                     ; +0x40, 0x18004c5f0\ntest    rdx, rdx                                                       ; +0x43, 0x18004c5f3\njz      short loc_18004C600                                            ; +0x46, 0x18004c5f6\nmov     rcx, rbp                                                       ; +0x48, 0x18004c5f8\ncall    sub_180033C90                                                  ; +0x4b, 0x18004c5fb\ninc     esi                                                            ; +0x50, 0x18004c600\nadd     r14, 8                                                         ; +0x52, 0x18004c602\ncmp     esi, [rbx+8]                                                   ; +0x56, 0x18004c606\njl      short loc_18004C5F0                                            ; +0x59, 0x18004c609\nlea     r12, cs:180000000h                                             ; +0x5b, 0x18004c60b\nmov     [rsp+48h+var_28], r15                                          ; +0x62, 0x18004c612\nmov     r14d, edi                                                      ; +0x67, 0x18004c617\ncmp     [rbx+0Ch], edi                                                 ; +0x6a, 0x18004c61a\njle     short loc_18004C65B                                            ; +0x6d, 0x18004c61d\nlea     r15, [rbx+220h]                                                ; +0x6f, 0x18004c61f\nlea     rsi, [rbx+320h]                                                ; +0x76, 0x18004c626\nnop     dword ptr [rax]                                                ; +0x7d, 0x18004c62d\nmov     rdx, [rsi]                                                     ; +0x80, 0x18004c630\ntest    rdx, rdx                                                       ; +0x83, 0x18004c633\njz      short loc_18004C64A                                            ; +0x86, 0x18004c636\nmovsxd  rax, dword ptr [r15]                                           ; +0x88, 0x18004c638\nmov     rcx, rbp                                                       ; +0x8b, 0x18004c63b\nmov     r8, ds:rva off_180166E38[r12+rax*8]                            ; +0x8e, 0x18004c63e\ncall    qword ptr [r8+10h]                                             ; +0x96, 0x18004c646\ninc     r14d                                                           ; +0x9a, 0x18004c64a\nadd     rsi, 8                                                         ; +0x9d, 0x18004c64d\nadd     r15, 4                                                         ; +0xa1, 0x18004c651\ncmp     r14d, [rbx+0Ch]                                                ; +0xa5, 0x18004c655\njl      short loc_18004C630                                            ; +0xa9, 0x18004c659\nmov     r14d, edi                                                      ; +0xab, 0x18004c65b\ncmp     [rbx+10h], edi                                                 ; +0xae, 0x18004c65e\njle     short loc_18004C69C                                            ; +0xb1, 0x18004c661\nlea     r15, [rbx+520h]                                                ; +0xb3, 0x18004c663\nlea     rsi, [rbx+620h]                                                ; +0xba, 0x18004c66a\nmov     rdx, [rsi]                                                     ; +0xc1, 0x18004c671\ntest    rdx, rdx                                                       ; +0xc4, 0x18004c674\njz      short loc_18004C68B                                            ; +0xc7, 0x18004c677\nmovsxd  rax, dword ptr [r15]                                           ; +0xc9, 0x18004c679\nmov     rcx, rbp                                                       ; +0xcc, 0x18004c67c\nmov     r8, ds:rva qword_180166E10[r12+rax*8]                          ; +0xcf, 0x18004c67f\ncall    qword ptr [r8+18h]                                             ; +0xd7, 0x18004c687\ninc     r14d                                                           ; +0xdb, 0x18004c68b\nadd     rsi, 8                                                         ; +0xde, 0x18004c68e\nadd     r15, 4                                                         ; +0xe2, 0x18004c692\ncmp     r14d, [rbx+10h]                                                ; +0xe6, 0x18004c696\njl      short loc_18004C671                                            ; +0xea, 0x18004c69a\nmov     r14d, edi                                                      ; +0xec, 0x18004c69c\ncmp     [rbx+14h], edi                                                 ; +0xef, 0x18004c69f\njle     short loc_18004C6DD                                            ; +0xf2, 0x18004c6a2\nlea     r15, [rbx+820h]                                                ; +0xf4, 0x18004c6a4\nlea     rsi, [rbx+920h]                                                ; +0xfb, 0x18004c6ab\nmov     rdx, [rsi]                                                     ; +0x102, 0x18004c6b2\ntest    rdx, rdx                                                       ; +0x105, 0x18004c6b5\njz      short loc_18004C6CC                                            ; +0x108, 0x18004c6b8\nmovsxd  rax, dword ptr [r15]                                           ; +0x10a, 0x18004c6ba\nmov     rcx, rbp                                                       ; +0x10d, 0x18004c6bd\nmov     r8, ds:rva off_180166E20[r12+rax*8]                            ; +0x110, 0x18004c6c0\ncall    qword ptr [r8+18h]                                             ; +0x118, 0x18004c6c8\ninc     r14d                                                           ; +0x11c, 0x18004c6cc\nadd     rsi, 8                                                         ; +0x11f, 0x18004c6cf\nadd     r15, 4                                                         ; +0x123, 0x18004c6d3\ncmp     r14d, [rbx+14h]                                                ; +0x127, 0x18004c6d7\njl      short loc_18004C6B2                                            ; +0x12b, 0x18004c6db\nmov     r15, [rsp+48h+var_28]                                          ; +0x12d, 0x18004c6dd\nmov     r14, [rsp+48h+var_20]                                          ; +0x132, 0x18004c6e2\nmov     r12, [rsp+48h+arg_10]                                          ; +0x137, 0x18004c6e7\ncmp     [rbx+18h], edi                                                 ; +0x13c, 0x18004c6ec\njle     short loc_18004C732                                            ; +0x13f, 0x18004c6ef\nlea     rsi, [rbx+0B20h]                                               ; +0x141, 0x18004c6f1\nmov     rdx, [rsi]                                                     ; +0x148, 0x18004c6f8\ntest    rdx, rdx                                                       ; +0x14b, 0x18004c6fb\njz      short loc_18004C708                                            ; +0x14e, 0x18004c6fe\nmov     rcx, rbp                                                       ; +0x150, 0x18004c700\ncall    sub_180050090                                                  ; +0x153, 0x18004c703\nmov     rdx, [rbx+1320h]                                               ; +0x158, 0x18004c708\ntest    rdx, rdx                                                       ; +0x15f, 0x18004c70f\njz      short loc_18004C727                                            ; +0x162, 0x18004c712\nmovsxd  rax, edi                                                       ; +0x164, 0x18004c714\nlea     rcx, [rax+rax*8]                                               ; +0x167, 0x18004c717\nlea     rdx, [rdx+rcx*8]                                               ; +0x16b, 0x18004c71b\nmov     rcx, rbp                                                       ; +0x16f, 0x18004c71f\ncall    sub_18004F890                                                  ; +0x172, 0x18004c722\ninc     edi                                                            ; +0x177, 0x18004c727\nadd     rsi, 8                                                         ; +0x179, 0x18004c729\ncmp     edi, [rbx+18h]                                                 ; +0x17d, 0x18004c72d\njl      short loc_18004C6F8                                            ; +0x180, 0x18004c730\nmov     rdx, [rbx+1320h]                                               ; +0x182, 0x18004c732\nmov     rdi, [rsp+48h+arg_8]                                           ; +0x189, 0x18004c739\nmov     rsi, [rsp+48h+arg_0]                                           ; +0x18e, 0x18004c73e\ntest    rdx, rdx                                                       ; +0x193, 0x18004c743\njz      short loc_18004C750                                            ; +0x196, 0x18004c746\nmov     rcx, rbp                                                       ; +0x198, 0x18004c748\ncall    sub_180033C90                                                  ; +0x19b, 0x18004c74b\nmov     rdx, rbx                                                       ; +0x1a0, 0x18004c750\nmov     rcx, rbp                                                       ; +0x1a3, 0x18004c753\ncall    sub_180033C90                                                  ; +0x1a6, 0x18004c756\nxorps   xmm0, xmm0                                                     ; +0x1ab, 0x18004c75b\nxor     eax, eax                                                       ; +0x1ae, 0x18004c75e\nmovups  xmmword ptr [r13+0], xmm0                                      ; +0x1b0, 0x18004c760\nmovups  xmmword ptr [r13+10h], xmm0                                    ; +0x1b5, 0x18004c765\nmov     [r13+20h], rax                                                 ; +0x1ba, 0x18004c76a\nadd     rsp, 30h                                                       ; +0x1be, 0x18004c76e\npop     r13                                                            ; +0x1c2, 0x18004c772\npop     rbp                                                            ; +0x1c4, 0x18004c774\npop     rbx                                                            ; +0x1c5, 0x18004c775\nretn                                                                   ; +0x1c6, 0x18004c776", "xrefs": ["sub_18004C7C0 @ 0x18004c9df", "sub_18004CB30 @ 0x18004ce98", "sub_180050A30 @ 0x180050ab2", "sub_180052A90 @ 0x180052c23", "sub_180052E90 @ 0x180053157", "<???> @ 0x180181684", "<???> @ 0x1801816c0", "<???> @ 0x1801f8670"], "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"}