//
// GJPathPage::unlockAnimationStep2 from 0x140396110 to 0x1403963a0 (656 bytes)
//
// 2 xrefs:
// > GJPathPage::playUnlockAnimation @ 0x140395ff0
// > ??> @ 0x1409230f0
//
// 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:31:13 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall GJPathPage::unlockAnimationStep2(int *a1)
{
__int64 v2; // rax
__int64 v3; // rdx
struct cocos2d::CCParticleSystemQuad *v4; // rdi
__int64 v5; // rbx
__int64 v6; // rax
void *v7; // rcx
float v8[2]; // [rsp+30h] [rbp-D0h] BYREF
_BYTE v9[16]; // [rsp+38h] [rbp-C8h] BYREF
__int128 v10; // [rsp+48h] [rbp-B8h] BYREF
void *Block[2]; // [rsp+58h] [rbp-A8h] BYREF
__int64 v12; // [rsp+68h] [rbp-98h]
unsigned __int64 v13; // [rsp+70h] [rbp-90h]
unsigned int v14[66]; // [rsp+80h] [rbp-80h] BYREF
_BYTE v15[40]; // [rsp+188h] [rbp+88h] BYREF
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2, v8);
*(_OWORD *)Block = 0;
v12 = 0;
v13 = 0;
Block[0] = sub_14003D460(0xB0u);
v12 = 170;
v13 = 175;
strcpy(
(char *)Block[0],
"84a0.97a1a0.16a72a180a180a29a0a11a0a0a0a0a0a0a0a2a1a0a0a1a0a0a0a0a0a1a0a1a1a0a0a1a0a0.568627a0a0a0a1a0a0.8a0a0.2a0a1"
"50a0a0a0a0a0a1a2a1a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0");
if ( v12 )
{
sub_14006BF90((__int64)v14);
GameToolbox::particleStringToStruct((__int64 *)Block, (__int64)v14);
v4 = GameToolbox::particleFromStruct(v14, nullptr, 0);
sub_14003D310((__int64)v15);
}
else
{
v4 = nullptr;
}
LOBYTE(v3) = 1;
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)v4 + 1544LL))(v4, v3);
(*(void (__fastcall **)(int *, struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v4, 11);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v4 + 160LL))(v4);
cocos2d::CCParticleSystem::resetSystem(v4);
v5 = *(_QWORD *)v4;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v10, v8[0] * 0.5, v8[1] * 0.5);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int64))(v5 + 184))(v4, v6);
v10 = *(_OWORD *)sub_1403924A0((__int64)v9, a1[172]);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int128 *))(*(_QWORD *)v4 + 1352LL))(v4, &v10);
v10 = *(_OWORD *)sub_140392390((__int64)v9, a1[172]);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int128 *))(*(_QWORD *)v4 + 1384LL))(v4, &v10);
if ( v13 > 0xF )
{
v7 = Block[0];
if ( v13 + 1 >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v7);
}
}