//
// sub_1403CAF50 from 0x1403caf50 to 0x1403cb059 (265 bytes)
//
// 3 xrefs:
// > sub_1403CBFD0 @ 0x1403cbfd7
// > ??> @ 0x1405cce78
// > ??> @ 0x1406d7b20
//
// 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
//
// Hidden C++ exception states: #wind=1
cocos2d::CCLayerColor *__fastcall sub_1403CAF50(cocos2d::CCLayerColor *Block, char a2)
{
char *p_m_fScaleX; // rdi
__int64 v5; // rax
void *v6; // rax
Block->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCLayerColor_vtbl *)&RetryLevelLayer::`vftable';
Block->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&RetryLevelLayer::`vftable';
Block->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&RetryLevelLayer::`vftable';
Block->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&RetryLevelLayer::`vftable';
Block->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&RetryLevelLayer::`vftable';
Block->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&RetryLevelLayer::`vftable';
Block->cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&RetryLevelLayer::`vftable';
Block->cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&RetryLevelLayer::`vftable';
p_m_fScaleX = (char *)&Block[1].m_fScaleX;
*(_QWORD *)&Block[1].m_fScaleX = &RetryLevelLayer::`vftable';
v5 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v6 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v5 = qword_1406C2ED8;
}
if ( *(char **)(v5 + 1192) == p_m_fScaleX )
*(_QWORD *)(v5 + 1192) = 0;
GJDropDownLayer::dGJDropDownLayer(Block);
if ( (a2 & 1) != 0 )
j_j_free(Block);
return Block;
}