//
// TouchControlEditLayer::onCopy from 0x7a5048 to 0x7a5162 (282 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:56 +0000
//
int __fastcall TouchControlEditLayer::onCopy(int **this, cocos2d::CCObject *a2, int a3)
{
int v4; // r3
bool v5; // zf
int v6; // r2
int *v7; // r0
int v8; // r2
int v9; // r3
int *v10; // r3
void (__fastcall *v11)(int **, cocos2d::CCNode *, int); // r9
cocos2d::CCNode *v12; // r0
int v14[3]; // [sp+Ch] [bp-20h] BYREF
int v15; // [sp+18h] [bp-14h] BYREF
int v16; // [sp+1Ch] [bp-10h]
int v17; // [sp+20h] [bp-Ch]
v4 = *((unsigned __int8 *)this + 992);
if ( *((_BYTE *)this + 992) )
TouchControlEditLayer::saveTarget((cocos2d::CCDirector *)this);
if ( *(this + 179) )
{
LevelControlConfig::encodeB64((LevelControlConfig *)&v15, *(this + 179), a3, v4);
v6 = dword_D2E730 & 1;
v5 = v6 == 0;
if ( (dword_D2E730 & 1) != 0 )
{
v6 = 0;
*(_BYTE *)dword_D2E738 = 0;
}
else
{
BYTE1(dword_D2E730) = v6;
LOBYTE(dword_D2E730) = v6;
}
if ( !v5 )
dword_D2E734 = v6;
}
else
{
v7 = (int *)LevelControlConfig::createFromGlobal((LevelControlConfig *)*((unsigned __int8 *)this + 712), (bool)a2);
LevelControlConfig::encodeB64((LevelControlConfig *)&v15, v7, v8, v9);
if ( (dword_D2E730 & 1) != 0 )
{
*(_BYTE *)dword_D2E738 = 0;
dword_D2E734 = 0;
}
else
{
LOWORD(dword_D2E730) = 0;
}
}
std::string::reserve(&dword_D2E730, 0);
dword_D2E730 = v15;
dword_D2E734 = v16;
dword_D2E738 = v17;
v15 = 0;
v16 = 0;
v17 = 0;
std::string::~string((int)&v15);
v10 = *this;
memset(v14, 0, sizeof(v14));
v11 = (void (__fastcall *)(int **, cocos2d::CCNode *, int))v10[58];
std::string::__init(v14, "Copied", 6u);
v15 = 0;
v16 = 0;
v17 = 0;
std::string::__init(&v15, &unk_B6B226, 0);
v12 = TextAlertPopup::create((int)v14, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)&v15);
v11(this, v12, 100);
std::string::~string((int)&v15);
return std::string::~string((int)v14);
}