//
// GJGameLevel::setDemon from 0x140218270 to 0x1402182bf (79 bytes)
//
// 2 xrefs:
// > GJGameLevel::create @ 0x140263236
// > ??> @ 0x14091b89c
//
// This function is hookable on this platform (idp: pc, 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:28:21 +0000
//
__int64 __fastcall GJGameLevel::setDemon(_DWORD *a1, int a2)
{
float v4; // xmm0_4
__int64 result; // rax
a1[253] = a2;
v4 = (float)((float)rand() / 32767.0) * 1000.0;
a1[252] = (int)v4;
result = (unsigned int)(a2 + (int)v4);
a1[251] = result;
return result;
}