//
// GJWriteMessagePopup::uploadMessageFailed from 0x8cc81c to 0x8cc924 (264 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'GJWriteMessagePopup::uploadMessageFailed @ 0x8cc928
// > ??> @ 0x81e28
// > ??> @ 0x1199ac0
//
// 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 GJWriteMessagePopup::uploadMessageFailed(GJWriteMessagePopup *a1, int a2)
{
UploadActionPopup *m_uploadPopup; // x20
char *v3; // x0
unsigned int *v4; // x2
int v5; // w1
char *v6; // [xsp+40h] [xbp+40h] BYREF
if ( a1->m_messageID == a2 )
{
m_uploadPopup = a1->m_uploadPopup;
if ( m_uploadPopup )
{
sub_D153B8((int)&v6, "Failed. Please try again later.");
UploadActionPopup::showFailMessage((__int64)m_uploadPopup, &v6);
v3 = v6 - 24;
if ( v6 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v4 = (unsigned int *)(v6 - 8);
do
v5 = __ldaxr(v4);
while ( __stlxr(v5 - 1, v4) );
}
else
{
v5 = *((_DWORD *)v6 - 2);
*((_DWORD *)v6 - 2) = v5 - 1;
}
if ( v5 <= 0 )
operator delete(v3);
}
}
}
}