//
// sub_100040804 from 0x100040804 to 0x100040914 (272 bytes)
//
// 1 xrefs:
// > SetGroupIDLayer::init @ 0x10003efb4
//
// 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 10:57:36 +0000
//
__int64 __fastcall sub_100040804(__int64 a1)
{
int v2; // w20
__int64 v3; // x19
void *v5[2]; // [xsp+0h] [xbp-70h] BYREF
char v6; // [xsp+17h] [xbp-59h]
void *v7[2]; // [xsp+18h] [xbp-58h] BYREF
char v8; // [xsp+2Fh] [xbp-41h]
void *__p[2]; // [xsp+30h] [xbp-40h] BYREF
char v10; // [xsp+47h] [xbp-29h]
void *v11[2]; // [xsp+48h] [xbp-28h] BYREF
char v12; // [xsp+5Fh] [xbp-11h]
v2 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(GameManager::sharedState(a1) + 552) + 3272LL) + 436LL);
sub_100009900(v11, "GroupID Offset");
sub_100009900(__p, "");
v3 = sub_1001CE4E0(a1 + 664, v11, __p, 1, (float)v2, 0.0, 9999.0);
if ( v10 < 0 )
operator delete(__p[0]);
if ( v12 < 0 )
operator delete(v11[0]);
sub_100009900(v7, "Help");
sub_100009900(
v5,
"This lets you set a Group ID offset that Next Free will take into account and start from. Useful for collaborations.");
sub_1001CF204(v3, v7, v5);
if ( v6 < 0 )
operator delete(v5[0]);
if ( v8 < 0 )
operator delete(v7[0]);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 72LL))(v3, 26);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 1312LL))(v3);
}