{"type": "func", "start": 6442723328, "end": 6442723614, "name": "sub_180042800", "pseudocode": "// \n// sub_180042800 from 0x180042800 to 0x18004291e (286 bytes)\n// \n// 4 xrefs:\n// > sub_180046250 @ 0x18004630d\n// > sub_180046250 @ 0x180046496\n// > sub_180046250 @ 0x18004656c\n// > <???> @ 0x1801f804c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 10:53:11 +0000\n// \n\n__int64 __fastcall sub_180042800(__int64 a1, _DWORD *a2, unsigned int a3)\n{\n  unsigned int v3; // esi\n  int v6; // ecx\n  unsigned int v7; // ebx\n  unsigned int v8; // ebx\n  unsigned int v9; // eax\n  unsigned int v11; // [rsp+50h] [rbp+18h] BYREF\n  unsigned int v12; // [rsp+58h] [rbp+20h] BYREF\n\n  v3 = a3;\n  if ( a3 )\n  {\n    v6 = a2[6] & 7;\n    if ( v6 )\n    {\n      v7 = a3;\n      if ( 8 - v6 < a3 )\n        v7 = 8 - v6;\n      if ( !(unsigned int)sub_180041D20(a1, (__int64)a2, &v12, v7) )\n        return 0;\n      v3 -= v7;\n    }\n    v8 = v3 >> 3;\n    if ( v3 >> 3 )\n    {\n      while ( a2[6] )\n      {\n        if ( !(unsigned int)sub_180041D20(a1, (__int64)a2, &v11, 8u) )\n          return 0;\n        if ( !--v8 )\n          goto LABEL_20;\n      }\n      if ( v8 < 4 )\n        goto LABEL_18;\n      do\n      {\n        v9 = a2[5];\n        if ( v9 >= a2[3] )\n        {\n          if ( !(unsigned int)sub_180042A00(a1, a2) )\n            return 0;\n        }\n        else\n        {\n          a2[5] = v9 + 1;\n          v8 -= 4;\n        }\n      }\n      while ( v8 >= 4 );\n      if ( !v8 )\n      {\nLABEL_20:\n        v3 &= 7u;\n        goto LABEL_21;\n      }\nLABEL_18:\n      while ( (unsigned int)sub_180041D20(a1, (__int64)a2, &v11, 8u) )\n      {\n        if ( !--v8 )\n          goto LABEL_20;\n      }\n      return 0;\n    }\nLABEL_21:\n    if ( v3 && !(unsigned int)sub_180041D20(a1, (__int64)a2, &v12, v3) )\n      return 0;\n  }\n  return 1;\n}", "assembly": "; \n; sub_180042800 from 0x180042800 to 0x18004291e (286 bytes)\n; \n; 4 xrefs:\n; > sub_180046250 @ 0x18004630d\n; > sub_180046250 @ 0x180046496\n; > sub_180046250 @ 0x18004656c\n; > <???> @ 0x1801f804c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 10:53:11 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180042800\npush    rbp                                                            ; +0x5, 0x180042805\npush    rsi                                                            ; +0x6, 0x180042806\npush    rdi                                                            ; +0x7, 0x180042807\nsub     rsp, 20h                                                       ; +0x8, 0x180042808\nmov     esi, r8d                                                       ; +0xc, 0x18004280c\nmov     rdi, rdx                                                       ; +0xf, 0x18004280f\nmov     rbp, rcx                                                       ; +0x12, 0x180042812\ntest    r8d, r8d                                                       ; +0x15, 0x180042815\njz      loc_18004290C                                                  ; +0x18, 0x180042818\nmov     ecx, [rdx+18h]                                                 ; +0x1e, 0x18004281e\nand     ecx, 7                                                         ; +0x21, 0x180042821\njz      short loc_180042850                                            ; +0x24, 0x180042824\nmov     ebx, r8d                                                       ; +0x26, 0x180042826\nmov     eax, 8                                                         ; +0x29, 0x180042829\nsub     eax, ecx                                                       ; +0x2e, 0x18004282e\nmov     rcx, rbp                                                       ; +0x30, 0x180042830\ncmp     eax, r8d                                                       ; +0x33, 0x180042833\nlea     r8, [rsp+38h+arg_18]                                           ; +0x36, 0x180042836\ncmovb   ebx, eax                                                       ; +0x3b, 0x18004283b\nmov     r9d, ebx                                                       ; +0x3e, 0x18004283e\ncall    sub_180041D20                                                  ; +0x41, 0x180042841\ntest    eax, eax                                                       ; +0x46, 0x180042846\njz      loc_1800428FD                                                  ; +0x48, 0x180042848\nsub     esi, ebx                                                       ; +0x4e, 0x18004284e\nmov     ebx, esi                                                       ; +0x50, 0x180042850\nshr     ebx, 3                                                         ; +0x52, 0x180042852\ntest    ebx, ebx                                                       ; +0x55, 0x180042855\njz      loc_1800428E2                                                  ; +0x57, 0x180042857\nnop     dword ptr [rax]                                                ; +0x5d, 0x18004285d\ncmp     dword ptr [rdi+18h], 0                                         ; +0x60, 0x180042860\njz      short loc_180042887                                            ; +0x64, 0x180042864\nmov     r9d, 8                                                         ; +0x66, 0x180042866\nlea     r8, [rsp+38h+arg_10]                                           ; +0x6c, 0x18004286c\nmov     rdx, rdi                                                       ; +0x71, 0x180042871\nmov     rcx, rbp                                                       ; +0x74, 0x180042874\ncall    sub_180041D20                                                  ; +0x77, 0x180042877\ntest    eax, eax                                                       ; +0x7c, 0x18004287c\njz      short loc_1800428FD                                            ; +0x7e, 0x18004287e\nadd     ebx, 0FFFFFFFFh                                                ; +0x80, 0x180042880\njnz     short loc_180042860                                            ; +0x83, 0x180042883\njmp     short loc_1800428DF                                            ; +0x85, 0x180042885\ncmp     ebx, 4                                                         ; +0x87, 0x180042887\njb      short loc_1800428C0                                            ; +0x8a, 0x18004288a\nnop     dword ptr [rax+00h]                                            ; +0x8c, 0x18004288c\nmov     eax, [rdi+14h]                                                 ; +0x90, 0x180042890\ncmp     eax, [rdi+0Ch]                                                 ; +0x93, 0x180042893\njnb     short loc_1800428A2                                            ; +0x96, 0x180042896\ninc     eax                                                            ; +0x98, 0x180042898\nmov     [rdi+14h], eax                                                 ; +0x9a, 0x18004289a\nadd     ebx, 0FFFFFFFCh                                                ; +0x9d, 0x18004289d\njmp     short loc_1800428B1                                            ; +0xa0, 0x1800428a0\nmov     rdx, rdi                                                       ; +0xa2, 0x1800428a2\nmov     rcx, rbp                                                       ; +0xa5, 0x1800428a5\ncall    sub_180042A00                                                  ; +0xa8, 0x1800428a8\ntest    eax, eax                                                       ; +0xad, 0x1800428ad\njz      short loc_1800428FD                                            ; +0xaf, 0x1800428af\ncmp     ebx, 4                                                         ; +0xb1, 0x1800428b1\njnb     short loc_180042890                                            ; +0xb4, 0x1800428b4\ntest    ebx, ebx                                                       ; +0xb6, 0x1800428b6\njz      short loc_1800428DF                                            ; +0xb8, 0x1800428b8\nnop     word ptr [rax+rax+00h]                                         ; +0xba, 0x1800428ba\nmov     r9d, 8                                                         ; +0xc0, 0x1800428c0\nlea     r8, [rsp+38h+arg_10]                                           ; +0xc6, 0x1800428c6\nmov     rdx, rdi                                                       ; +0xcb, 0x1800428cb\nmov     rcx, rbp                                                       ; +0xce, 0x1800428ce\ncall    sub_180041D20                                                  ; +0xd1, 0x1800428d1\ntest    eax, eax                                                       ; +0xd6, 0x1800428d6\njz      short loc_1800428FD                                            ; +0xd8, 0x1800428d8\nadd     ebx, 0FFFFFFFFh                                                ; +0xda, 0x1800428da\njnz     short loc_1800428C0                                            ; +0xdd, 0x1800428dd\nand     esi, 7                                                         ; +0xdf, 0x1800428df\ntest    esi, esi                                                       ; +0xe2, 0x1800428e2\njz      short loc_18004290C                                            ; +0xe4, 0x1800428e4\nmov     r9d, esi                                                       ; +0xe6, 0x1800428e6\nlea     r8, [rsp+38h+arg_18]                                           ; +0xe9, 0x1800428e9\nmov     rdx, rdi                                                       ; +0xee, 0x1800428ee\nmov     rcx, rbp                                                       ; +0xf1, 0x1800428f1\ncall    sub_180041D20                                                  ; +0xf4, 0x1800428f4\ntest    eax, eax                                                       ; +0xf9, 0x1800428f9\njnz     short loc_18004290C                                            ; +0xfb, 0x1800428fb\nxor     eax, eax                                                       ; +0xfd, 0x1800428fd\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xff, 0x1800428ff\nadd     rsp, 20h                                                       ; +0x104, 0x180042904\npop     rdi                                                            ; +0x108, 0x180042908\npop     rsi                                                            ; +0x109, 0x180042909\npop     rbp                                                            ; +0x10a, 0x18004290a\nretn                                                                   ; +0x10b, 0x18004290b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x10c, 0x18004290c\nmov     eax, 1                                                         ; +0x111, 0x180042911\nadd     rsp, 20h                                                       ; +0x116, 0x180042916\npop     rdi                                                            ; +0x11a, 0x18004291a\npop     rsi                                                            ; +0x11b, 0x18004291b\npop     rbp                                                            ; +0x11c, 0x18004291c\nretn                                                                   ; +0x11d, 0x18004291d", "xrefs": ["sub_180046250 @ 0x18004630d", "sub_180046250 @ 0x180046496", "sub_180046250 @ 0x18004656c", "<???> @ 0x1801f804c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}