//
// ShaderLayer::init from 0x1003b3b60 to 0x1003b3c1b (187 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b37870
//
// 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:29:27 +0000
//
__int64 __fastcall ShaderLayer::init(__int64 a1)
{
__int64 result; // rax
unsigned int v2; // r14d
__int64 v3; // rax
double v4; // xmm0_8
result = cocos2d::CCLayer::init(a1);
if ( (_BYTE)result )
{
v2 = result;
v3 = GameManager::sharedState();
ShaderLayer::setupShader(a1, *(unsigned __int8 *)(v3 + 1700));
v4 = (float)((float)((float)((float)rand() * 4.6566129e-10) * 100.0) + 10000.0);
*(double *)(a1 + 504) = v4;
*(double *)(a1 + 488) = v4;
if ( *(_DWORD *)(a1 + 1068) == 1 )
{
if ( *(_DWORD *)(a1 + 1072) == 15 )
goto LABEL_4;
}
else
{
*(_DWORD *)(a1 + 1068) = 1;
if ( *(_DWORD *)(a1 + 1072) == 15 )
{
LABEL_4:
result = v2;
if ( !*(_BYTE *)(a1 + 1077) )
{
LABEL_6:
*(_BYTE *)(a1 + 1076) = 1;
return result;
}
LABEL_5:
*(_BYTE *)(a1 + 1077) = 0;
goto LABEL_6;
}
}
*(_DWORD *)(a1 + 1072) = 15;
result = v2;
if ( !*(_BYTE *)(a1 + 1077) )
goto LABEL_6;
goto LABEL_5;
}
return result;
}