{"type": "func", "start": 6442720176, "end": 6442720453, "name": "sub_180041BB0", "pseudocode": "// \n// sub_180041BB0 from 0x180041bb0 to 0x180041cc5 (277 bytes)\n// \n// 12 xrefs:\n// > sub_180045B60 @ 0x180045ece\n// > sub_180045B60 @ 0x18004600b\n// > sub_180045B60 @ 0x180046092\n// > sub_180046250 @ 0x180046298\n// > sub_180046250 @ 0x180046413\n// > sub_1800465B0 @ 0x180046670\n// > sub_1800465B0 @ 0x1800466ec\n// > sub_1800465B0 @ 0x1800467ed\n// > sub_180046810 @ 0x180046a11\n// > sub_180046A60 @ 0x180046ad9\n// > sub_180046A60 @ 0x180046ba0\n// > <???> @ 0x1801f7fe0\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_180041BB0(__int64 a1, __int64 a2, _BYTE *a3, unsigned int a4)\n{\n  unsigned int v4; // edi\n  __int64 v9; // r8\n  int v10; // edx\n  char v11; // [rsp+48h] [rbp+20h] BYREF\n\n  v4 = a4;\n  if ( a4 )\n  {\n    while ( *(_DWORD *)(a2 + 24) )\n    {\n      if ( !(unsigned int)sub_180041D20(a1, a2, &v11, 8) )\n        return 0;\n      *a3++ = v11;\n      if ( !--v4 )\n        return 1;\n    }\n    if ( v4 < 4 )\n      goto LABEL_12;\n    do\n    {\n      v9 = *(unsigned int *)(a2 + 20);\n      if ( (unsigned int)v9 >= *(_DWORD *)(a2 + 12) )\n      {\n        if ( !(unsigned int)sub_180042A00(a1, a2) )\n          return 0;\n      }\n      else\n      {\n        v10 = *(_DWORD *)(*(_QWORD *)a2 + 4 * v9);\n        *(_DWORD *)(a2 + 20) = v9 + 1;\n        *a3 = HIBYTE(v10);\n        a3[1] = BYTE2(v10);\n        a3[2] = BYTE1(v10);\n        a3[3] = v10;\n        a3 += 4;\n        v4 -= 4;\n      }\n    }\n    while ( v4 >= 4 );\n    if ( v4 )\n    {\nLABEL_12:\n      while ( (unsigned int)sub_180041D20(a1, a2, &v11, 8) )\n      {\n        *a3++ = v11;\n        if ( !--v4 )\n          return 1;\n      }\n      return 0;\n    }\n  }\n  return 1;\n}", "assembly": "; \n; sub_180041BB0 from 0x180041bb0 to 0x180041cc5 (277 bytes)\n; \n; 12 xrefs:\n; > sub_180045B60 @ 0x180045ece\n; > sub_180045B60 @ 0x18004600b\n; > sub_180045B60 @ 0x180046092\n; > sub_180046250 @ 0x180046298\n; > sub_180046250 @ 0x180046413\n; > sub_1800465B0 @ 0x180046670\n; > sub_1800465B0 @ 0x1800466ec\n; > sub_1800465B0 @ 0x1800467ed\n; > sub_180046810 @ 0x180046a11\n; > sub_180046A60 @ 0x180046ad9\n; > sub_180046A60 @ 0x180046ba0\n; > <???> @ 0x1801f7fe0\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_0], rbx                                               ; +0x0, 0x180041bb0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180041bb5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x180041bba\npush    rdi                                                            ; +0xf, 0x180041bbf\nsub     rsp, 20h                                                       ; +0x10, 0x180041bc0\nmov     edi, r9d                                                       ; +0x14, 0x180041bc4\nmov     rbx, r8                                                        ; +0x17, 0x180041bc7\nmov     rsi, rdx                                                       ; +0x1a, 0x180041bca\nmov     rbp, rcx                                                       ; +0x1d, 0x180041bcd\ntest    r9d, r9d                                                       ; +0x20, 0x180041bd0\njz      short loc_180041C08                                            ; +0x23, 0x180041bd3\ncmp     dword ptr [rsi+18h], 0                                         ; +0x25, 0x180041bd5\njz      short loc_180041C22                                            ; +0x29, 0x180041bd9\nmov     r9d, 8                                                         ; +0x2b, 0x180041bdb\nlea     r8, [rsp+28h+arg_18]                                           ; +0x31, 0x180041be1\nmov     rdx, rsi                                                       ; +0x36, 0x180041be6\nmov     rcx, rbp                                                       ; +0x39, 0x180041be9\ncall    sub_180041D20                                                  ; +0x3c, 0x180041bec\ntest    eax, eax                                                       ; +0x41, 0x180041bf1\njz      loc_180041CBE                                                  ; +0x43, 0x180041bf3\nmovzx   eax, [rsp+28h+arg_18]                                          ; +0x49, 0x180041bf9\nmov     [rbx], al                                                      ; +0x4e, 0x180041bfe\ninc     rbx                                                            ; +0x50, 0x180041c00\nadd     edi, 0FFFFFFFFh                                                ; +0x53, 0x180041c03\njnz     short loc_180041BD5                                            ; +0x56, 0x180041c06\nmov     eax, 1                                                         ; +0x58, 0x180041c08\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x5d, 0x180041c0d\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x62, 0x180041c12\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x67, 0x180041c17\nadd     rsp, 20h                                                       ; +0x6c, 0x180041c1c\npop     rdi                                                            ; +0x70, 0x180041c20\nretn                                                                   ; +0x71, 0x180041c21\ncmp     edi, 4                                                         ; +0x72, 0x180041c22\njb      short loc_180041C90                                            ; +0x75, 0x180041c25\nnop     word ptr [rax+rax+00000000h]                                   ; +0x77, 0x180041c27\nmov     r8d, [rsi+14h]                                                 ; +0x80, 0x180041c30\ncmp     r8d, [rsi+0Ch]                                                 ; +0x84, 0x180041c34\njnb     short loc_180041C6B                                            ; +0x88, 0x180041c38\nmov     rax, [rsi]                                                     ; +0x8a, 0x180041c3a\nmov     edx, [rax+r8*4]                                                ; +0x8d, 0x180041c3d\nlea     eax, [r8+1]                                                    ; +0x91, 0x180041c41\nmov     [rsi+14h], eax                                                 ; +0x95, 0x180041c45\nmov     eax, edx                                                       ; +0x98, 0x180041c48\nshr     eax, 18h                                                       ; +0x9a, 0x180041c4a\nmov     [rbx], al                                                      ; +0x9d, 0x180041c4d\nmov     eax, edx                                                       ; +0x9f, 0x180041c4f\nshr     eax, 10h                                                       ; +0xa1, 0x180041c51\nmov     [rbx+1], al                                                    ; +0xa4, 0x180041c54\nmov     eax, edx                                                       ; +0xa7, 0x180041c57\nshr     eax, 8                                                         ; +0xa9, 0x180041c59\nmov     [rbx+2], al                                                    ; +0xac, 0x180041c5c\nmov     [rbx+3], dl                                                    ; +0xaf, 0x180041c5f\nadd     rbx, 4                                                         ; +0xb2, 0x180041c62\nadd     edi, 0FFFFFFFCh                                                ; +0xb6, 0x180041c66\njmp     short loc_180041C7A                                            ; +0xb9, 0x180041c69\nmov     rdx, rsi                                                       ; +0xbb, 0x180041c6b\nmov     rcx, rbp                                                       ; +0xbe, 0x180041c6e\ncall    sub_180042A00                                                  ; +0xc1, 0x180041c71\ntest    eax, eax                                                       ; +0xc6, 0x180041c76\njz      short loc_180041CBE                                            ; +0xc8, 0x180041c78\nmov     eax, edi                                                       ; +0xca, 0x180041c7a\ncmp     edi, 4                                                         ; +0xcc, 0x180041c7c\njnb     short loc_180041C30                                            ; +0xcf, 0x180041c7f\ntest    eax, eax                                                       ; +0xd1, 0x180041c81\njz      short loc_180041C08                                            ; +0xd3, 0x180041c83\nnop     word ptr [rax+rax+00000000h]                                   ; +0xd5, 0x180041c85\nmov     r9d, 8                                                         ; +0xe0, 0x180041c90\nlea     r8, [rsp+28h+arg_18]                                           ; +0xe6, 0x180041c96\nmov     rdx, rsi                                                       ; +0xeb, 0x180041c9b\nmov     rcx, rbp                                                       ; +0xee, 0x180041c9e\ncall    sub_180041D20                                                  ; +0xf1, 0x180041ca1\ntest    eax, eax                                                       ; +0xf6, 0x180041ca6\njz      short loc_180041CBE                                            ; +0xf8, 0x180041ca8\nmovzx   eax, [rsp+28h+arg_18]                                          ; +0xfa, 0x180041caa\nmov     [rbx], al                                                      ; +0xff, 0x180041caf\ninc     rbx                                                            ; +0x101, 0x180041cb1\nadd     edi, 0FFFFFFFFh                                                ; +0x104, 0x180041cb4\njnz     short loc_180041C90                                            ; +0x107, 0x180041cb7\njmp     loc_180041C08                                                  ; +0x109, 0x180041cb9\nxor     eax, eax                                                       ; +0x10e, 0x180041cbe\njmp     loc_180041C0D                                                  ; +0x110, 0x180041cc0", "xrefs": ["sub_180045B60 @ 0x180045ece", "sub_180045B60 @ 0x18004600b", "sub_180045B60 @ 0x180046092", "sub_180046250 @ 0x180046298", "sub_180046250 @ 0x180046413", "sub_1800465B0 @ 0x180046670", "sub_1800465B0 @ 0x1800466ec", "sub_1800465B0 @ 0x1800467ed", "sub_180046810 @ 0x180046a11", "sub_180046A60 @ 0x180046ad9", "sub_180046A60 @ 0x180046ba0", "<???> @ 0x1801f7fe0"], "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"}