//
// sub_431C60 from 0x431c60 to 0x431d7a (282 bytes)
//
// 2 xrefs:
// > GJNotificationCell::loadFromNotification @ 0x431edc
// > GJNotificationCell::loadFromNotification @ 0x431f4e
//
// 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:48:15 +0000
//
int __fastcall sub_431C60(int a1, unsigned __int8 *a2)
{
int v4; // r3
cocos2d::CCArray *v6; // r0
int v7; // r0
const char *v8; // r0
size_t i; // r9
int v10; // r0
int v11; // r1
_BYTE *v12; // r2
int v13; // r3
int v14; // r3
cocos2d::CCArray *v15; // r0
int v16; // [sp+0h] [bp-2Ch] BYREF
int v17; // [sp+4h] [bp-28h]
_BYTE *v18; // [sp+8h] [bp-24h]
int v19; // [sp+Ch] [bp-20h] BYREF
int v20; // [sp+10h] [bp-1Ch]
_BYTE *v21; // [sp+14h] [bp-18h]
int v22[3]; // [sp+18h] [bp-14h] BYREF
v4 = *(_DWORD *)(a1 + 520);
if ( !v4 )
return 0;
v6 = *(cocos2d::CCArray **)(v4 + 536);
if ( !v6 || (int)cocos2d::CCArray::count(v6) <= 1 )
return 0;
v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(*(_DWORD *)(a1 + 520) + 536), 0);
v8 = (const char *)(*(int (__fastcall **)(int))(*(_DWORD *)v7 + 472))(v7);
v16 = 0;
v17 = 0;
v18 = nullptr;
for ( i = strlen(v8); i > 4; i -= 4 )
{
GameToolbox::singleLineSnippet((unsigned __int8 *)&v19, (int)a2, i);
if ( (v16 & 1) != 0 )
{
*v18 = 0;
v17 = 0;
}
else
{
LOWORD(v16) = 0;
}
std::string::reserve(&v16, 0);
v10 = v19;
v11 = v20;
v12 = v21;
v19 = 0;
v20 = 0;
v21 = nullptr;
v16 = v10;
v17 = v11;
v18 = v12;
std::string::~string((int)&v19);
std::string::basic_string(v22, (int)&v16);
TextArea::setString(a1, v22);
std::string::~string((int)v22);
v13 = *(_DWORD *)(a1 + 520);
if ( !v13 )
break;
v15 = *(cocos2d::CCArray **)(v13 + 536);
if ( !v15 || (int)cocos2d::CCArray::count(v15) <= 1 )
break;
}
if ( (v16 & 1) != 0 )
v14 = v17;
else
v14 = (int)(unsigned __int8)v16 >> 1;
if ( v14 )
std::string::operator=(a2, (unsigned __int8 *)&v16);
std::string::~string((int)&v16);
return 1;
}