//
// FriendRequestPopup::uploadActionFailed from 0x8cc5d0 to 0x8cc6ec (284 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'FriendRequestPopup::uploadActionFailed @ 0x8cc6f0
// > ??> @ 0x4d748
// > ??> @ 0x1198c38
//
// 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 FriendRequestPopup::uploadActionFailed(FriendRequestPopup *a1, int a2, int a3)
{
GJFriendRequest *m_request; // x2
UploadActionPopup *m_popup; // x20
char *v5; // x0
unsigned int *v6; // x2
int v7; // w1
char *v8; // [xsp+40h] [xbp+40h] BYREF
m_request = a1->m_request;
if ( m_request && (m_request->m_requestID == a2 || a2 == m_request->m_accountID) )
{
m_popup = a1->m_popup;
if ( m_popup )
{
sub_D153B8((int)&v8, "Failed. Please try again later.");
UploadActionPopup::showFailMessage((__int64)m_popup, &v8);
v5 = v8 - 24;
if ( v8 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = (unsigned int *)(v8 - 8);
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *((_DWORD *)v8 - 2);
*((_DWORD *)v8 - 2) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v5);
}
}
}
}