//
// RateDemonLayer::uploadActionFinished from 0x933f38 to 0x934050 (280 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'RateDemonLayer::uploadActionFinished @ 0x934054
// > ??> @ 0xab780
// > ??> @ 0x11b12f0
//
// 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 RateDemonLayer::uploadActionFinished(RateDemonLayer *a1, int a2, int a3)
{
UploadActionPopup *m_popup; // x20
char *v4; // x0
unsigned int *v5; // x2
int v6; // w1
char *v7; // [xsp+40h] [xbp+40h] BYREF
if ( a3 == 50 && a1->m_levelID == a2 )
{
m_popup = a1->m_popup;
a1->m_uploadFinished = 1;
if ( m_popup )
{
sub_D153B8((int)&v7, "Rating submitted!");
UploadActionPopup::showSuccessMessage((__int64)m_popup, &v7);
v4 = v7 - 24;
if ( v7 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v5 = (unsigned int *)(v7 - 8);
do
v6 = __ldaxr(v5);
while ( __stlxr(v6 - 1, v5) );
}
else
{
v6 = *((_DWORD *)v7 - 2);
*((_DWORD *)v7 - 2) = v6 - 1;
}
if ( v6 <= 0 )
operator delete(v4);
}
}
}
}