//
// OBB2D::create from 0x3d787c to 0x3d794e (210 bytes)
//
// 4 xrefs:
// > GameObject::updateOrientedBox @ 0x44e724
// > LevelEditorLayer::init @ 0x4761bc
// > GJBaseGameLayer::init @ 0x5b519a
// > GJBaseGameLayer::init @ 0x5b51b8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:46:45 +0000
//
int *__fastcall OBB2D::create(const cocos2d::CCPoint *a1, float a2, float a3, float a4)
{
int *v8; // r5
cocos2d::CCPoint *v9; // r4
int v10; // r3
int *v11; // r0
_BYTE v13[8]; // [sp+Ch] [bp-10h] BYREF
v8 = (int *)operator new(0x180u);
memset(v8, 0, 0x180u);
cocos2d::CCNode::CCNode((cocos2d::CCNode *)v8);
v9 = (cocos2d::CCPoint *)(v8 + 66);
*v8 = (int)&off_C87A60;
do
{
cocos2d::CCPoint::CCPoint(v9);
v9 = (cocos2d::CCPoint *)((char *)v9 + 8);
}
while ( v9 != (cocos2d::CCPoint *)(v8 + 74) );
do
{
cocos2d::CCPoint::CCPoint(v9);
v9 = (cocos2d::CCPoint *)((char *)v9 + 8);
}
while ( v9 != (cocos2d::CCPoint *)(v8 + 82) );
do
{
cocos2d::CCPoint::CCPoint(v9);
v9 = (cocos2d::CCPoint *)((char *)v9 + 8);
}
while ( v9 != (cocos2d::CCPoint *)(v8 + 90) );
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v8 + 94));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, a1);
if ( OBB2D::init((cocos2d::CCNode *)v8, (const cocos2d::CCPoint *)v13, a2, a3, a4) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v8);
}
else
{
v10 = *v8;
v11 = v8;
v8 = nullptr;
(*(void (__fastcall **)(int *))(v10 + 8))(v11);
}
return v8;
}