{"type": "func", "start": 6443707132, "end": 6443707227, "name": "strcpy_s", "pseudocode": "// \n// strcpy_s from 0x180132afc to 0x180132b5b (95 bytes)\n// \n// 9 xrefs:\n// > __std_exception_copy @ 0x180127039\n// > create_environment<char> @ 0x180131fa8\n// > fp_format_e_internal @ 0x180137b4b\n// > sub_180137FE0 @ 0x180138132\n// > common_set_variable_in_environment_nolock<char> @ 0x18013b033\n// > copy_environment<char> @ 0x18013b491\n// > __acrt_fltout @ 0x18013e2b6\n// > __acrt_fltout @ 0x18013f3b3\n// > <???> @ 0x1802030e0\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 strcpy_s(char *Destination, rsize_t SizeInBytes, const char *Source)\n{\n  errno_t v3; // ebx\n  int *v4; // rax\n  char *v6; // r9\n  signed __int64 v7; // r8\n  char v8; // al\n\n  v3 = 0;\n  if ( !Destination || !SizeInBytes )\n    goto LABEL_5;\n  if ( !Source )\n  {\n    *Destination = 0;\nLABEL_5:\n    v4 = errno();\n    v3 = 22;\nLABEL_6:\n    *v4 = v3;\n    invalid_parameter_noinfo();\n    return v3;\n  }\n  v6 = Destination;\n  v7 = Source - Destination;\n  do\n  {\n    v8 = v6[v7];\n    *v6++ = v8;\n    if ( !v8 )\n      break;\n    --SizeInBytes;\n  }\n  while ( SizeInBytes );\n  if ( !SizeInBytes )\n  {\n    *Destination = 0;\n    v4 = errno();\n    v3 = 34;\n    goto LABEL_6;\n  }\n  return v3;\n}", "assembly": "; \n; strcpy_s from 0x180132afc to 0x180132b5b (95 bytes)\n; \n; 9 xrefs:\n; > __std_exception_copy @ 0x180127039\n; > create_environment<char> @ 0x180131fa8\n; > fp_format_e_internal @ 0x180137b4b\n; > sub_180137FE0 @ 0x180138132\n; > common_set_variable_in_environment_nolock<char> @ 0x18013b033\n; > copy_environment<char> @ 0x18013b491\n; > __acrt_fltout @ 0x18013e2b6\n; > __acrt_fltout @ 0x18013f3b3\n; > <???> @ 0x1802030e0\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\npush    rbx                                                            ; +0x0, 0x180132afc\nsub     rsp, 20h                                                       ; +0x2, 0x180132afe\nxor     ebx, ebx                                                       ; +0x6, 0x180132b02\ntest    rcx, rcx                                                       ; +0x8, 0x180132b04\njz      short loc_180132B15                                            ; +0xb, 0x180132b07\ntest    rdx, rdx                                                       ; +0xd, 0x180132b09\njz      short loc_180132B15                                            ; +0x10, 0x180132b0c\ntest    r8, r8                                                         ; +0x12, 0x180132b0e\njnz     short loc_180132B2E                                            ; +0x15, 0x180132b11\nmov     [rcx], bl                                                      ; +0x17, 0x180132b13\ncall    _errno                                                         ; +0x19, 0x180132b15\nmov     ebx, 16h                                                       ; +0x1e, 0x180132b1a\nmov     [rax], ebx                                                     ; +0x23, 0x180132b1f\ncall    _invalid_parameter_noinfo                                      ; +0x25, 0x180132b21\nmov     eax, ebx                                                       ; +0x2a, 0x180132b26\nadd     rsp, 20h                                                       ; +0x2c, 0x180132b28\npop     rbx                                                            ; +0x30, 0x180132b2c\nretn                                                                   ; +0x31, 0x180132b2d\nmov     r9, rcx                                                        ; +0x32, 0x180132b2e\nsub     r8, rcx                                                        ; +0x35, 0x180132b31\nmov     al, [r8+r9]                                                    ; +0x38, 0x180132b34\nmov     [r9], al                                                       ; +0x3c, 0x180132b38\ninc     r9                                                             ; +0x3f, 0x180132b3b\ntest    al, al                                                         ; +0x42, 0x180132b3e\njz      short loc_180132B48                                            ; +0x44, 0x180132b40\nsub     rdx, 1                                                         ; +0x46, 0x180132b42\njnz     short loc_180132B34                                            ; +0x4a, 0x180132b46\ntest    rdx, rdx                                                       ; +0x4c, 0x180132b48\njnz     short loc_180132B26                                            ; +0x4f, 0x180132b4b\nmov     [rcx], bl                                                      ; +0x51, 0x180132b4d\ncall    _errno                                                         ; +0x53, 0x180132b4f\nmov     ebx, 22h ; '\"'                                                 ; +0x58, 0x180132b54\njmp     short loc_180132B1F                                            ; +0x5d, 0x180132b59", "xrefs": ["__std_exception_copy @ 0x180127039", "create_environment<char> @ 0x180131fa8", "fp_format_e_internal @ 0x180137b4b", "sub_180137FE0 @ 0x180138132", "common_set_variable_in_environment_nolock<char> @ 0x18013b033", "copy_environment<char> @ 0x18013b491", "__acrt_fltout @ 0x18013e2b6", "__acrt_fltout @ 0x18013f3b3", "<???> @ 0x1802030e0"], "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"}