//
// memcpy_s from 0x18013f40c to 0x18013f493 (135 bytes)
//
// 7 xrefs:
// > __crt_strtox::divide @ 0x18013de06
// > __crt_strtox::divide @ 0x18013de31
// > __crt_strtox::divide @ 0x18013de9d
// > __acrt_fltout @ 0x18013f174
// > __acrt_fltout @ 0x18013f21f
// > __acrt_fltout @ 0x18013f2ef
// > ??> @ 0x180203b60
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:55:04 +0000
//
errno_t __cdecl memcpy_s(
void *const Destination,
const rsize_t DestinationSize,
const void *const Source,
const rsize_t SourceSize)
{
int *v8; // rax
errno_t v9; // ebx
if ( !SourceSize )
return 0;
if ( !Destination )
goto LABEL_4;
if ( Source && DestinationSize >= SourceSize )
{
memmove(Destination, Source, SourceSize);
return 0;
}
memset(Destination, 0, DestinationSize);
if ( !Source )
{
LABEL_4:
v8 = errno();
v9 = 22;
LABEL_5:
*v8 = v9;
invalid_parameter_noinfo();
return v9;
}
if ( DestinationSize < SourceSize )
{
v8 = errno();
v9 = 34;
goto LABEL_5;
}
return 22;
}