//
// GJBaseGameLayer::controlAreaEffect from 0x100114160 to 0x10011420f (175 bytes)
//
// 0 xrefs:
//
// 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 12:24:33 +0000
//
__int64 __fastcall GJBaseGameLayer::controlAreaEffect(__int64 a1, __int64 a2, __int64 *a3, int a4)
{
__int64 result; // rax
__int64 v6; // rcx
__int64 v9; // rdx
int v10; // r13d
__int64 v11; // rsi
char v12; // dl
result = *a3;
v6 = a3[1];
if ( v6 != *a3 )
{
v9 = 0;
v10 = 0;
do
{
if ( *(_QWORD *)(result + 240 * v9 + 168) == a2 )
{
v11 = result + 240 * v9;
switch ( a4 )
{
case 0:
sub_1000FAFD0((__int64)a3, v11);
result = *a3;
v6 = a3[1];
goto LABEL_11;
case 1:
v12 = 1;
goto LABEL_9;
case 2:
v12 = 0;
LABEL_9:
*(_BYTE *)(v11 + 196) = v12;
*(_BYTE *)(v11 + 197) = v12;
break;
}
}
++v10;
LABEL_11:
v9 = v10;
}
while ( 0xEEEEEEEEEEEEEEEFLL * ((v6 - result) >> 4) > v10 );
}
return result;
}