//
// AccountLayer::syncAccountFailed from 0x100166b8c to 0x100166cb4 (296 bytes)
//
// 2 xrefs:
// > sub_100166CFC @ 0x100166d00
// > ??> @ 0x10079c340
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall AccountLayer::syncAccountFailed(AccountLayer *a1, BackupAccountError a2, int a3)
{
TextArea *m_textArea; // x20
const void **v7; // x8
cocos2d::CCString *v8; // x0
char *CString; // x0
const void *v10[2]; // [xsp+8h] [xbp-68h] BYREF
char v11; // [xsp+1Fh] [xbp-51h]
const void *v12[2]; // [xsp+20h] [xbp-50h] BYREF
char v13; // [xsp+37h] [xbp-39h]
const void *v14[2]; // [xsp+38h] [xbp-38h] BYREF
char v15; // [xsp+4Fh] [xbp-21h]
((void (__fastcall *)(cocos2d::CCMenu *, __int64))a1->m_buttonMenu->setEnabled)(a1->m_buttonMenu, 1);
((void (__fastcall *)(AccountLayer *, __int64))a1->setKeypadEnabled)(a1, 1);
((void (__fastcall *)(LoadingCircle *, _QWORD))a1->m_loadingCircle->setVisible)(a1->m_loadingCircle, 0);
m_textArea = a1->m_textArea;
if ( a2 == BackupOrSyncFailed )
{
v8 = (cocos2d::CCString *)sub_100268F4C("Sync failed. Error code: %i", a3);
CString = (char *)cocos2d::CCString::getCString(v8);
sub_100009900(v12, CString);
TextArea::setString((__int64)m_textArea, v12);
if ( v13 < 0 )
{
v7 = v12;
goto LABEL_9;
}
}
else if ( a2 == LoginFailed )
{
sub_100009900(v14, "Login failed. Please login to verify your account.");
TextArea::setString((__int64)m_textArea, v14);
if ( v15 < 0 )
{
v7 = v14;
LABEL_9:
operator delete((void *)*v7);
}
}
else
{
sub_100009900(v10, "Sync failed. Please try again later.");
TextArea::setString((__int64)m_textArea, v10);
if ( v11 < 0 )
{
v7 = v10;
goto LABEL_9;
}
}
TextArea::colorAllCharactersTo(a1->m_textArea, (cocos2d::ccColor3B)19455);
}