//
// TextAlertPopup::replaceIn from 0x1403a8c00 to 0x1403a8d2c (300 bytes)
//
// 5 xrefs:
// > EditorUI::showTextAlert @ 0x1401c2071
// > sub_140388AA0 @ 0x140388c36
// > ??> @ 0x1408c0420
// > ??> @ 0x1408c0458
// > ??> @ 0x1409238ac
//
// 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:31:19 +0000
//
__int64 __fastcall TextAlertPopup::replaceIn(__int64 a1, unsigned int a2, __int64 a3, unsigned int a4)
{
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // r8
__int64 v11; // rbp
__int64 v12; // rdi
__int64 v13; // rcx
__int64 v14; // rbx
unsigned __int8 v15; // al
__int64 v16; // rdi
__int64 v17; // rcx
__int64 v18; // rbx
unsigned __int8 v19; // al
if ( a1 && a3 )
{
v8 = (*(__int64 (**)(void))(*(_QWORD *)a1 + 472LL))();
v9 = _RTDynamicCast(v8, 0, &cocos2d::CCNode `RTTI Type Descriptor', &TextAlertPopup `RTTI Type Descriptor', 0);
v11 = v9;
if ( v9 )
{
v12 = *(_QWORD *)(a3 + 328);
if ( v12 )
{
v13 = *(_QWORD *)(v9 + 328);
if ( v13 )
{
v14 = *(_QWORD *)(v12 + 368);
v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(v13 + 368) + 32LL))(v13 + 368);
(*(void (__fastcall **)(__int64, _QWORD))(v14 + 40))(v12 + 368, v15);
}
}
v16 = *(_QWORD *)(a3 + 336);
if ( v16 )
{
v17 = *(_QWORD *)(v11 + 336);
if ( v17 )
{
v18 = *(_QWORD *)(v16 + 320);
v19 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(v17 + 320) + 32LL))(v17 + 320);
(*(void (__fastcall **)(__int64, _QWORD))(v18 + 40))(v16 + 320, v19);
}
}
LOBYTE(v10) = 1;
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 552LL))(a1, a2, v10);
}
(*(void (__fastcall **)(__int64, __int64, _QWORD, _QWORD))(*(_QWORD *)a1 + 448LL))(a1, a3, a4, a2);
}
return a3;
}