{"type": "func", "start": 6443130640, "end": 6443130801, "name": "sub_1800A5F10", "pseudocode": "// \n// sub_1800A5F10 from 0x1800a5f10 to 0x1800a5fb1 (161 bytes)\n// \n// 2 xrefs:\n// > sub_1800A6260 @ 0x1800a6387\n// > <???> @ 0x1801fb7d8\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_1800A5F10(\n        __int64 a1,\n        __int64 a2,\n        __int64 a3,\n        unsigned int a4,\n        _QWORD *a5,\n        int a6,\n        unsigned int *a7)\n{\n  __int64 v7; // rbx\n  __int64 v11; // rcx\n  unsigned int v12; // edx\n  _QWORD v13[5]; // [rsp+30h] [rbp-28h] BYREF\n  int v14; // [rsp+68h] [rbp+10h] BYREF\n\n  v7 = *(_QWORD *)(a2 + 40);\n  v13[0] = 0;\n  v14 = 0;\n  if ( (*(int (__fastcall **)(_QWORD, _QWORD *, __int64, int *, _QWORD, _QWORD))(**(_QWORD **)(v7 + 8) + 24LL))(\n         *(_QWORD *)(v7 + 8),\n         v13,\n         v7 + 16,\n         &v14,\n         0,\n         0) < 0 )\n    return 49;\n  v11 = *(unsigned int *)(v7 + 20);\n  v12 = 4 * *(_DWORD *)(v7 + 16) * *(_DWORD *)(a2 + 32) - v11;\n  *a5 = v13[0] + v11;\n  if ( v12 <= a4 )\n  {\n    *(_DWORD *)(v7 + 20) = 0;\n    a4 = v12;\n  }\n  else\n  {\n    *(_DWORD *)(v7 + 20) += a4;\n    *(_DWORD *)(v7 + 16) = 0;\n  }\n  *a7 = a4;\n  return 0;\n}", "assembly": "; \n; sub_1800A5F10 from 0x1800a5f10 to 0x1800a5fb1 (161 bytes)\n; \n; 2 xrefs:\n; > sub_1800A6260 @ 0x1800a6387\n; > <???> @ 0x1801fb7d8\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     r11, rsp                                                       ; +0x0, 0x1800a5f10\nmov     [r11+8], rbx                                                   ; +0x3, 0x1800a5f13\nmov     [r11+18h], rbp                                                 ; +0x7, 0x1800a5f17\npush    rsi                                                            ; +0xb, 0x1800a5f1b\npush    rdi                                                            ; +0xc, 0x1800a5f1c\npush    r14                                                            ; +0xd, 0x1800a5f1d\nsub     rsp, 40h                                                       ; +0xf, 0x1800a5f1f\nmov     rbx, [rdx+28h]                                                 ; +0x13, 0x1800a5f23\nxor     r14d, r14d                                                     ; +0x17, 0x1800a5f27\nmov     [r11-28h], r14                                                 ; +0x1a, 0x1800a5f2a\nmov     edi, r9d                                                       ; +0x1e, 0x1800a5f2e\nmov     [r11+10h], r14d                                                ; +0x21, 0x1800a5f31\nlea     r9, [r11+10h]                                                  ; +0x25, 0x1800a5f35\nmov     rbp, rdx                                                       ; +0x29, 0x1800a5f39\nmov     [r11-30h], r14                                                 ; +0x2c, 0x1800a5f3c\nmov     rcx, [rbx+8]                                                   ; +0x30, 0x1800a5f40\nlea     r8, [rbx+10h]                                                  ; +0x34, 0x1800a5f44\nlea     rdx, [r11-28h]                                                 ; +0x38, 0x1800a5f48\nmov     [r11-38h], r14                                                 ; +0x3c, 0x1800a5f4c\nmov     rax, [rcx]                                                     ; +0x40, 0x1800a5f50\ncall    qword ptr [rax+18h]                                            ; +0x43, 0x1800a5f53\ntest    eax, eax                                                       ; +0x46, 0x1800a5f56\njns     short loc_1800A5F60                                            ; +0x48, 0x1800a5f58\nlea     eax, [r14+31h]                                                 ; +0x4a, 0x1800a5f5a\njmp     short loc_1800A5F9E                                            ; +0x4e, 0x1800a5f5e\nmov     ecx, [rbx+14h]                                                 ; +0x50, 0x1800a5f60\nmov     edx, [rbp+20h]                                                 ; +0x53, 0x1800a5f63\nimul    edx, [rbx+10h]                                                 ; +0x56, 0x1800a5f66\nmov     rax, [rsp+58h+arg_20]                                          ; +0x5a, 0x1800a5f6a\nshl     edx, 2                                                         ; +0x62, 0x1800a5f72\nsub     edx, ecx                                                       ; +0x65, 0x1800a5f75\nadd     rcx, [rsp+58h+var_28]                                          ; +0x67, 0x1800a5f77\nmov     [rax], rcx                                                     ; +0x6c, 0x1800a5f7c\ncmp     edx, edi                                                       ; +0x6f, 0x1800a5f7f\njbe     short loc_1800A5F8C                                            ; +0x71, 0x1800a5f81\nadd     [rbx+14h], edi                                                 ; +0x73, 0x1800a5f83\nmov     [rbx+10h], r14d                                                ; +0x76, 0x1800a5f86\njmp     short loc_1800A5F92                                            ; +0x7a, 0x1800a5f8a\nmov     [rbx+14h], r14d                                                ; +0x7c, 0x1800a5f8c\nmov     edi, edx                                                       ; +0x80, 0x1800a5f90\nmov     rax, [rsp+58h+arg_30]                                          ; +0x82, 0x1800a5f92\nmov     [rax], edi                                                     ; +0x8a, 0x1800a5f9a\nxor     eax, eax                                                       ; +0x8c, 0x1800a5f9c\nmov     rbx, [rsp+58h+arg_0]                                           ; +0x8e, 0x1800a5f9e\nmov     rbp, [rsp+58h+arg_10]                                          ; +0x93, 0x1800a5fa3\nadd     rsp, 40h                                                       ; +0x98, 0x1800a5fa8\npop     r14                                                            ; +0x9c, 0x1800a5fac\npop     rdi                                                            ; +0x9e, 0x1800a5fae\npop     rsi                                                            ; +0x9f, 0x1800a5faf\nretn                                                                   ; +0xa0, 0x1800a5fb0", "xrefs": ["sub_1800A6260 @ 0x1800a6387", "<???> @ 0x1801fb7d8"], "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"}