{"type": "func", "start": 6443701768, "end": 6443701850, "name": "sprintf_s", "pseudocode": "// \n// sprintf_s from 0x180131608 to 0x18013165a (82 bytes)\n// \n// 2 xrefs:\n// > common_assert_to_stderr<wchar_t> @ 0x18013145b\n// > <???> @ 0x180202ee8\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\nint sprintf_s(char *const Buffer, const size_t BufferCount, const char *const Format, ...)\n{\n  __int64 *v6; // rax\n  int result; // eax\n  va_list va; // [rsp+78h] [rbp+20h] BYREF\n\n  va_start(va, Format);\n  v6 = (__int64 *)sub_1800429F0();\n  result = common_vsprintf<__crt_stdio_output::standard_base,wchar_t>(\n             *v6,\n             Buffer,\n             BufferCount,\n             (__int64)Format,\n             nullptr,\n             (__int64)va);\n  if ( result < 0 )\n    return -1;\n  return result;\n}", "assembly": "; \n; sprintf_s from 0x180131608 to 0x18013165a (82 bytes)\n; \n; 2 xrefs:\n; > common_assert_to_stderr<wchar_t> @ 0x18013145b\n; > <???> @ 0x180202ee8\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_10], r8                                               ; +0x0, 0x180131608\nmov     [rsp+arg_18], r9                                               ; +0x5, 0x18013160d\npush    rbx                                                            ; +0xa, 0x180131612\npush    rbp                                                            ; +0xb, 0x180131613\npush    rsi                                                            ; +0xc, 0x180131614\npush    rdi                                                            ; +0xd, 0x180131615\nsub     rsp, 38h                                                       ; +0xe, 0x180131616\nmov     rsi, r8                                                        ; +0x12, 0x18013161a\nlea     rbp, [rsp+58h+arg_18]                                          ; +0x15, 0x18013161d\nmov     rbx, rdx                                                       ; +0x1a, 0x180131622\nmov     rdi, rcx                                                       ; +0x1d, 0x180131625\ncall    sub_1800429F0                                                  ; +0x20, 0x180131628\nmov     [rsp+58h+var_30], rbp; __int64                                 ; +0x25, 0x18013162d\nmov     r9, rsi; int                                                   ; +0x2a, 0x180131632\nand     [rsp+58h+var_38], 0                                            ; +0x2d, 0x180131635\nmov     r8, rbx; int                                                   ; +0x33, 0x18013163b\nmov     rdx, rdi; int                                                  ; +0x36, 0x18013163e\nmov     rcx, [rax]; int                                                ; +0x39, 0x180131641\ncall    j_??$common_vsprintf@Vstandard_base@__crt_stdio_output@@_W@@YAH_KQEA_W0QEB_WQEAU__crt_locale_pointers@@QEAD@Z ; +0x3c, 0x180131644\nor      ecx, 0FFFFFFFFh                                                ; +0x41, 0x180131649\ntest    eax, eax                                                       ; +0x44, 0x18013164c\ncmovs   eax, ecx                                                       ; +0x46, 0x18013164e\nadd     rsp, 38h                                                       ; +0x49, 0x180131651\npop     rdi                                                            ; +0x4d, 0x180131655\npop     rsi                                                            ; +0x4e, 0x180131656\npop     rbp                                                            ; +0x4f, 0x180131657\npop     rbx                                                            ; +0x50, 0x180131658\nretn                                                                   ; +0x51, 0x180131659", "xrefs": ["common_assert_to_stderr<wchar_t> @ 0x18013145b", "<???> @ 0x180202ee8"], "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"}