//
// ProfilePage::uploadActionFinished from 0x8f9a1c to 0x8f9c2c (528 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ProfilePage::uploadActionFinished @ 0x8f9c30
// > ??> @ 0x6dba8
// > ??> @ 0x11a6a08
//
// 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 ProfilePage::uploadActionFinished(ProfilePage *a1, int a2, int a3)
{
UploadActionPopup *m_popupDelegate; // x20
char *v6; // x0
char *v7; // x0
unsigned int *v8; // x1
int v9; // w2
unsigned int *v10; // x1
int v11; // w2
char *v12; // [xsp+58h] [xbp+58h] BYREF
char *v13; // [xsp+60h] [xbp+60h] BYREF
if ( a1->m_accountID == a2 && a1->m_popupDelegate )
{
sub_D153B8((int)&v12, "Unknown action finished");
switch ( a3 )
{
case 30:
sub_D1798C(&v12, "Request removed", 15);
break;
case 33:
sub_D1798C(&v12, "Friend removed", 14);
break;
case 34:
sub_D1798C(&v12, "User blocked", 12);
break;
}
m_popupDelegate = a1->m_popupDelegate;
sub_D153B8((int)&v13, v12);
UploadActionPopup::showSuccessMessage((__int64)m_popupDelegate, &v13);
v6 = v13 - 24;
if ( v13 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v10 = (unsigned int *)(v13 - 8);
do
v11 = __ldaxr(v10);
while ( __stlxr(v11 - 1, v10) );
}
else
{
v11 = *((_DWORD *)v13 - 2);
*((_DWORD *)v13 - 2) = v11 - 1;
}
if ( v11 <= 0 )
operator delete(v6);
}
v7 = v12 - 24;
if ( v12 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v12 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *((_DWORD *)v12 - 2);
*((_DWORD *)v12 - 2) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v7);
}
}
}