{"type": "func", "start": 6443319872, "end": 6443320009, "name": "sub_1800D4240", "pseudocode": "// \n// sub_1800D4240 from 0x1800d4240 to 0x1800d42c9 (137 bytes)\n// \n// 4 xrefs:\n// > sub_1800D3B90 @ 0x1800d3bb4\n// > <???> @ 0x180142bc0\n// > <???> @ 0x180142bd4\n// > <???> @ 0x1801ba680\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_1800D4240(__int64 a1)\n{\n  __int64 result; // rax\n  __int64 v3; // rdi\n  int v4; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( *(_QWORD *)(a1 + 152) )\n    return 1;\n  result = sub_1800DADD0(a1, &v4);\n  v3 = result;\n  if ( result )\n  {\n    qsort((void *)result, v4, 0x18u, (_CoreCrtNonSecureSearchSortCompareFunction)sub_1800D4130);\n    free(*(void **)(a1 + 152));\n    *(_DWORD *)(a1 + 160) = v4;\n    *(_QWORD *)(a1 + 152) = v3;\n    return 1;\n  }\n  return result;\n}", "assembly": "; \n; sub_1800D4240 from 0x1800d4240 to 0x1800d42c9 (137 bytes)\n; \n; 4 xrefs:\n; > sub_1800D3B90 @ 0x1800d3bb4\n; > <???> @ 0x180142bc0\n; > <???> @ 0x180142bd4\n; > <???> @ 0x1801ba680\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, 0x1800d4240\nsub     rsp, 20h                                                       ; +0x2, 0x1800d4242\ncmp     qword ptr [rcx+98h], 0                                         ; +0x6, 0x1800d4246\nmov     rbx, rcx                                                       ; +0xe, 0x1800d424e\njz      short loc_1800D425E                                            ; +0x11, 0x1800d4251\nmov     eax, 1                                                         ; +0x13, 0x1800d4253\nadd     rsp, 20h                                                       ; +0x18, 0x1800d4258\npop     rbx                                                            ; +0x1c, 0x1800d425c\nretn                                                                   ; +0x1d, 0x1800d425d\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x1e, 0x1800d425e\nmov     [rsp+28h+arg_8], rdi                                           ; +0x23, 0x1800d4263\ncall    sub_1800DADD0                                                  ; +0x28, 0x1800d4268\nmov     rdi, rax                                                       ; +0x2d, 0x1800d426d\ntest    rax, rax                                                       ; +0x30, 0x1800d4270\njnz     short loc_1800D4280                                            ; +0x33, 0x1800d4273\nmov     rdi, [rsp+28h+arg_8]                                           ; +0x35, 0x1800d4275\nadd     rsp, 20h                                                       ; +0x3a, 0x1800d427a\npop     rbx                                                            ; +0x3e, 0x1800d427e\nretn                                                                   ; +0x3f, 0x1800d427f\nmovsxd  rdx, [rsp+28h+arg_0]; NumOfElements                            ; +0x40, 0x1800d4280\nlea     r9, sub_1800D4130; CompareFunction                             ; +0x45, 0x1800d4285\nmov     r8d, 18h; SizeOfElements                                       ; +0x4c, 0x1800d428c\nmov     rcx, rdi; Base                                                 ; +0x52, 0x1800d4292\ncall    cs:qsort                                                       ; +0x55, 0x1800d4295\nmov     rcx, [rbx+98h]; Block                                          ; +0x5b, 0x1800d429b\ncall    cs:__imp_free                                                  ; +0x62, 0x1800d42a2\nmov     eax, [rsp+28h+arg_0]                                           ; +0x68, 0x1800d42a8\nmov     [rbx+0A0h], eax                                                ; +0x6c, 0x1800d42ac\nmov     eax, 1                                                         ; +0x72, 0x1800d42b2\nmov     [rbx+98h], rdi                                                 ; +0x77, 0x1800d42b7\nmov     rdi, [rsp+28h+arg_8]                                           ; +0x7e, 0x1800d42be\nadd     rsp, 20h                                                       ; +0x83, 0x1800d42c3\npop     rbx                                                            ; +0x87, 0x1800d42c7\nretn                                                                   ; +0x88, 0x1800d42c8", "xrefs": ["sub_1800D3B90 @ 0x1800d3bb4", "<???> @ 0x180142bc0", "<???> @ 0x180142bd4", "<???> @ 0x1801ba680"], "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"}