//
// AccountLayer::syncAccountFinished from 0x84c638 to 0x84c820 (488 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'AccountLayer::syncAccountFinished @ 0x84c828
// > ??> @ 0x6cd98
// > ??> @ 0x118ddb8
//
// 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 AccountLayer::syncAccountFinished(AccountLayer *a1)
{
TextArea *m_textArea; // x19
char *v3; // x0
FLAlertLayer *v4; // x20
char *v5; // x0
unsigned int *v6; // x1
int v7; // w2
unsigned int *v8; // x1
int v9; // w2
_DWORD *v10; // [xsp+50h] [xbp+50h] BYREF
AccountLayer::hideLoadingUI(a1);
m_textArea = a1->m_textArea;
sub_D153B8((int)&v10, "Sync successful");
TextArea::setString((__int64)m_textArea, (const void **)&v10);
v3 = (char *)(v10 - 6);
if ( v10 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = v10 - 2;
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *(v10 - 2);
*(v10 - 2) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v3);
}
TextArea::colorAllCharactersTo(a1->m_textArea, (cocos2d::ccColor3B)65280);
sub_D153B8((int)&v10, "Saved data has been downloaded.");
v4 = FLAlertLayer::create(0, (__int64)"Load Data", (__int64)&v10);
v5 = (char *)(v10 - 6);
if ( v10 - 6 != (_DWORD *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = v10 - 2;
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *(v10 - 2);
*(v10 - 2) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v5);
}
v4->show(v4);
}