{"type": "func", "start": 6443189392, "end": 6443189686, "name": "sub_1800B4490", "pseudocode": "// \n// sub_1800B4490 from 0x1800b4490 to 0x1800b45b6 (294 bytes)\n// \n// 4 xrefs:\n// > sub_1800B5AD0 @ 0x1800b5b18\n// > sub_1800B5AD0 @ 0x1800b5b4e\n// > sub_1800B5AD0 @ 0x1800b5d99\n// > <???> @ 0x1801fcf24\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_1800B4490(__int64 a1, char *a2, int a3)\n{\n  int v3; // esi\n  char *v4; // rbp\n  int v6; // ebx\n  __int64 result; // rax\n  unsigned int v8; // eax\n  bool v9; // zf\n  char *EndPtr; // [rsp+28h] [rbp-130h] BYREF\n  char String[256]; // [rsp+30h] [rbp-128h] BYREF\n\n  v3 = a3;\n  v4 = a2;\n  if ( !a3 )\n    return 0;\n  if ( !*(_BYTE *)(a1 + 600) )\n  {\n    result = sub_1800B7760(*(_QWORD *)(a1 + 496), a2, a3);\n    if ( (_DWORD)result )\n      return result;\n    return 0;\n  }\n  while ( 1 )\n  {\n    v6 = *(_DWORD *)(a1 + 604);\n    if ( !v6 )\n    {\n      memset(String, 0, sizeof(String));\n      result = sub_1800B7820(*(_QWORD *)(a1 + 496));\n      if ( (_DWORD)result )\n        return result;\n      v8 = strtoul(String, &EndPtr, 16);\n      *(_DWORD *)(a1 + 604) = v8;\n      v6 = v8;\n      if ( !v8 )\n        break;\n    }\n    if ( v6 >= v3 )\n      v6 = v3;\n    result = sub_1800B7760(*(_QWORD *)(a1 + 496), v4, v6);\n    if ( (_DWORD)result )\n      return result;\n    v3 -= v6;\n    v4 += v6;\n    v9 = *(_DWORD *)(a1 + 604) == v6;\n    *(_DWORD *)(a1 + 604) -= v6;\n    if ( v9 )\n    {\n      result = sub_1800B7820(*(_QWORD *)(a1 + 496));\n      if ( (_DWORD)result )\n        return result;\n    }\n    if ( !v3 )\n      return 0;\n  }\n  return 16;\n}", "assembly": "; \n; sub_1800B4490 from 0x1800b4490 to 0x1800b45b6 (294 bytes)\n; \n; 4 xrefs:\n; > sub_1800B5AD0 @ 0x1800b5b18\n; > sub_1800B5AD0 @ 0x1800b5b4e\n; > sub_1800B5AD0 @ 0x1800b5d99\n; > <???> @ 0x1801fcf24\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_18], rbx                                              ; +0x0, 0x1800b4490\npush    rbp                                                            ; +0x5, 0x1800b4495\npush    rsi                                                            ; +0x6, 0x1800b4496\npush    rdi                                                            ; +0x7, 0x1800b4497\nsub     rsp, 140h                                                      ; +0x8, 0x1800b4498\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1800b449f\nxor     rax, rsp                                                       ; +0x16, 0x1800b44a6\nmov     [rsp+158h+var_28], rax                                         ; +0x19, 0x1800b44a9\nmov     esi, r8d                                                       ; +0x21, 0x1800b44b1\nmov     rbp, rdx                                                       ; +0x24, 0x1800b44b4\nmov     rdi, rcx                                                       ; +0x27, 0x1800b44b7\ntest    r8d, r8d                                                       ; +0x2a, 0x1800b44ba\njz      loc_1800B4591                                                  ; +0x2d, 0x1800b44bd\ncmp     byte ptr [rcx+258h], 0                                         ; +0x33, 0x1800b44c3\njz      loc_1800B4581                                                  ; +0x3a, 0x1800b44ca\nmov     ebx, [rdi+25Ch]                                                ; +0x40, 0x1800b44d0\ntest    ebx, ebx                                                       ; +0x46, 0x1800b44d6\njnz     short loc_1800B452A                                            ; +0x48, 0x1800b44d8\nxor     edx, edx; Val                                                  ; +0x4a, 0x1800b44da\nlea     rcx, [rsp+158h+String]; void *                                 ; +0x4c, 0x1800b44dc\nmov     r8d, 100h; Size                                                ; +0x51, 0x1800b44e1\ncall    memset                                                         ; +0x57, 0x1800b44e7\nmov     rcx, [rdi+1F0h]; s                                             ; +0x5c, 0x1800b44ec\nlea     rdx, [rsp+158h+String]                                         ; +0x63, 0x1800b44f3\nmov     r8d, 100h                                                      ; +0x68, 0x1800b44f8\ncall    sub_1800B7820                                                  ; +0x6e, 0x1800b44fe\ntest    eax, eax                                                       ; +0x73, 0x1800b4503\njnz     loc_1800B4593                                                  ; +0x75, 0x1800b4505\nlea     r8d, [rbx+10h]; Radix                                          ; +0x7b, 0x1800b450b\nlea     rdx, [rsp+158h+EndPtr]; EndPtr                                 ; +0x7f, 0x1800b450f\nlea     rcx, [rsp+158h+String]; String                                 ; +0x84, 0x1800b4514\ncall    strtoul                                                        ; +0x89, 0x1800b4519\nmov     [rdi+25Ch], eax                                                ; +0x8e, 0x1800b451e\nmov     ebx, eax                                                       ; +0x94, 0x1800b4524\ntest    eax, eax                                                       ; +0x96, 0x1800b4526\njz      short loc_1800B457A                                            ; +0x98, 0x1800b4528\nmov     rcx, [rdi+1F0h]; s                                             ; +0x9a, 0x1800b452a\ncmp     ebx, esi                                                       ; +0xa1, 0x1800b4531\nmov     rdx, rbp; buf                                                  ; +0xa3, 0x1800b4533\ncmovge  ebx, esi                                                       ; +0xa6, 0x1800b4536\nmov     r8d, ebx; len                                                  ; +0xa9, 0x1800b4539\ncall    sub_1800B7760                                                  ; +0xac, 0x1800b453c\ntest    eax, eax                                                       ; +0xb1, 0x1800b4541\njnz     short loc_1800B4593                                            ; +0xb3, 0x1800b4543\nmovsxd  rax, ebx                                                       ; +0xb5, 0x1800b4545\nsub     esi, ebx                                                       ; +0xb8, 0x1800b4548\nadd     rbp, rax                                                       ; +0xba, 0x1800b454a\nsub     [rdi+25Ch], ebx                                                ; +0xbd, 0x1800b454d\njnz     short loc_1800B4570                                            ; +0xc3, 0x1800b4553\nmov     rcx, [rdi+1F0h]; s                                             ; +0xc5, 0x1800b4555\nlea     rdx, [rsp+158h+var_138]                                        ; +0xcc, 0x1800b455c\nmov     r8d, 2                                                         ; +0xd1, 0x1800b4561\ncall    sub_1800B7820                                                  ; +0xd7, 0x1800b4567\ntest    eax, eax                                                       ; +0xdc, 0x1800b456c\njnz     short loc_1800B4593                                            ; +0xde, 0x1800b456e\ntest    esi, esi                                                       ; +0xe0, 0x1800b4570\njnz     loc_1800B44D0                                                  ; +0xe2, 0x1800b4572\njmp     short loc_1800B4591                                            ; +0xe8, 0x1800b4578\nmov     eax, 10h                                                       ; +0xea, 0x1800b457a\njmp     short loc_1800B4593                                            ; +0xef, 0x1800b457f\nmov     rcx, [rcx+1F0h]; s                                             ; +0xf1, 0x1800b4581\ncall    sub_1800B7760                                                  ; +0xf8, 0x1800b4588\ntest    eax, eax                                                       ; +0xfd, 0x1800b458d\njnz     short loc_1800B4593                                            ; +0xff, 0x1800b458f\nxor     eax, eax                                                       ; +0x101, 0x1800b4591\nmov     rcx, [rsp+158h+var_28]                                         ; +0x103, 0x1800b4593\nxor     rcx, rsp; StackCookie                                          ; +0x10b, 0x1800b459b\ncall    __security_check_cookie                                        ; +0x10e, 0x1800b459e\nmov     rbx, [rsp+158h+arg_18]                                         ; +0x113, 0x1800b45a3\nadd     rsp, 140h                                                      ; +0x11b, 0x1800b45ab\npop     rdi                                                            ; +0x122, 0x1800b45b2\npop     rsi                                                            ; +0x123, 0x1800b45b3\npop     rbp                                                            ; +0x124, 0x1800b45b4\nretn                                                                   ; +0x125, 0x1800b45b5", "xrefs": ["sub_1800B5AD0 @ 0x1800b5b18", "sub_1800B5AD0 @ 0x1800b5b4e", "sub_1800B5AD0 @ 0x1800b5d99", "<???> @ 0x1801fcf24"], "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"}