//
// cocos2d::CCLightning::draw from 0x140048430 to 0x1400485bd (397 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407093f8
// > ??> @ 0x14090fb3c
//
// 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:25:32 +0000
//
void __fastcall cocos2d::CCLightning::draw(__int64 a1)
{
int v1; // eax
unsigned int *v2; // r12
unsigned __int8 v3; // r8
unsigned __int8 v5; // dl
unsigned int v6; // r8d
__int64 v7; // r14
__int64 v8; // rbp
int v9; // esi
int v10; // edi
const struct cocos2d::CCPoint *v11; // rbx
const struct cocos2d::CCPoint *v12; // rax
unsigned int v13; // r8d
__int64 v14; // rsi
__int64 v15; // rbp
int v16; // r14d
int v17; // edi
const struct cocos2d::CCPoint *v18; // rbx
const struct cocos2d::CCPoint *v19; // rax
float v20; // [rsp+80h] [rbp+8h] BYREF
char v21; // [rsp+88h] [rbp+10h] BYREF
char v22; // [rsp+90h] [rbp+18h] BYREF
float v23; // [rsp+98h] [rbp+20h] BYREF
v1 = *(unsigned __int8 *)(a1 + 397);
v2 = (unsigned int *)(a1 + 392);
v3 = *(_BYTE *)(a1 + 403);
v5 = *(_BYTE *)(a1 + 402);
*(_DWORD *)(a1 + 392) = 0;
cocos2d::ccDrawColor4B(
(cocos2d *)*(unsigned __int8 *)(a1 + 401),
v5,
v3,
(int)(float)((float)v1 * *(float *)(a1 + 380)));
glLineWidth(*(GLfloat *)(a1 + 368));
cocos2d::ccGLBlendFunc((cocos2d *)0x302, 1u, v6);
v7 = *(_QWORD *)(a1 + 384);
v8 = *(_QWORD *)(a1 + 360);
v9 = *(_DWORD *)(a1 + 352);
v10 = *(_DWORD *)(a1 + 348);
v11 = (const struct cocos2d::CCPoint *)cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v21,
(const struct cocos2d::CCPoint *)(a1 + 328));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v22, 0.0, 0.0);
sub_140047EE0(&v20, v12, v11, v10, v9, v8, v7, v2);
if ( *(_BYTE *)(a1 + 344) )
{
v14 = *(_QWORD *)(a1 + 384);
v15 = *(_QWORD *)(a1 + 360);
v16 = *(_DWORD *)(a1 + 352);
v17 = *(_DWORD *)(a1 + 348) / 2;
v18 = (const struct cocos2d::CCPoint *)cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v21,
(const struct cocos2d::CCPoint *)(a1 + 336));
v19 = (const struct cocos2d::CCPoint *)cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v22,
(const struct cocos2d::CCPoint *)&v20);
sub_140047EE0(&v23, v19, v18, v17, v16, v15, v14, v2);
}
cocos2d::ccDrawLines(*(cocos2d **)(a1 + 384), (const struct cocos2d::CCPoint *)*v2, v13);
}