//
// UploadActionPopup::create from 0x8cb4bc to 0x8cb6a4 (488 bytes)
//
// 26 xrefs:
// > GJUserCell::FLAlert_Clicked @ 0x60ca7c
// > GJUserCell::FLAlert_Clicked @ 0x60cb24
// > GJUserCell::FLAlert_Clicked @ 0x60cbb0
// > GJRequestCell::FLAlert_Clicked @ 0x61cb5c
// > GJMessageCell::FLAlert_Clicked @ 0x61d95c
// > EditLevelLayer::FLAlert_Clicked @ 0x6e30ec
// > SupportLayer::onRequestAccess @ 0x7db664
// > ShareCommentLayer::onShare @ 0x7e6568
// > GJRateLevelLayer::FLAlert_Clicked @ 0x8209d8
// > GJRateLevelLayer::onCustomButton @ 0x820c18
// > GJRateLevelLayer::onRate @ 0x820ef4
// > RateStarsLayer::onRate @ 0x824788
// > FriendRequestPopup::onAccept @ 0x8cb728
// > FriendRequestPopup::onRemove @ 0x8cb864
// > GJWriteMessagePopup::onSend @ 0x8cba28
// > FriendRequestPopup::blockUser @ 0x8cdc4c
// > GJMessagePopup::blockUser @ 0x8cf054
// > GJMessagePopup::FLAlert_Clicked @ 0x8cf1cc
// > MessagesProfilePage::deleteSelected @ 0x8f27d8
// > FRequestProfilePage::deleteSelected @ 0x8f4cd4
// > ProfilePage::blockUser @ 0x8fcac4
// > ProfilePage::FLAlert_Clicked @ 0x8fcc78
// > ProfilePage::FLAlert_Clicked @ 0x8fcce8
// > RateDemonLayer::onRate @ 0x933e7c
// > MPLobbyLayer::tryExitLobby @ 0x9cab5c
// > ??> @ 0x5c628
//
// 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
//
__int64 __fastcall UploadActionPopup::create(__int64 a1)
{
__int64 v2; // x19
int v3; // w21
char *v4; // x0
__int64 v5; // x1
__int64 v6; // x0
unsigned int *v8; // x2
int v9; // w1
char *v10; // [xsp+50h] [xbp+50h] BYREF
v2 = operator new(0x2A0u);
cocos2d::CCLayerColor::CCLayerColor((cocos2d::CCLayerColor *)v2);
*(_DWORD *)(v2 + 616) = -1;
*(_DWORD *)(v2 + 624) = -1;
*(_QWORD *)(v2 + 544) = 0;
*(_QWORD *)(v2 + 552) = 0;
*(_QWORD *)(v2 + 560) = 0;
*(_BYTE *)(v2 + 568) = 0;
*(_QWORD *)(v2 + 576) = 0;
*(_DWORD *)(v2 + 584) = 0;
*(_BYTE *)(v2 + 588) = 0;
*(_QWORD *)(v2 + 592) = 0;
*(_QWORD *)(v2 + 600) = 0;
*(_QWORD *)(v2 + 608) = 0;
*(_BYTE *)(v2 + 620) = 0;
*(_BYTE *)(v2 + 621) = 0;
*(_BYTE *)(v2 + 628) = 0;
*(_QWORD *)(v2 + 632) = 0;
*(_QWORD *)v2 = &off_1198070;
*(_QWORD *)(v2 + 320) = off_1198590;
*(_QWORD *)(v2 + 328) = &off_1198600;
*(_QWORD *)(v2 + 336) = &off_1198618;
*(_QWORD *)(v2 + 344) = &off_1198638;
*(_QWORD *)(v2 + 352) = off_1198658;
*(_QWORD *)(v2 + 408) = &off_1198680;
*(_QWORD *)(v2 + 432) = &off_1198700;
*(_QWORD *)(v2 + 640) = 0;
*(_QWORD *)(v2 + 648) = 0;
*(_QWORD *)(v2 + 656) = 0;
*(_BYTE *)(v2 + 664) = 0;
sub_D18D28(&v10);
v3 = (unsigned __int8)UploadActionPopup::init(v2, a1, &v10);
v4 = v10 - 24;
if ( v10 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v10 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *((_DWORD *)v10 - 2);
*((_DWORD *)v10 - 2) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v4);
}
if ( v3 )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v2);
}
else
{
v5 = *(_QWORD *)v2;
v6 = v2;
v2 = 0;
(*(void (__fastcall **)(__int64))(v5 + 16))(v6);
}
return v2;
}