{"type": "func", "start": 6442717232, "end": 6442717330, "name": "sub_180041030", "pseudocode": "// \n// sub_180041030 from 0x180041030 to 0x180041092 (98 bytes)\n// \n// 9 xrefs:\n// > sub_18003D560 @ 0x18003d7fd\n// > sub_18003D560 @ 0x18003d80d\n// > sub_18003D560 @ 0x18003d821\n// > sub_18003D560 @ 0x18003d832\n// > sub_18003DEC0 @ 0x18003e169\n// > sub_18003DEC0 @ 0x18003e179\n// > sub_18003DEC0 @ 0x18003e18d\n// > sub_18003DEC0 @ 0x18003e19e\n// > <???> @ 0x1801b13f8\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 sub_180041030(char *Buffer, size_t BufferCount, char *Format, ...)\n{\n  unsigned __int64 *v6; // rax\n  int result; // eax\n  va_list va; // [rsp+88h] [rbp+20h] BYREF\n\n  va_start(va, Format);\n  v6 = (unsigned __int64 *)sub_180009520();\n  result = _stdio_common_vsnprintf_s(*v6, Buffer, BufferCount, 0xFFFFFFFFFFFFFFFFuLL, Format, nullptr, va);\n  if ( result < 0 )\n    return -1;\n  return result;\n}", "assembly": "; \n; sub_180041030 from 0x180041030 to 0x180041092 (98 bytes)\n; \n; 9 xrefs:\n; > sub_18003D560 @ 0x18003d7fd\n; > sub_18003D560 @ 0x18003d80d\n; > sub_18003D560 @ 0x18003d821\n; > sub_18003D560 @ 0x18003d832\n; > sub_18003DEC0 @ 0x18003e169\n; > sub_18003DEC0 @ 0x18003e179\n; > sub_18003DEC0 @ 0x18003e18d\n; > sub_18003DEC0 @ 0x18003e19e\n; > <???> @ 0x1801b13f8\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, 0x180041030\nmov     qword ptr [rsp+arg_18], r9                                     ; +0x5, 0x180041035\npush    rbx                                                            ; +0xa, 0x18004103a\npush    rbp                                                            ; +0xb, 0x18004103b\npush    rsi                                                            ; +0xc, 0x18004103c\npush    rdi                                                            ; +0xd, 0x18004103d\nsub     rsp, 48h                                                       ; +0xe, 0x18004103e\nmov     rbx, r8                                                        ; +0x12, 0x180041042\nlea     rbp, [rsp+68h+arg_18]                                          ; +0x15, 0x180041045\nmov     rdi, rdx                                                       ; +0x1d, 0x18004104d\nmov     rsi, rcx                                                       ; +0x20, 0x180041050\ncall    sub_180009520                                                  ; +0x23, 0x180041053\nmov     [rsp+68h+ArgList], rbp; ArgList                                ; +0x28, 0x180041058\nmov     r8, rdi; BufferCount                                           ; +0x2d, 0x18004105d\nmov     [rsp+68h+Locale], 0; Locale                                    ; +0x30, 0x180041060\nmov     rdx, rsi; Buffer                                               ; +0x39, 0x180041069\nmov     [rsp+68h+Format], rbx; Format                                  ; +0x3c, 0x18004106c\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x41, 0x180041071\nmov     rcx, [rax]; Options                                            ; +0x48, 0x180041078\nmov     r9, rbx; MaxCount                                              ; +0x4b, 0x18004107b\ncall    cs:__stdio_common_vsnprintf_s                                  ; +0x4e, 0x18004107e\ntest    eax, eax                                                       ; +0x54, 0x180041084\ncmovs   eax, ebx                                                       ; +0x56, 0x180041086\nadd     rsp, 48h                                                       ; +0x59, 0x180041089\npop     rdi                                                            ; +0x5d, 0x18004108d\npop     rsi                                                            ; +0x5e, 0x18004108e\npop     rbp                                                            ; +0x5f, 0x18004108f\npop     rbx                                                            ; +0x60, 0x180041090\nretn                                                                   ; +0x61, 0x180041091", "xrefs": ["sub_18003D560 @ 0x18003d7fd", "sub_18003D560 @ 0x18003d80d", "sub_18003D560 @ 0x18003d821", "sub_18003D560 @ 0x18003d832", "sub_18003DEC0 @ 0x18003e169", "sub_18003DEC0 @ 0x18003e179", "sub_18003DEC0 @ 0x18003e18d", "sub_18003DEC0 @ 0x18003e19e", "<???> @ 0x1801b13f8"], "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"}