//
// CustomizeObjectLayer::recreateLayer from 0x580ff4 to 0x58104e (90 bytes)
//
// 1 xrefs:
// > CustomizeObjectSettingsPopup::onClose @ 0x581080
//
// 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:52:53 +0000
//
int __fastcall CustomizeObjectLayer::recreateLayer(CustomizeObjectLayer **this)
{
cocos2d::CCObject *v1; // r6
CustomizeObjectLayer *v2; // r5
cocos2d::CCObject *v3; // r4
int v4; // r0
cocos2d::CCTouchDispatcher *v5; // r0
cocos2d::CCArray *v6; // r2
FLAlertLayer *v7; // r0
int result; // r0
v1 = (cocos2d::CCObject *)this;
v2 = *(this + 133);
v3 = *(this + 134);
if ( v2 )
this = (CustomizeObjectLayer **)cocos2d::CCObject::retain(*(this + 133));
if ( v3 )
this = (CustomizeObjectLayer **)cocos2d::CCObject::retain(v3);
v4 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
v5 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v4 + 80))(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, v1);
CustomizeObjectLayer::onClose(v1, nullptr);
v7 = CustomizeObjectLayer::create(v2, v3, v6);
result = (*(int (__fastcall **)(FLAlertLayer *))(*(_DWORD *)v7 + 656))(v7);
if ( v2 )
result = cocos2d::CCObject::release(v2);
if ( v3 )
return cocos2d::CCObject::release(v3);
return result;
}