{"type": "func", "start": 6443255728, "end": 6443255891, "name": "sub_1800C47B0", "pseudocode": "// \n// sub_1800C47B0 from 0x1800c47b0 to 0x1800c4853 (163 bytes)\n// \n// 2 xrefs:\n// > sub_1800C3960 @ 0x1800c3a15\n// > <???> @ 0x1801fde78\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_1800C47B0(\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  __int64 v13; // [rsp+50h] [rbp+8h] BYREF\n  __int64 v14; // [rsp+58h] [rbp+10h] BYREF\n\n  v13 = a1;\n  v7 = *(_QWORD *)(a2 + 40);\n  v14 = 0;\n  LODWORD(v13) = 0;\n  if ( (*(int (__fastcall **)(_QWORD, __int64 *, __int64, __int64 *, _QWORD, _QWORD))(**(_QWORD **)(v7 + 8) + 24LL))(\n         *(_QWORD *)(v7 + 8),\n         &v14,\n         v7 + 16,\n         &v13,\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 = v14 + 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_1800C47B0 from 0x1800c47b0 to 0x1800c4853 (163 bytes)\n; \n; 2 xrefs:\n; > sub_1800C3960 @ 0x1800c3a15\n; > <???> @ 0x1801fde78\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, 0x1800c47b0\nmov     [r11+18h], rbx                                                 ; +0x3, 0x1800c47b3\nmov     [r11+20h], rbp                                                 ; +0x7, 0x1800c47b7\nmov     [r11+8], rcx                                                   ; +0xb, 0x1800c47bb\npush    rsi                                                            ; +0xf, 0x1800c47bf\npush    rdi                                                            ; +0x10, 0x1800c47c0\npush    r14                                                            ; +0x11, 0x1800c47c1\nsub     rsp, 30h                                                       ; +0x13, 0x1800c47c3\nmov     rbx, [rdx+28h]                                                 ; +0x17, 0x1800c47c7\nxor     r14d, r14d                                                     ; +0x1b, 0x1800c47cb\nmov     [r11+10h], r14                                                 ; +0x1e, 0x1800c47ce\nmov     edi, r9d                                                       ; +0x22, 0x1800c47d2\nmov     [r11+8], r14d                                                  ; +0x25, 0x1800c47d5\nlea     r9, [r11+8]                                                    ; +0x29, 0x1800c47d9\nmov     rbp, rdx                                                       ; +0x2d, 0x1800c47dd\nmov     [r11-20h], r14                                                 ; +0x30, 0x1800c47e0\nmov     rcx, [rbx+8]                                                   ; +0x34, 0x1800c47e4\nlea     r8, [rbx+10h]                                                  ; +0x38, 0x1800c47e8\nlea     rdx, [r11+10h]                                                 ; +0x3c, 0x1800c47ec\nmov     [r11-28h], r14                                                 ; +0x40, 0x1800c47f0\nmov     rax, [rcx]                                                     ; +0x44, 0x1800c47f4\ncall    qword ptr [rax+18h]                                            ; +0x47, 0x1800c47f7\ntest    eax, eax                                                       ; +0x4a, 0x1800c47fa\njns     short loc_1800C4804                                            ; +0x4c, 0x1800c47fc\nlea     eax, [r14+31h]                                                 ; +0x4e, 0x1800c47fe\njmp     short loc_1800C4840                                            ; +0x52, 0x1800c4802\nmov     ecx, [rbx+14h]                                                 ; +0x54, 0x1800c4804\nmov     edx, [rbp+20h]                                                 ; +0x57, 0x1800c4807\nimul    edx, [rbx+10h]                                                 ; +0x5a, 0x1800c480a\nmov     rax, [rsp+48h+arg_20]                                          ; +0x5e, 0x1800c480e\nshl     edx, 2                                                         ; +0x63, 0x1800c4813\nsub     edx, ecx                                                       ; +0x66, 0x1800c4816\nadd     rcx, [rsp+48h+arg_8]                                           ; +0x68, 0x1800c4818\nmov     [rax], rcx                                                     ; +0x6d, 0x1800c481d\ncmp     edx, edi                                                       ; +0x70, 0x1800c4820\njbe     short loc_1800C482D                                            ; +0x72, 0x1800c4822\nadd     [rbx+14h], edi                                                 ; +0x74, 0x1800c4824\nmov     [rbx+10h], r14d                                                ; +0x77, 0x1800c4827\njmp     short loc_1800C4833                                            ; +0x7b, 0x1800c482b\nmov     [rbx+14h], r14d                                                ; +0x7d, 0x1800c482d\nmov     edi, edx                                                       ; +0x81, 0x1800c4831\nmov     rcx, [rsp+48h+arg_30]                                          ; +0x83, 0x1800c4833\nmov     eax, r14d                                                      ; +0x8b, 0x1800c483b\nmov     [rcx], edi                                                     ; +0x8e, 0x1800c483e\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x90, 0x1800c4840\nmov     rbp, [rsp+48h+arg_18]                                          ; +0x95, 0x1800c4845\nadd     rsp, 30h                                                       ; +0x9a, 0x1800c484a\npop     r14                                                            ; +0x9e, 0x1800c484e\npop     rdi                                                            ; +0xa0, 0x1800c4850\npop     rsi                                                            ; +0xa1, 0x1800c4851\nretn                                                                   ; +0xa2, 0x1800c4852", "xrefs": ["sub_1800C3960 @ 0x1800c3a15", "<???> @ 0x1801fde78"], "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"}