{"type": "func", "start": 6443122544, "end": 6443123085, "name": "sub_1800A3F70", "pseudocode": "// \n// sub_1800A3F70 from 0x1800a3f70 to 0x1800a418d (541 bytes)\n// \n// 4 xrefs:\n// > sub_1800A5760 @ 0x1800a5815\n// > <???> @ 0x180148814\n// > <???> @ 0x180148848\n// > <???> @ 0x1801c19c8\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 11:22:15 +0000\n// \n\n__int64 __fastcall sub_1800A3F70(__int64 a1, __int64 a2)\n{\n  unsigned __int64 v4; // r15\n  __int64 v5; // r12\n  unsigned __int64 v6; // rax\n  unsigned __int64 v7; // rbx\n  char *v8; // rbp\n  unsigned __int64 i; // r14\n  __int64 v10; // r13\n  unsigned int v11; // ebx\n  signed int v12; // edx\n  char *v13; // rax\n  char *v14; // rcx\n  __int64 v15; // rbx\n  unsigned __int64 v17; // [rsp+70h] [rbp+18h] BYREF\n  __int64 v18; // [rsp+78h] [rbp+20h] BYREF\n\n  v4 = 0xFFFF;\n  v5 = 0;\n  if ( (unsigned int)sub_1800A3520(a1, a2, 0) )\n    return 0;\n  v6 = sub_1800A3550(a1);\n  v17 = v6;\n  v7 = v6;\n  if ( v6 < 0xFFFF )\n    v4 = v6;\n  v8 = (char *)malloc(0x404u);\n  if ( !v8 )\n    return 0;\n  for ( i = 4; i < v4; v7 = v17 )\n  {\n    i += 1024LL;\n    if ( i > v4 )\n      i = v4;\n    v10 = v7 - i;\n    v11 = i;\n    if ( i > 0x404 )\n      v11 = 1028;\n    if ( (unsigned int)sub_1800A3520(a1, a2, v10)\n      || (*(unsigned int (__fastcall **)(_QWORD, __int64, char *, _QWORD))(a1 + 8))(*(_QWORD *)(a1 + 56), a2, v8, v11) != v11 )\n    {\n      break;\n    }\n    v12 = v11 - 3;\n    if ( (int)(v11 - 3) > 0 )\n    {\n      v13 = &v8[v12 + 3];\n      while ( 1 )\n      {\n        v14 = v13;\n        --v12;\n        if ( *(--v13 - 3) == 80 && *(v14 - 3) == 75 && *(v13 - 1) == 6 && *v13 == 7 )\n          break;\n        if ( (__int64)&v13[-3LL - (_QWORD)v8] <= 0 )\n          goto LABEL_21;\n      }\n      v5 = v10 + v12;\n      if ( v5 )\n        break;\n    }\nLABEL_21:\n    ;\n  }\n  free(v8);\n  if ( !v5 )\n    return 0;\n  if ( (unsigned int)sub_1800A3520(a1, a2, v5) )\n    return 0;\n  if ( (unsigned int)sub_1800A4410(a1, a2, &v17) )\n    return 0;\n  if ( (unsigned int)sub_1800A4410(a1, a2, &v17) )\n    return 0;\n  if ( (_DWORD)v17 )\n    return 0;\n  if ( (unsigned int)sub_1800A4190(a1, a2, &v18) )\n    return 0;\n  if ( (unsigned int)sub_1800A4410(a1, a2, &v17) )\n    return 0;\n  if ( (_DWORD)v17 != 1 )\n    return 0;\n  v15 = v18;\n  if ( (unsigned int)sub_1800A3520(a1, a2, v18) || (unsigned int)sub_1800A4410(a1, a2, &v17) || (_DWORD)v17 != 101075792 )\n    return 0;\n  else\n    return v15;\n}", "assembly": "; \n; sub_1800A3F70 from 0x1800a3f70 to 0x1800a418d (541 bytes)\n; \n; 4 xrefs:\n; > sub_1800A5760 @ 0x1800a5815\n; > <???> @ 0x180148814\n; > <???> @ 0x180148848\n; > <???> @ 0x1801c19c8\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 11:22:15 +0000\n; \npush    rbx                                                            ; +0x0, 0x1800a3f70\npush    rbp                                                            ; +0x2, 0x1800a3f72\npush    rsi                                                            ; +0x3, 0x1800a3f73\npush    rdi                                                            ; +0x4, 0x1800a3f74\npush    r12                                                            ; +0x5, 0x1800a3f75\npush    r15                                                            ; +0x7, 0x1800a3f77\nsub     rsp, 28h                                                       ; +0x9, 0x1800a3f79\nmov     r9d, 2                                                         ; +0xd, 0x1800a3f7d\nxor     r8d, r8d                                                       ; +0x13, 0x1800a3f83\nmov     rsi, rdx                                                       ; +0x16, 0x1800a3f86\nmov     rdi, rcx                                                       ; +0x19, 0x1800a3f89\nmov     r15d, 0FFFFh                                                   ; +0x1c, 0x1800a3f8c\nxor     r12d, r12d                                                     ; +0x22, 0x1800a3f92\ncall    sub_1800A3520                                                  ; +0x25, 0x1800a3f95\ntest    eax, eax                                                       ; +0x2a, 0x1800a3f9a\njnz     loc_1800A417E                                                  ; +0x2c, 0x1800a3f9c\nmov     rdx, rsi                                                       ; +0x32, 0x1800a3fa2\nmov     rcx, rdi                                                       ; +0x35, 0x1800a3fa5\ncall    sub_1800A3550                                                  ; +0x38, 0x1800a3fa8\ncmp     rax, r15                                                       ; +0x3d, 0x1800a3fad\nmov     [rsp+58h+arg_10], rax                                          ; +0x40, 0x1800a3fb0\nmov     ecx, 404h; Size                                                ; +0x45, 0x1800a3fb5\nmov     rbx, rax                                                       ; +0x4a, 0x1800a3fba\ncmovb   r15, rax                                                       ; +0x4d, 0x1800a3fbd\ncall    cs:__imp_malloc                                                ; +0x51, 0x1800a3fc1\nmov     rbp, rax                                                       ; +0x57, 0x1800a3fc7\ntest    rax, rax                                                       ; +0x5a, 0x1800a3fca\njz      loc_1800A417E                                                  ; +0x5d, 0x1800a3fcd\nmov     [rsp+58h+var_38], r14                                          ; +0x63, 0x1800a3fd3\nmov     r14d, 4                                                        ; +0x68, 0x1800a3fd8\ncmp     r14, r15                                                       ; +0x6e, 0x1800a3fde\njnb     loc_1800A40A5                                                  ; +0x71, 0x1800a3fe1\nmov     [rsp+58h+arg_0], r13                                           ; +0x77, 0x1800a3fe7\nnop     dword ptr [rax+00h]                                            ; +0x7c, 0x1800a3fec\nlea     rcx, [r14+400h]                                                ; +0x80, 0x1800a3ff0\nmov     r13, rbx                                                       ; +0x87, 0x1800a3ff7\ncmp     rcx, r15                                                       ; +0x8a, 0x1800a3ffa\nmov     r14, rcx                                                       ; +0x8d, 0x1800a3ffd\nmov     eax, 404h                                                      ; +0x90, 0x1800a4000\nmov     rdx, rsi                                                       ; +0x95, 0x1800a4005\ncmova   r14, r15                                                       ; +0x98, 0x1800a4008\nmov     rcx, rdi                                                       ; +0x9c, 0x1800a400c\nsub     r13, r14                                                       ; +0x9f, 0x1800a400f\nsub     ebx, r13d                                                      ; +0xa2, 0x1800a4012\nmov     r8, r13                                                        ; +0xa5, 0x1800a4015\ncmp     r14, rax                                                       ; +0xa8, 0x1800a4018\ncmova   ebx, eax                                                       ; +0xab, 0x1800a401b\nxor     r9d, r9d                                                       ; +0xae, 0x1800a401e\ncall    sub_1800A3520                                                  ; +0xb1, 0x1800a4021\ntest    eax, eax                                                       ; +0xb6, 0x1800a4026\njnz     short loc_1800A40A0                                            ; +0xb8, 0x1800a4028\nmov     rax, [rdi+8]                                                   ; +0xba, 0x1800a402a\nmov     r9d, ebx                                                       ; +0xbe, 0x1800a402e\nmov     rcx, [rdi+38h]                                                 ; +0xc1, 0x1800a4031\nmov     r8, rbp                                                        ; +0xc5, 0x1800a4035\nmov     rdx, rsi                                                       ; +0xc8, 0x1800a4038\ncall    rax                                                            ; +0xcb, 0x1800a403b\ncmp     eax, ebx                                                       ; +0xcd, 0x1800a403d\njnz     short loc_1800A40A0                                            ; +0xcf, 0x1800a403f\nlea     edx, [rbx-3]                                                   ; +0xd1, 0x1800a4041\ntest    edx, edx                                                       ; +0xd4, 0x1800a4044\njle     short loc_1800A4092                                            ; +0xd6, 0x1800a4046\nmovsxd  rax, edx                                                       ; +0xd8, 0x1800a4048\nmov     r8, 0FFFFFFFFFFFFFFFDh                                         ; +0xdb, 0x1800a404b\nadd     rax, 3                                                         ; +0xe2, 0x1800a4052\nadd     rax, rbp                                                       ; +0xe6, 0x1800a4056\nsub     r8, rbp                                                        ; +0xe9, 0x1800a4059\nnop     dword ptr [rax+00h]                                            ; +0xec, 0x1800a405c\nmov     rcx, rax                                                       ; +0xf0, 0x1800a4060\ndec     edx                                                            ; +0xf3, 0x1800a4063\ndec     rax                                                            ; +0xf5, 0x1800a4065\ncmp     byte ptr [rax-3], 50h ; 'P'                                    ; +0xf8, 0x1800a4068\njnz     short loc_1800A407F                                            ; +0xfc, 0x1800a406c\ncmp     byte ptr [rcx-3], 4Bh ; 'K'                                    ; +0xfe, 0x1800a406e\njnz     short loc_1800A407F                                            ; +0x102, 0x1800a4072\ncmp     byte ptr [rax-1], 6                                            ; +0x104, 0x1800a4074\njnz     short loc_1800A407F                                            ; +0x108, 0x1800a4078\ncmp     byte ptr [rax], 7                                              ; +0x10a, 0x1800a407a\njz      short loc_1800A408A                                            ; +0x10d, 0x1800a407d\nlea     rcx, [r8+rax]                                                  ; +0x10f, 0x1800a407f\ntest    rcx, rcx                                                       ; +0x113, 0x1800a4083\njg      short loc_1800A4060                                            ; +0x116, 0x1800a4086\njmp     short loc_1800A4092                                            ; +0x118, 0x1800a4088\nmovsxd  r12, edx                                                       ; +0x11a, 0x1800a408a\nadd     r12, r13                                                       ; +0x11d, 0x1800a408d\njnz     short loc_1800A40A0                                            ; +0x120, 0x1800a4090\nmov     rbx, [rsp+58h+arg_10]                                          ; +0x122, 0x1800a4092\ncmp     r14, r15                                                       ; +0x127, 0x1800a4097\njb      loc_1800A3FF0                                                  ; +0x12a, 0x1800a409a\nmov     r13, [rsp+58h+arg_0]                                           ; +0x130, 0x1800a40a0\nmov     rcx, rbp; Block                                                ; +0x135, 0x1800a40a5\ncall    cs:__imp_free                                                  ; +0x138, 0x1800a40a8\nmov     r14, [rsp+58h+var_38]                                          ; +0x13e, 0x1800a40ae\ntest    r12, r12                                                       ; +0x143, 0x1800a40b3\njz      loc_1800A417E                                                  ; +0x146, 0x1800a40b6\nxor     r9d, r9d                                                       ; +0x14c, 0x1800a40bc\nmov     r8, r12                                                        ; +0x14f, 0x1800a40bf\nmov     rdx, rsi                                                       ; +0x152, 0x1800a40c2\nmov     rcx, rdi                                                       ; +0x155, 0x1800a40c5\ncall    sub_1800A3520                                                  ; +0x158, 0x1800a40c8\ntest    eax, eax                                                       ; +0x15d, 0x1800a40cd\njnz     loc_1800A417E                                                  ; +0x15f, 0x1800a40cf\nlea     r8, [rsp+58h+arg_10]                                           ; +0x165, 0x1800a40d5\nmov     rdx, rsi                                                       ; +0x16a, 0x1800a40da\nmov     rcx, rdi                                                       ; +0x16d, 0x1800a40dd\ncall    sub_1800A4410                                                  ; +0x170, 0x1800a40e0\ntest    eax, eax                                                       ; +0x175, 0x1800a40e5\njnz     loc_1800A417E                                                  ; +0x177, 0x1800a40e7\nlea     r8, [rsp+58h+arg_10]                                           ; +0x17d, 0x1800a40ed\nmov     rdx, rsi                                                       ; +0x182, 0x1800a40f2\nmov     rcx, rdi                                                       ; +0x185, 0x1800a40f5\ncall    sub_1800A4410                                                  ; +0x188, 0x1800a40f8\ntest    eax, eax                                                       ; +0x18d, 0x1800a40fd\njnz     short loc_1800A417E                                            ; +0x18f, 0x1800a40ff\ncmp     dword ptr [rsp+58h+arg_10], eax                                ; +0x191, 0x1800a4101\njnz     short loc_1800A417E                                            ; +0x195, 0x1800a4105\nlea     r8, [rsp+58h+arg_18]                                           ; +0x197, 0x1800a4107\nmov     rdx, rsi                                                       ; +0x19c, 0x1800a410c\nmov     rcx, rdi                                                       ; +0x19f, 0x1800a410f\ncall    sub_1800A4190                                                  ; +0x1a2, 0x1800a4112\ntest    eax, eax                                                       ; +0x1a7, 0x1800a4117\njnz     short loc_1800A417E                                            ; +0x1a9, 0x1800a4119\nlea     r8, [rsp+58h+arg_10]                                           ; +0x1ab, 0x1800a411b\nmov     rdx, rsi                                                       ; +0x1b0, 0x1800a4120\nmov     rcx, rdi                                                       ; +0x1b3, 0x1800a4123\ncall    sub_1800A4410                                                  ; +0x1b6, 0x1800a4126\ntest    eax, eax                                                       ; +0x1bb, 0x1800a412b\njnz     short loc_1800A417E                                            ; +0x1bd, 0x1800a412d\ncmp     dword ptr [rsp+58h+arg_10], 1                                  ; +0x1bf, 0x1800a412f\njnz     short loc_1800A417E                                            ; +0x1c4, 0x1800a4134\nmov     rbx, [rsp+58h+arg_18]                                          ; +0x1c6, 0x1800a4136\nxor     r9d, r9d                                                       ; +0x1cb, 0x1800a413b\nmov     r8, rbx                                                        ; +0x1ce, 0x1800a413e\nmov     rdx, rsi                                                       ; +0x1d1, 0x1800a4141\nmov     rcx, rdi                                                       ; +0x1d4, 0x1800a4144\ncall    sub_1800A3520                                                  ; +0x1d7, 0x1800a4147\ntest    eax, eax                                                       ; +0x1dc, 0x1800a414c\njnz     short loc_1800A417E                                            ; +0x1de, 0x1800a414e\nlea     r8, [rsp+58h+arg_10]                                           ; +0x1e0, 0x1800a4150\nmov     rdx, rsi                                                       ; +0x1e5, 0x1800a4155\nmov     rcx, rdi                                                       ; +0x1e8, 0x1800a4158\ncall    sub_1800A4410                                                  ; +0x1eb, 0x1800a415b\ntest    eax, eax                                                       ; +0x1f0, 0x1800a4160\njnz     short loc_1800A417E                                            ; +0x1f2, 0x1800a4162\ncmp     dword ptr [rsp+58h+arg_10], 6064B50h                           ; +0x1f4, 0x1800a4164\njnz     short loc_1800A417E                                            ; +0x1fc, 0x1800a416c\nmov     rax, rbx                                                       ; +0x1fe, 0x1800a416e\nadd     rsp, 28h                                                       ; +0x201, 0x1800a4171\npop     r15                                                            ; +0x205, 0x1800a4175\npop     r12                                                            ; +0x207, 0x1800a4177\npop     rdi                                                            ; +0x209, 0x1800a4179\npop     rsi                                                            ; +0x20a, 0x1800a417a\npop     rbp                                                            ; +0x20b, 0x1800a417b\npop     rbx                                                            ; +0x20c, 0x1800a417c\nretn                                                                   ; +0x20d, 0x1800a417d\nxor     eax, eax                                                       ; +0x20e, 0x1800a417e\nadd     rsp, 28h                                                       ; +0x210, 0x1800a4180\npop     r15                                                            ; +0x214, 0x1800a4184\npop     r12                                                            ; +0x216, 0x1800a4186\npop     rdi                                                            ; +0x218, 0x1800a4188\npop     rsi                                                            ; +0x219, 0x1800a4189\npop     rbp                                                            ; +0x21a, 0x1800a418a\npop     rbx                                                            ; +0x21b, 0x1800a418b\nretn                                                                   ; +0x21c, 0x1800a418c", "xrefs": ["sub_1800A5760 @ 0x1800a5815", "<???> @ 0x180148814", "<???> @ 0x180148848", "<???> @ 0x1801c19c8"], "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"}