//
// GJBaseGameLayer::lightningFlash from 0x140351030 to 0x140351210 (480 bytes)
//
// 2 xrefs:
// > PlayerObject::togglePlayerScale @ 0x1404ff263
// > ??> @ 0x1409202e8
//
// 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:30:47 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCAction *__fastcall GJBaseGameLayer::lightningFlash(
__int64 a1,
__int64 a2,
__int64 a3,
__int64 a4,
int a5,
int a6,
int a7,
char a8,
int a9)
{
__int64 v12; // rdx
struct cocos2d::CCAction *result; // rax
const struct cocos2d::CCPoint *v14; // rax
const struct cocos2d::CCPoint *v15; // rbx
const struct cocos2d::CCPoint *v16; // rax
cocos2d::CCObject *v17; // rbx
__int64 v18; // rax
__int64 v19; // rdi
struct cocos2d::CCBlink *v20; // rbx
struct cocos2d::CCFiniteTimeAction *v21; // rax
struct cocos2d::CCAction *v22; // rax
__int64 v23; // rbx
struct cocos2d::CCFiniteTimeAction *v24; // rax
_BYTE v25[8]; // [rsp+20h] [rbp-28h] BYREF
void *v26; // [rsp+28h] [rbp-20h] BYREF
_BYTE v27[24]; // [rsp+30h] [rbp-18h] BYREF
cocos2d::CCPoint::operator-(a3, v25, a2);
result = (struct cocos2d::CCAction *)qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v26 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v26);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
result = (struct cocos2d::CCAction *)qword_14090BFD0;
}
if ( !*((_BYTE *)result + 957) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v26, (const struct cocos2d::CCPoint *)&dword_14090AA70);
v15 = v14;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27, (const struct cocos2d::CCPoint *)v25);
v17 = cocos2d::CCLightning::lightningWithStrikePoint(v16, v15);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v17 + 184LL))(v17, a2);
(**((void (__fastcall ***)(__int64, __int64))v17 + 40))((__int64)v17 + 320, a4);
*((_DWORD *)v17 + 92) = a5;
*((_WORD *)v17 + 186) = 257;
*((_DWORD *)v17 + 95) = a9;
if ( a7 )
*((_DWORD *)v17 + 87) = a7;
result = (struct cocos2d::CCAction *)(*(__int64 (__fastcall **)(_QWORD, cocos2d::CCObject *, _QWORD))(**(_QWORD **)(a1 + 4296) + 456LL))(
*(_QWORD *)(a1 + 4296),
v17,
0);
}
if ( a8 )
{
LOBYTE(v12) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 13032) + 336LL))(*(_QWORD *)(a1 + 13032), v12);
v18 = cocos2d::CCHide::create();
if ( a7 )
{
v23 = v18;
v24 = cocos2d::CCDelayTime::create(0.079999998);
v22 = cocos2d::CCSequence::create(v24, v23, 0);
}
else
{
v19 = v18;
v20 = cocos2d::CCBlink::create(0.12, 1u);
v21 = cocos2d::CCDelayTime::create(0.079999998);
v22 = cocos2d::CCSequence::create(v21, v20, v19, 0);
}
return cocos2d::CCNode::runAction(*(cocos2d::CCNode **)(a1 + 13032), v22);
}
return result;
}