//
// LevelBindingsLayer::onPaste from 0x14044cbc0 to 0x14044ce25 (613 bytes)
//
// 2 xrefs:
// > LevelBindingsLayer::settingsEntries @ 0x14044c53b
// > ??> @ 0x140927530
//
// 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:32:25 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall LevelBindingsLayer::onPaste(__int64 *a1, __int64 a2, __int64 a3)
{
__int64 v4; // rdx
__int64 v5; // xmm0_8
unsigned __int16 v6; // ax
int *v7; // rax
__int64 v8; // r12
int *v9; // r12
__int64 v10; // rsi
_QWORD *v11; // rbx
__int16 *v12; // r15
unsigned int v13; // edi
unsigned int *i; // rbx
unsigned int *v15; // rsi
__int64 v16; // rbx
cocos2d::CCNode *v17; // rax
__int128 v19; // [rsp+30h] [rbp-40h] BYREF
__int64 v20; // [rsp+40h] [rbp-30h]
__int64 v21; // [rsp+48h] [rbp-28h]
__int128 v22; // [rsp+50h] [rbp-20h] BYREF
__int64 v23; // [rsp+60h] [rbp-10h]
__int64 v24; // [rsp+68h] [rbp-8h]
v4 = *((_BYTE *)a1 + 1192) != 0 ? 0x20 : 0;
if ( !*(_QWORD *)((char *)&unk_14090B090 + v4 + 16) )
{
v22 = 0;
v23 = 0;
v24 = 15;
LOBYTE(v22) = 0;
v5 = 0x20676E6968746F4ELL;
DWORD2(v19) = 1768976227;
v6 = 25701;
LABEL_13:
HIDWORD(v19) = v6;
*(_QWORD *)&v19 = v5;
v20 = 14;
goto LABEL_14;
}
v7 = (int *)LevelControlConfig::createFromB64((__int64)&unk_14090B090 + v4);
if ( !v7 || v7[14] < 1 )
{
v22 = 0;
v23 = 0;
v24 = 15;
LOBYTE(v22) = 0;
v5 = 0x2064696C61766E49LL;
DWORD2(v19) = 1718513507;
v6 = 26473;
goto LABEL_13;
}
v8 = 26;
if ( !*((_BYTE *)a1 + 1192) )
v8 = 18;
v9 = &v7[v8];
v10 = a1[148];
v11 = *(_QWORD **)(v10 + 8);
sub_14038D0E0(v10 + 8, v10 + 8, v11[1]);
v11[1] = v11;
*v11 = v11;
v11[2] = v11;
*(_QWORD *)(v10 + 16) = 0;
*(_BYTE *)(v10 + 24) = 1;
v12 = (__int16 *)&unk_140703EE8;
do
{
v13 = *(_DWORD *)v12;
(*(void (__fastcall **)(int *, __int128 *, _QWORD))(*(_QWORD *)v9 + 8LL))(v9, &v19, *(unsigned int *)v12);
v15 = *((unsigned int **)&v19 + 1);
for ( i = (unsigned int *)v19; i != v15; ++i )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)a1[148] + 24LL))(a1[148], *i, v13);
sub_140069730((__int64)&v19);
v12 += 2;
}
while ( v12 != &word_140703F00 );
(*(void (__fastcall **)(__int64 *))(*a1 + 1056))(a1);
v22 = 0;
v23 = 0;
v24 = 15;
LOBYTE(v22) = 0;
v19 = 0;
v20 = 6;
strcpy((char *)&v19, "Pasted");
LABEL_14:
v21 = 15;
v16 = *a1;
v17 = TextAlertPopup::create((__int64)&v19, v4, a3, 150, (__int64)&v22);
return (*(__int64 (__fastcall **)(__int64 *, cocos2d::CCNode *, __int64))(v16 + 456))(a1, v17, 100);
}