//
// cocos2d::CCShaky3D::update from 0x18002dfc0 to 0x18002e18d (461 bytes)
//
// 5 xrefs:
// > ??> @ 0x1800e8b38
// > ??> @ 0x180134eb8
// > ??> @ 0x180134ec8
// > ??> @ 0x1801438a8
// > ??> @ 0x1801afe5c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCShaky3D::update(cocos2d::CCShaky3D *this, float a2)
{
int v2; // ebp
float v4; // xmm7_4
int v5; // esi
float v6; // xmm6_4
const struct cocos2d::CCPoint *v7; // rax
int v8; // ebx
int v9; // edx
int v10; // ebx
int v11; // eax
bool v12; // zf
int v13; // ebx
const struct cocos2d::CCPoint *v14; // rax
float v15; // [rsp+20h] [rbp-78h] BYREF
float v16; // [rsp+28h] [rbp-70h] BYREF
struct cocos2d::_ccVertex3F v17; // [rsp+30h] [rbp-68h] BYREF
v2 = 0;
if ( (float)(*((float *)this + 24) + 1.0) > 0.0 )
{
v4 = 0.0;
do
{
v5 = 0;
if ( (float)(*((float *)this + 25) + 1.0) > 0.0 )
{
v6 = 0.0;
do
{
v7 = (const struct cocos2d::CCPoint *)kmVec2Fill(&v15, v4, v6);
cocos2d::CCGrid3DAction::originalVertex(this, &v17, v7);
v8 = *((_DWORD *)this + 26);
v9 = rand() % (2 * v8) - v8;
v10 = *((_DWORD *)this + 26);
v17.x = v17.x + (float)v9;
v11 = rand();
v12 = *((_BYTE *)this + 108) == 0;
v17.y = v17.y + (float)(v11 % (2 * v10) - v10);
if ( !v12 )
{
v13 = *((_DWORD *)this + 26);
v17.z = v17.z + (float)(rand() % (2 * v13) - v13);
}
v14 = (const struct cocos2d::CCPoint *)kmVec2Fill(&v16, v4, v6);
cocos2d::CCGrid3DAction::setVertex(this, v14, &v17);
v6 = (float)++v5;
}
while ( (float)(*((float *)this + 25) + 1.0) > (float)v5 );
}
v4 = (float)++v2;
}
while ( (float)(*((float *)this + 24) + 1.0) > (float)v2 );
}
}