//
// PlatformToolbox::copyToClipboard from 0x140078790 to 0x140078840 (176 bytes)
//
// 3 xrefs:
// > InfoLayer::onCopyLevelID @ 0x1402bd2d9
// > ProfilePage::onCopyName @ 0x1403c33f6
// > ??> @ 0x1406c66a8
//
// 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
//
char __fastcall PlatformToolbox::copyToClipboard(_QWORD *Src)
{
_QWORD *v2; // rsi
__int64 v3; // rbx
HGLOBAL v5; // rdi
void *v6; // rax
v2 = Src;
if ( Src[3] > 0xFu )
v2 = (_QWORD *)*Src;
v3 = -1;
while ( *((_BYTE *)v2 + ++v3) != 0 )
;
v5 = GlobalAlloc(2u, v3 + 1);
v6 = GlobalLock(v5);
memcpy(v6, v2, v3 + 1);
GlobalUnlock(v5);
OpenClipboard(nullptr);
EmptyClipboard();
SetClipboardData(1u, v5);
CloseClipboard();
sub_14003A830((__int64)Src);
return 1;
}