{"type": "func", "start": 6443758604, "end": 6443758739, "name": "memcpy_s", "pseudocode": "// \n// memcpy_s from 0x18013f40c to 0x18013f493 (135 bytes)\n// \n// 7 xrefs:\n// > __crt_strtox::divide @ 0x18013de06\n// > __crt_strtox::divide @ 0x18013de31\n// > __crt_strtox::divide @ 0x18013de9d\n// > __acrt_fltout @ 0x18013f174\n// > __acrt_fltout @ 0x18013f21f\n// > __acrt_fltout @ 0x18013f2ef\n// > <???> @ 0x180203b60\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\nerrno_t __cdecl memcpy_s(\n        void *const Destination,\n        const rsize_t DestinationSize,\n        const void *const Source,\n        const rsize_t SourceSize)\n{\n  int *v8; // rax\n  errno_t v9; // ebx\n\n  if ( !SourceSize )\n    return 0;\n  if ( !Destination )\n    goto LABEL_4;\n  if ( Source && DestinationSize >= SourceSize )\n  {\n    memmove(Destination, Source, SourceSize);\n    return 0;\n  }\n  memset(Destination, 0, DestinationSize);\n  if ( !Source )\n  {\nLABEL_4:\n    v8 = errno();\n    v9 = 22;\nLABEL_5:\n    *v8 = v9;\n    invalid_parameter_noinfo();\n    return v9;\n  }\n  if ( DestinationSize < SourceSize )\n  {\n    v8 = errno();\n    v9 = 34;\n    goto LABEL_5;\n  }\n  return 22;\n}", "assembly": "; \n; memcpy_s from 0x18013f40c to 0x18013f493 (135 bytes)\n; \n; 7 xrefs:\n; > __crt_strtox::divide @ 0x18013de06\n; > __crt_strtox::divide @ 0x18013de31\n; > __crt_strtox::divide @ 0x18013de9d\n; > __acrt_fltout @ 0x18013f174\n; > __acrt_fltout @ 0x18013f21f\n; > __acrt_fltout @ 0x18013f2ef\n; > <???> @ 0x180203b60\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, 0x18013f40c\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18013f411\npush    rdi                                                            ; +0xa, 0x18013f416\nsub     rsp, 20h                                                       ; +0xb, 0x18013f417\nmov     rbx, r9                                                        ; +0xf, 0x18013f41b\nmov     rsi, r8                                                        ; +0x12, 0x18013f41e\nmov     rdi, rdx                                                       ; +0x15, 0x18013f421\ntest    r9, r9                                                         ; +0x18, 0x18013f424\njnz     short loc_18013F42D                                            ; +0x1b, 0x18013f427\nxor     eax, eax                                                       ; +0x1d, 0x18013f429\njmp     short loc_18013F483                                            ; +0x1f, 0x18013f42b\ntest    rcx, rcx                                                       ; +0x21, 0x18013f42d\njnz     short loc_18013F447                                            ; +0x24, 0x18013f430\ncall    _errno                                                         ; +0x26, 0x18013f432\nmov     ebx, 16h                                                       ; +0x2b, 0x18013f437\nmov     [rax], ebx                                                     ; +0x30, 0x18013f43c\ncall    _invalid_parameter_noinfo                                      ; +0x32, 0x18013f43e\nmov     eax, ebx                                                       ; +0x37, 0x18013f443\njmp     short loc_18013F483                                            ; +0x39, 0x18013f445\ntest    rsi, rsi                                                       ; +0x3b, 0x18013f447\njz      short loc_18013F45E                                            ; +0x3e, 0x18013f44a\ncmp     rdi, rbx                                                       ; +0x40, 0x18013f44c\njb      short loc_18013F45E                                            ; +0x43, 0x18013f44f\nmov     r8, rbx; Size                                                  ; +0x45, 0x18013f451\nmov     rdx, rsi; Src                                                  ; +0x48, 0x18013f454\ncall    memmove                                                        ; +0x4b, 0x18013f457\njmp     short loc_18013F429                                            ; +0x50, 0x18013f45c\nmov     r8, rdi; Size                                                  ; +0x52, 0x18013f45e\nxor     edx, edx; Val                                                  ; +0x55, 0x18013f461\ncall    memset                                                         ; +0x57, 0x18013f463\ntest    rsi, rsi                                                       ; +0x5c, 0x18013f468\njz      short loc_18013F432                                            ; +0x5f, 0x18013f46b\ncmp     rdi, rbx                                                       ; +0x61, 0x18013f46d\njnb     short loc_18013F47E                                            ; +0x64, 0x18013f470\ncall    _errno                                                         ; +0x66, 0x18013f472\nmov     ebx, 22h ; '\"'                                                 ; +0x6b, 0x18013f477\njmp     short loc_18013F43C                                            ; +0x70, 0x18013f47c\nmov     eax, 16h                                                       ; +0x72, 0x18013f47e\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x77, 0x18013f483\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x7c, 0x18013f488\nadd     rsp, 20h                                                       ; +0x81, 0x18013f48d\npop     rdi                                                            ; +0x85, 0x18013f491\nretn                                                                   ; +0x86, 0x18013f492", "xrefs": ["__crt_strtox::divide @ 0x18013de06", "__crt_strtox::divide @ 0x18013de31", "__crt_strtox::divide @ 0x18013de9d", "__acrt_fltout @ 0x18013f174", "__acrt_fltout @ 0x18013f21f", "__acrt_fltout @ 0x18013f2ef", "<???> @ 0x180203b60"], "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"}