//
// CCTextInputMenu::onCopy from 0x14004dc40 to 0x14004dceb (171 bytes)
//
// 2 xrefs:
// > CCTextInputMenu::init @ 0x14004d36f
// > ??> @ 0x1409101b4
//
// 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 11:25:33 +0000
//
void __fastcall CCTextInputMenu::onCopy(__int64 a1)
{
__int64 v1; // rdi
__int64 v2; // rdx
_BYTE *v3; // rax
size_t v4; // r8
cocos2d::CCObject *v5; // rbx
__int128 v6; // [rsp+20h] [rbp-28h] BYREF
__int64 v7; // [rsp+30h] [rbp-18h]
__int64 v8; // [rsp+38h] [rbp-10h]
v1 = *(_QWORD *)(a1 + 408);
if ( (unsigned __int8)CCTextInputNode::canCopyText(v1) )
{
v3 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(v1 + 592) + 600LL) + 8LL))(*(_QWORD *)(v1 + 592) + 600LL);
v7 = 0;
v6 = 0;
v8 = 0;
v4 = -1;
do
++v4;
while ( v3[v4] );
sub_14003D230(&v6, v3, v4);
PlatformToolbox::copyToClipboard(&v6);
}
v5 = *(cocos2d::CCObject **)(v1 + 696);
if ( v5 )
{
*(_QWORD *)(v1 + 696) = 0;
LOBYTE(v2) = 1;
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v5 + 520LL))(v5, v2);
cocos2d::CCObject::release(v5);
}
}