//
// sub_100507EC0 from 0x100507ec0 to 0x100508010 (336 bytes)
//
// 1 xrefs:
// > sub_100507288 @ 0x1005075f4
//
// 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 11:06:57 +0000
//
__int64 __fastcall sub_100507EC0(__int64 a1, __int64 a2)
{
__int64 result; // x0
void **v4; // x8
void *v5; // x0
char *CString; // x0
void *v7; // x19
void *__dst[2]; // [xsp+10h] [xbp-40h] BYREF
__int64 v9; // [xsp+20h] [xbp-30h]
void *__p[2]; // [xsp+28h] [xbp-28h] BYREF
char v11; // [xsp+3Fh] [xbp-11h]
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 640LL))(a2);
if ( (*(_BYTE *)(a1 + 864) & 1) == 0
&& *(int *)(a1 + 868) <= 0
&& *(int *)(a1 + 872) <= 0
&& *(int *)(a1 + 876) <= 0
&& (*(_BYTE *)(a1 + 848) & 1) == 0
&& result )
{
*(_DWORD *)(a1 + 872) = *(_DWORD *)(result + 376);
if ( *(char *)(result + 343) < 0 )
{
sub_1000097D0(__dst, *(void **)(result + 320), *(_QWORD *)(result + 328));
}
else
{
*(_OWORD *)__dst = *(_OWORD *)(result + 320);
v9 = *(_QWORD *)(result + 336);
}
v4 = __dst;
if ( v9 < 0 )
v4 = (void **)__dst[0];
v5 = sub_1003065B0(
"Make %s the owner of this group chat?\nOnly the owner can kick members.",
(const char *)v4);
CString = (char *)cocos2d::CCString::getCString((__int64)v5);
sub_100009900(__p, CString);
v7 = FLAlertLayer::create(
a1 + 792,
(__int64)"Transfer Ownership",
(__int64)__p,
(__int64)"Back",
(__int64)"Transfer",
0,
380.0,
0.0,
1.0);
if ( v11 < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v9) < 0 )
operator delete(__dst[0]);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v7 + 72LL))(v7, 5);
return (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v7 + 1312LL))(v7);
}
return result;
}