//
// DialogLayer::displayDialogObject from 0xa709f4 to 0xa70dd8 (996 bytes)
//
// 3 xrefs:
// > DialogLayer::displayNextObject @ 0xa70e28
// > DialogLayer::init @ 0xa71424
// > ??> @ 0xad788
//
// This function is hookable on this platform (idp: arm, 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 13:00:23 +0000
//
__int64 __fastcall DialogLayer::displayDialogObject(DialogLayer *this, DialogObject *a2)
{
cocos2d::CCNode *v4; // x0
__int64 v5; // x0
__int64 v6; // x0
__int64 v7; // x21
char v8; // w0
void (__fastcall *v9)(__int64, char *); // x22
__int64 v10; // x0
__int64 v11; // x1
char *v12; // x1
char v13; // w4
__int64 v14; // x0
char v15; // w3
void (__fastcall *v16)(__int64, _BYTE *); // x2
int v17; // w0
unsigned int v18; // w1
cocos2d::CCString *v19; // x0
cocos2d::CCSprite *CString; // x0
const char *v21; // x1
__int64 v22; // x0
__int64 v23; // x22
void (__fastcall *v24)(__int64, _BYTE *); // x25
char v25; // w0
float v26; // s9
__int64 v27; // x0
__int64 v28; // x1
const char *v29; // x1
size_t v30; // x0
__int64 v31; // x0
char v32; // w1
__int64 v33; // x20
void (__fastcall *v34)(__int64, _BYTE *); // x22
__int64 v35; // x20
void (__fastcall *v36)(__int64, _BYTE *); // x22
char *v38; // [xsp+68h] [xbp+68h]
_BYTE v39[8]; // [xsp+70h] [xbp+70h] BYREF
__int64 v40; // [xsp+78h] [xbp+78h] BYREF
__int64 v41; // [xsp+80h] [xbp+80h]
void *v42; // [xsp+88h] [xbp+88h]
__int64 v43; // [xsp+90h] [xbp+90h] BYREF
__int64 v44; // [xsp+98h] [xbp+98h]
void *v45; // [xsp+A0h] [xbp+A0h]
if ( a2 )
{
*((_BYTE *)this + 616) = 1;
v4 = *((cocos2d::CCNode **)this + 76);
*((_BYTE *)this + 617) = *((_BYTE *)a2 + 116);
cocos2d::CCNode::stopAllActions(v4);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 76) + 912LL))(*((_QWORD *)this + 76), 0);
v5 = *((_QWORD *)this + 73);
if ( v5 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 536LL))(v5);
*((_QWORD *)this + 73) = 0;
}
v6 = *((_QWORD *)this + 72);
if ( v6 )
{
*(_QWORD *)(v6 + 696) = 0;
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)this + 72) + 536LL))(*((_QWORD *)this + 72));
*((_QWORD *)this + 72) = 0;
}
v7 = *((_QWORD *)this + 71);
v8 = *((_BYTE *)a2 + 80);
v9 = *(void (__fastcall **)(__int64, char *))(*(_QWORD *)v7 + 928LL);
v43 = 0;
v44 = 0;
v45 = nullptr;
if ( (v8 & 1) != 0 )
{
std::string::__init(&v43, *((void **)a2 + 12), *((_QWORD *)a2 + 11));
}
else
{
v10 = *((_QWORD *)a2 + 10);
v11 = *((_QWORD *)a2 + 11);
v45 = *((void **)a2 + 12);
v43 = v10;
v44 = v11;
}
v12 = (char *)&v43 + 1;
if ( (v43 & 1) != 0 )
v12 = (char *)v45;
v9(v7, v12);
if ( (v43 & 1) != 0 )
operator delete(v45);
v13 = *((_BYTE *)a2 + 109);
v14 = *((_QWORD *)this + 71);
v15 = *((_BYTE *)a2 + 110);
v16 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v14 + 1072LL);
v39[0] = *((_BYTE *)a2 + 108);
v39[1] = v13;
v39[2] = v15;
v16(v14, v39);
v17 = *((_DWORD *)a2 + 26);
if ( v17 > 0 )
{
if ( v17 > 56 )
v18 = 56;
else
v18 = *((_DWORD *)a2 + 26);
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"dialogIcon_%03d.png",
(const char *)v18);
CString = (cocos2d::CCSprite *)cocos2d::CCString::getCString(v19);
v22 = cocos2d::CCSprite::create(CString, v21);
*((_QWORD *)this + 73) = v22;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 70) + 464LL))(
*((_QWORD *)this + 70),
v22,
2);
v23 = *((_QWORD *)this + 73);
v24 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v23 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, -143.0, 0.0);
v24(v23, v39);
}
v25 = *((_BYTE *)a2 + 56);
v40 = 0;
v41 = 0;
v42 = nullptr;
v26 = *((float *)a2 + 28);
if ( (v25 & 1) != 0 )
{
std::string::__init(&v40, *((void **)a2 + 9), *((_QWORD *)a2 + 8));
}
else
{
v27 = *((_QWORD *)a2 + 7);
v28 = *((_QWORD *)a2 + 8);
v42 = *((void **)a2 + 9);
v40 = v27;
v41 = v28;
}
v29 = (char *)&v40 + 1;
if ( (v40 & 1) != 0 )
v29 = (const char *)v42;
v38 = (char *)v29;
v43 = 0;
v44 = 0;
v45 = nullptr;
v30 = strlen(v29);
std::string::__init(&v43, v38, v30);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 0.0, 1.0);
v31 = TextArea::create((char *)&v43, "chatFont.fnt", (const cocos2d::CCPoint *)v39, 0, 0, 1.0, 242.0 / v26, 20.0);
v32 = v43;
*((_QWORD *)this + 72) = v31;
if ( (v32 & 1) != 0 )
operator delete(v45);
if ( (v40 & 1) != 0 )
operator delete(v42);
v33 = *((_QWORD *)this + 72);
v34 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v33 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 0.0, 0.5);
v34(v33, v39);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 72) + 160LL))(*((_QWORD *)this + 72), v26);
*(_QWORD *)(*((_QWORD *)this + 72) + 696LL) = (char *)this + 544;
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 70) + 464LL))(
*((_QWORD *)this + 70),
*((_QWORD *)this + 72),
3);
v35 = *((_QWORD *)this + 72);
v36 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v35 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, -92.0, 0.0);
v36(v35, v39);
TextArea::fadeInCharacters(*((_QWORD *)this + 72), 0, 0, 0.2, 0.02);
}
return _stack_chk_guard;
}