//
// unknown_libname_66 from 0x1801348b4 to 0x180134926 (114 bytes)
//
// 3 xrefs:
// > _wfullpath @ 0x180134c4f
// > common_getdcwd @ 0x18013c01e
// > ??> @ 0x18020329c
//
// 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:00 +0000
//
// Microsoft VisualC 64bit universal runtime
__int64 __fastcall unknown_libname_66(const WCHAR *a1, __int64 a2)
{
DWORD FullPathNameW; // eax
unsigned int v4; // ebx
DWORD LastError; // eax
FullPathNameW = GetFullPathNameW(a1, *(_DWORD *)(a2 + 24), *(LPWSTR *)(a2 + 16), nullptr);
v4 = 0;
if ( FullPathNameW )
{
if ( (unsigned __int64)FullPathNameW > *(_QWORD *)(a2 + 24) )
{
if ( *(_BYTE *)(a2 + 40) )
*(_BYTE *)(a2 + 40) = 0;
*errno() = 34;
*(_BYTE *)(a2 + 40) = 0;
*(_QWORD *)(a2 + 24) = 0;
return 34;
}
else
{
*(_QWORD *)(a2 + 32) = FullPathNameW;
}
}
else
{
LastError = GetLastError();
_acrt_errno_map_os_error(LastError);
return (unsigned int)*errno();
}
return v4;
}