//
// cocos2d::extension::CCScale9Sprite::resizableSpriteWithCapInsets from 0x18000f6b0 to 0x18000f758 (168 bytes)
//
// 2 xrefs:
// > ??> @ 0x180032408
// > ??> @ 0x18004be88
//
// 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 12:15:39 +0000
//
// Hidden C++ exception states: #wind=1
cocos2d::CCObject *__fastcall cocos2d::extension::CCScale9Sprite::resizableSpriteWithCapInsets(
__int64 a1,
const struct cocos2d::CCRect *a2)
{
cocos2d::extension::CCScale9Sprite *v4; // rax
cocos2d::CCObject *v5; // r14
__int64 v6; // rdi
__int64 v7; // rsi
__int64 v8; // rax
__int64 v9; // rbx
__int64 v10; // rax
_BYTE v12[16]; // [rsp+20h] [rbp-38h] BYREF
_BYTE v13[40]; // [rsp+30h] [rbp-28h] BYREF
cocos2d::extension::CCScale9Sprite *v14; // [rsp+70h] [rbp+18h]
v14 = (cocos2d::extension::CCScale9Sprite *)sub_18001F040(0x210u);
v4 = cocos2d::extension::CCScale9Sprite::CCScale9Sprite(v14);
v5 = v4;
if ( v4 )
{
v6 = *(_QWORD *)v4;
v7 = *(_QWORD *)(a1 + 440);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v12, a2);
v9 = v8;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v13, (const struct cocos2d::CCRect *)(a1 + 396));
if ( (*(unsigned __int8 (__fastcall **)(cocos2d::CCObject *, __int64, __int64, __int64))(v6 + 984))(v5, v7, v10, v9) )
{
cocos2d::CCObject::autorelease(v5);
return v5;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v5 + 8LL))(v5, 1);
}
return nullptr;
}