//
// GJFriendRequest::create from 0x817aac to 0x817f5c (1200 bytes)
//
// 3 xrefs:
// > GameLevelManager::onGetGJUserInfoCompleted @ 0x84a3a0
// > GameLevelManager::onGetFriendRequestsCompleted @ 0x84ec1c
// > ??> @ 0x90c40
//
// 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 12:54:56 +0000
//
__int64 __fastcall GJFriendRequest::create(GJFriendRequest *this, cocos2d::CCDictionary *a2)
{
cocos2d::CCString *v3; // x0
int v4; // w27
cocos2d::CCString *v5; // x0
int v6; // w26
cocos2d::CCString *v7; // x0
int v8; // w25
cocos2d::CCString *v9; // x0
size_t v10; // x0
cocos2d::CCString *v11; // x0
size_t v12; // x0
cocos2d::CCString *v13; // x0
GJFriendRequest *v14; // x0
bool v15; // w24
__int64 v16; // x20
char v17; // w0
__int64 *v18; // x0
__int64 *v19; // x0
char v20; // w0
char *CString; // [xsp+68h] [xbp+68h]
char *v23; // [xsp+68h] [xbp+68h]
__int64 v24; // [xsp+78h] [xbp+78h] BYREF
size_t v25; // [xsp+80h] [xbp+80h]
void *v26; // [xsp+88h] [xbp+88h]
__int64 v27; // [xsp+90h] [xbp+90h] BYREF
size_t v28; // [xsp+98h] [xbp+98h]
void *v29; // [xsp+A0h] [xbp+A0h]
__int64 v30[2]; // [xsp+A8h] [xbp+A8h] BYREF
void *v31; // [xsp+B8h] [xbp+B8h]
__int64 v32[2]; // [xsp+C0h] [xbp+C0h] BYREF
void *v33; // [xsp+D0h] [xbp+D0h]
__int64 v34; // [xsp+D8h] [xbp+D8h] BYREF
size_t v35; // [xsp+E0h] [xbp+E0h]
void *v36; // [xsp+E8h] [xbp+E8h]
__int64 v37; // [xsp+F0h] [xbp+F0h] BYREF
size_t v38; // [xsp+F8h] [xbp+F8h]
void *v39; // [xsp+100h] [xbp+100h]
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "32", 2u);
v3 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, &v37);
v4 = cocos2d::CCString::intValue(v3);
if ( (v37 & 1) != 0 )
operator delete(v39);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "33", 2u);
v5 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, &v37);
v6 = cocos2d::CCString::intValue(v5);
if ( (v37 & 1) != 0 )
operator delete(v39);
v37 = 0;
v38 = 0;
v39 = nullptr;
std::string::__init(&v37, "34", 2u);
v7 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, &v37);
v8 = cocos2d::CCString::intValue(v7);
if ( (v37 & 1) != 0 )
operator delete(v39);
v34 = 0;
v35 = 0;
v36 = nullptr;
std::string::__init(&v34, "35", 2u);
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, &v34);
CString = (char *)cocos2d::CCString::getCString(v9);
v37 = 0;
v38 = 0;
v39 = nullptr;
v10 = strlen(CString);
std::string::__init(&v37, CString, v10);
LevelTools::base64DecodeString((__int64)&v37, &v24);
if ( (v37 & 1) != 0 )
operator delete(v39);
if ( (v34 & 1) != 0 )
operator delete(v36);
v30[0] = 0;
v30[1] = 0;
v31 = nullptr;
std::string::__init(v30, "37", 2u);
v11 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v30);
v23 = (char *)cocos2d::CCString::getCString(v11);
v27 = 0;
v28 = 0;
v29 = nullptr;
v12 = strlen(v23);
std::string::__init(&v27, v23, v12);
if ( (v30[0] & 1) != 0 )
operator delete(v31);
v32[0] = 0;
v32[1] = 0;
v33 = nullptr;
std::string::__init(v32, "36", 2u);
v13 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v32);
v14 = (GJFriendRequest *)cocos2d::CCString::getCString(v13);
v15 = v14 != nullptr;
if ( (v32[0] & 1) != 0 )
operator delete(v33);
v16 = GJFriendRequest::create(v14);
v17 = v24;
*(_DWORD *)(v16 + 316) = v4;
*(_DWORD *)(v16 + 320) = v6;
*(_DWORD *)(v16 + 324) = v8;
v34 = 0;
v35 = 0;
v36 = nullptr;
if ( (v17 & 1) != 0 )
{
std::string::__init(&v34, v26, v25);
}
else
{
v36 = v26;
v34 = v24;
v35 = v25;
}
v18 = (__int64 *)(v16 + 328);
if ( (__int64 *)(v16 + 328) != &v34 )
{
if ( (v34 & 1) != 0 )
std::string::assign(v18, v36, v35);
else
std::string::assign(v18, (char *)&v34 + 1, (unsigned __int8)v34 >> 1);
}
if ( (v34 & 1) != 0 )
operator delete(v36);
v37 = 0;
v38 = 0;
v39 = nullptr;
if ( (v27 & 1) != 0 )
{
std::string::__init(&v37, v29, v28);
}
else
{
v37 = v27;
v38 = v28;
v39 = v29;
}
v19 = (__int64 *)(v16 + 352);
if ( (__int64 *)(v16 + 352) != &v37 )
{
if ( (v37 & 1) != 0 )
std::string::assign(v19, v39, v38);
else
std::string::assign(v19, (char *)&v37 + 1, (unsigned __int8)v37 >> 1);
}
if ( (v37 & 1) != 0 )
{
operator delete(v39);
*(_BYTE *)(v16 + 376) = v15;
if ( (v27 & 1) == 0 )
goto LABEL_29;
}
else
{
v20 = v27;
*(_BYTE *)(v16 + 376) = v15;
if ( (v20 & 1) == 0 )
goto LABEL_29;
}
operator delete(v29);
LABEL_29:
if ( (v24 & 1) != 0 )
operator delete(v26);
return v16;
}