//
// PlatformToolbox::getUniqueUserID from 0x1004c3c10 to 0x1004c3ce7 (215 bytes)
//
// 1 xrefs:
// > PlatformToolbox::getUserID @ 0x1004c3cf9
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_QWORD *__fastcall PlatformToolbox::getUniqueUserID(_QWORD *a1, double a2)
{
const __CFUUID *v2; // r14
__CFString *v3; // r15
const char *v4; // r14
size_t v5; // rax
size_t v6; // r15
void *v7; // r12
size_t v8; // r13
v2 = CFUUIDCreate(nullptr);
v3 = (__CFString *)CFUUIDCreateString(nullptr, v2);
CFRelease(v2);
v4 = (const char *)-[__CFString cStringUsingEncoding:](v3, "cStringUsingEncoding:", 4);
objc_release(v3);
v5 = strlen(v4);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a2);
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = operator new(v8);
a1[2] = v7;
*a1 = v8 + 1;
a1[1] = v6;
}
else
{
*(_BYTE *)a1 = 2 * v5;
v7 = (char *)a1 + 1;
if ( !v5 )
goto LABEL_9;
}
memmove(v7, v4, v6);
LABEL_9:
*((_BYTE *)v7 + v6) = 0;
return a1;
}