{"type": "func", "start": 6442744176, "end": 6442744314, "name": "sub_180047970", "pseudocode": "// \n// sub_180047970 from 0x180047970 to 0x1800479fa (138 bytes)\n// \n// 4 xrefs:\n// > sub_180046AC0 @ 0x180046bf2\n// > sub_180046C80 @ 0x180046e31\n// > sub_180046F20 @ 0x180046f80\n// > <???> @ 0x1801b18a8\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_180047970(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n  _QWORD *v6; // rcx\n  __int64 result; // rax\n\n  v6 = *(_QWORD **)a1;\n  if ( v6 )\n  {\n    if ( (unsigned __int64)(2 * ((__int64)(*(_QWORD *)(a1 + 16) - (_QWORD)v6) >> 1)) >= 0x1000 )\n    {\n      if ( (unsigned __int64)v6 - *(v6 - 1) - 8 > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n      v6 = (_QWORD *)*(v6 - 1);\n    }\n    j_j_free_0(v6);\n  }\n  *(_QWORD *)a1 = a2;\n  *(_QWORD *)(a1 + 8) = a2 + 2 * a3;\n  result = a2 + 2 * a4;\n  *(_QWORD *)(a1 + 16) = result;\n  return result;\n}", "assembly": "; \n; sub_180047970 from 0x180047970 to 0x1800479fa (138 bytes)\n; \n; 4 xrefs:\n; > sub_180046AC0 @ 0x180046bf2\n; > sub_180046C80 @ 0x180046e31\n; > sub_180046F20 @ 0x180046f80\n; > <???> @ 0x1801b18a8\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, 0x180047970\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x180047975\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18004797a\npush    rdi                                                            ; +0xf, 0x18004797f\nsub     rsp, 20h                                                       ; +0x10, 0x180047980\nmov     rbx, rcx                                                       ; +0x14, 0x180047984\nmov     rsi, r9                                                        ; +0x17, 0x180047987\nmov     rcx, [rcx]                                                     ; +0x1a, 0x18004798a\nmov     rbp, r8                                                        ; +0x1d, 0x18004798d\nmov     rdi, rdx                                                       ; +0x20, 0x180047990\ntest    rcx, rcx                                                       ; +0x23, 0x180047993\njz      short loc_1800479CB                                            ; +0x26, 0x180047996\nmov     rdx, [rbx+10h]                                                 ; +0x28, 0x180047998\nsub     rdx, rcx                                                       ; +0x2c, 0x18004799c\nsar     rdx, 1                                                         ; +0x2f, 0x18004799f\nadd     rdx, rdx                                                       ; +0x32, 0x1800479a2\ncmp     rdx, 1000h                                                     ; +0x35, 0x1800479a5\njb      short loc_1800479C6                                            ; +0x3c, 0x1800479ac\nmov     r8, [rcx-8]                                                    ; +0x3e, 0x1800479ae\nadd     rdx, 27h ; '''                                                 ; +0x42, 0x1800479b2\nsub     rcx, r8                                                        ; +0x46, 0x1800479b6\nlea     rax, [rcx-8]                                                   ; +0x49, 0x1800479b9\ncmp     rax, 1Fh                                                       ; +0x4d, 0x1800479bd\nja      short loc_1800479F3                                            ; +0x51, 0x1800479c1\nmov     rcx, r8; Block                                                 ; +0x53, 0x1800479c3\ncall    j_j_free_0                                                     ; +0x56, 0x1800479c6\nlea     rax, [rdi+rbp*2]                                               ; +0x5b, 0x1800479cb\nmov     [rbx], rdi                                                     ; +0x5f, 0x1800479cf\nmov     rbp, [rsp+28h+arg_8]                                           ; +0x62, 0x1800479d2\nmov     [rbx+8], rax                                                   ; +0x67, 0x1800479d7\nlea     rax, [rdi+rsi*2]                                               ; +0x6b, 0x1800479db\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x6f, 0x1800479df\nmov     [rbx+10h], rax                                                 ; +0x74, 0x1800479e4\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x78, 0x1800479e8\nadd     rsp, 20h                                                       ; +0x7d, 0x1800479ed\npop     rdi                                                            ; +0x81, 0x1800479f1\nretn                                                                   ; +0x82, 0x1800479f2\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x83, 0x1800479f3\ndb 0CCh                                                                ; +0x89, 0x1800479f9", "xrefs": ["sub_180046AC0 @ 0x180046bf2", "sub_180046C80 @ 0x180046e31", "sub_180046F20 @ 0x180046f80", "<???> @ 0x1801b18a8"], "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"}