//
// GJChallengeItem::dataLoaded from 0x8cd570 to 0x8cd7ac (572 bytes)
//
// 2 xrefs:
// > GJChallengeItem::createWithCoder @ 0x8d8fe8
// > ??> @ 0xa1740
//
// 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:56:37 +0000
//
__int64 __fastcall GJChallengeItem::dataLoaded(GJChallengeItem *this, DS_Dictionary *a2)
{
char *v4; // x24
char *v5; // x0
int v6; // w23
__int64 v7; // x2
size_t v8; // x2
__int64 v9; // x3
int IntegerForKey; // w0
int v11; // w22
int v12; // w2
int v13; // w0
int v14; // w22
int v15; // w2
int v16; // w0
int v17; // w22
float v18; // s0
DS_Dictionary *v19; // x0
int v20; // w20
unsigned __int64 v22; // x0
unsigned __int64 v23; // x0
unsigned __int8 v24; // w2
__int64 v25[3]; // [xsp+50h] [xbp+50h] BYREF
*((_DWORD *)this + 14) = DS_Dictionary::getIntegerForKey(a2, "1");
*((_DWORD *)this + 24) = DS_Dictionary::getIntegerForKey(a2, "5");
*((_BYTE *)this + 100) = DS_Dictionary::getBoolForKey(a2, "6");
DS_Dictionary::getStringForKey(v25, a2, "7");
if ( (*((_BYTE *)this + 112) & 1) == 0 )
goto LABEL_9;
**((_BYTE **)this + 16) = 0;
*((_QWORD *)this + 15) = 0;
if ( (*((_BYTE *)this + 112) & 1) == 0 )
{
v22 = *((_BYTE *)this + 112) >> 1;
if ( v22 <= 0x16 )
goto LABEL_9;
v23 = (v22 + 16) & 0xFFFFFFFFFFFFFFF0LL;
if ( v23 == 23 )
goto LABEL_9;
if ( v23 - 1 > 0x16 )
{
v5 = (char *)operator new(v23);
v24 = *((_BYTE *)this + 112);
v6 = v24 & 1;
if ( (v24 & 1) == 0 )
{
LABEL_17:
v4 = (char *)this + 113;
v7 = v24 >> 1;
goto LABEL_5;
}
}
else
{
v5 = (char *)operator new(v23);
v24 = *((_BYTE *)this + 112);
v6 = v24 & 1;
if ( (v24 & 1) == 0 )
goto LABEL_17;
}
v4 = *((char **)this + 16);
goto LABEL_4;
}
v4 = *((char **)this + 16);
v5 = (char *)this + 113;
v6 = 1;
LABEL_4:
v7 = *((_QWORD *)this + 15);
LABEL_5:
v8 = v7 + 1;
if ( v8 )
memcpy(v5, v4, v8);
if ( v6 )
operator delete(v4);
LABEL_9:
v9 = v25[1];
*((_QWORD *)this + 14) = v25[0];
*((_QWORD *)this + 15) = v9;
*((_QWORD *)this + 16) = v25[2];
IntegerForKey = DS_Dictionary::getIntegerForKey(a2, &byte_120A098);
*((_DWORD *)this + 17) = IntegerForKey;
v11 = IntegerForKey;
v12 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
*((_DWORD *)this + 16) = v12;
*((_DWORD *)this + 15) = v11 + v12;
v13 = DS_Dictionary::getIntegerForKey(a2, "3");
*((_DWORD *)this + 23) = v13;
v14 = v13;
v15 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
*((_DWORD *)this + 22) = v15;
*((_DWORD *)this + 21) = v14 + v15;
v16 = DS_Dictionary::getIntegerForKey(a2, &byte_11BCA00);
*((_DWORD *)this + 20) = v16;
v17 = v16;
v18 = (float)rand();
v19 = a2;
v20 = (int)(float)((float)(v18 * 4.6566e-10) * 1000.0);
*((_DWORD *)this + 19) = v20;
*((_DWORD *)this + 18) = v17 + v20;
*((_DWORD *)this + 26) = DS_Dictionary::getIntegerForKey(v19, "8");
return _stack_chk_guard;
}