//
// MessagesProfilePage::uploadActionFinished from 0xa4ad44 to 0xa4af1c (472 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'MessagesProfilePage::uploadActionFinished @ 0xa4af20
// > ??> @ 0xad5f0
// > ??> @ 0x148b0b0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:00:02 +0000
//
__int64 __fastcall MessagesProfilePage::uploadActionFinished(MessagesProfilePage *this, int a2, int a3)
{
const char *v4; // x21
__int64 v5; // x24
size_t v6; // x0
size_t v7; // x19
char *v8; // x3
unsigned __int64 v10; // x22
__int64 v12[2]; // [xsp+58h] [xbp+58h] BYREF
void *v13; // [xsp+68h] [xbp+68h]
__int64 v14; // [xsp+70h] [xbp+70h] BYREF
size_t v15; // [xsp+78h] [xbp+78h]
void *v16; // [xsp+80h] [xbp+80h]
if ( !*((_QWORD *)this + 95) )
return _stack_chk_guard;
v12[0] = 33;
v13 = (void *)operator new(0x20u);
v12[1] = 23;
strcpy((char *)v13, "Unknown action finished");
if ( a3 == 45 )
std::string::assign(v12, "Messages removed", 0x10u);
v4 = (char *)v12 + 1;
v5 = *((_QWORD *)this + 95);
if ( (v12[0] & 1) != 0 )
v4 = (const char *)v13;
v14 = 0;
v15 = 0;
v16 = nullptr;
v6 = strlen(v4);
v7 = v6;
if ( v6 > 0xFFFFFFFFFFFFFFEFLL )
sub_62DBDC();
if ( v6 > 0x16 )
{
v10 = (v6 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v8 = (char *)operator new(v10);
v16 = v8;
v15 = v7;
v14 = v10 | 1;
goto LABEL_15;
}
LOBYTE(v14) = 2 * v6;
v8 = (char *)&v14 + 1;
if ( v6 )
LABEL_15:
v8 = (char *)memcpy(v8, v4, v7);
v8[v7] = 0;
UploadActionPopup::showSuccessMessage(v5, (__int64)&v14);
if ( (v14 & 1) != 0 )
operator delete(v16);
if ( (v12[0] & 1) != 0 )
operator delete(v13);
return _stack_chk_guard;
}