//
// GameLevelManager::uploadFriendRequest from 0x3d2a10 to 0x3d2b98 (392 bytes)
//
// 1 xrefs:
// > ShareCommentLayer::onShare @ 0x4319ee
//
// 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
//
int __fastcall GameLevelManager::uploadFriendRequest(GameLevelManager *a1, const char *a2, int *a3)
{
cocos2d::CCString *v6; // r0
char *CString; // r0
cocos2d::CCDictionary *m_friendReqAndUserBlocks; // r8
char *v9; // r10
int v10; // r8
cocos2d::CCNode *v11; // r8
int v12; // r9
cocos2d::CCString *v13; // r0
const char *v14; // r0
cocos2d::CCString *v15; // r0
char *v16; // r0
int v18; // [sp+14h] [bp-28h]
char *v19; // [sp+24h] [bp-18h] BYREF
char *v20; // [sp+28h] [bp-14h] BYREF
std::string v21; // [sp+2Ch] [bp-10h] BYREF
std::string v22; // [sp+30h] [bp-Ch] BYREF
sub_775C20(&v21);
LevelTools::base64EncodeString((cocos2d::ZipUtils *)&v22, &v21);
sub_774794(a3, &v22);
sub_774008(&v22);
sub_774008(&v21);
v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"friendReq_%i", a2);
CString = (char *)cocos2d::CCString::getCString(v6);
m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks;
v9 = CString;
sub_776584((int)&v22, CString);
v10 = cocos2d::CCDictionary::objectForKey(m_friendReqAndUserBlocks, &v22);
sub_774008(&v22);
if ( v10 )
return 0;
v18 = (int)a1->m_friendReqAndUserBlocks;
v11 = cocos2d::CCNode::create();
sub_776584((int)&v22, v9);
cocos2d::CCDictionary::setObject(v18, v11);
sub_774008(&v22);
GameLevelManager::makeTimeStamp(a1, v9);
GameLevelManager::getBasePostString((GameLevelManager *)&v19);
v12 = *a3;
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfd",
"2893",
103,
98,
&aO1i2r3e45s7t89[10]);
v14 = cocos2d::CCString::getCString(v13);
v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"&toAccountID=%i&comment=%s&secret=%s",
a2,
v12,
v14);
v16 = (char *)cocos2d::CCString::getCString(v15);
sub_774544((int)&v19, v16);
sub_776584((int)&v20, "https://www.boomlings.com/database/uploadFriendRequest20.php");
sub_776584((int)&v21, v19);
sub_776584((int)&v22, v9);
GameLevelManager::ProcessHttpRequest(a1, &v20, (const char **)&v21, (char **)&v22, 29);
sub_774008(&v22);
sub_774008(&v21);
sub_774008(&v20);
sub_774008(&v19);
return 1;
}