//
// GJChallengeItem::dataLoaded from 0x10008f8c0 to 0x10008fa1c (348 bytes)
//
// 1 xrefs:
// > GJChallengeItem::createWithCoder @ 0x10008f8ae
//
// 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
//
void __fastcall GJChallengeItem::dataLoaded(GJChallengeItem *a1, DS_Dictionary *a2)
{
int IntegerForKey; // r15d
int v3; // eax
int v4; // r15d
int v5; // eax
int v6; // r15d
int v7; // eax
std::string v8; // [rsp+0h] [rbp-30h] BYREF
a1->m_challengeType = DS_Dictionary::getIntegerForKey(a2, "1");
a1->m_timeLeft = DS_Dictionary::getIntegerForKey(a2, "5");
a1->m_canClaim = DS_Dictionary::getBoolForKey(a2, "6");
DS_Dictionary::getStringForKey(&v8, a2, "7");
if ( (a1->m_name.m_data.m_short.sizex2 & 1) != 0 )
operator delete(a1->m_name.m_data.m_long.longStorage);
a1->m_name = v8;
IntegerForKey = DS_Dictionary::getIntegerForKey(a2, "2");
a1->m_count.value = IntegerForKey;
v3 = (int)(float)((float)((float)rand() * 4.6566129e-10) * 1000.0);
a1->m_count.seed = v3;
a1->m_count.random = v3 + IntegerForKey;
v4 = DS_Dictionary::getIntegerForKey(a2, "3");
a1->m_goal.value = v4;
v5 = (int)(float)((float)((float)rand() * 4.6566129e-10) * 1000.0);
a1->m_goal.seed = v5;
a1->m_goal.random = v5 + v4;
v6 = DS_Dictionary::getIntegerForKey(a2, "4");
a1->m_reward.value = v6;
v7 = (int)(float)((float)((float)rand() * 4.6566129e-10) * 1000.0);
a1->m_reward.seed = v7;
a1->m_reward.random = v7 + v6;
a1->m_position = DS_Dictionary::getIntegerForKey(a2, "8");
}