//
// cocos2d::extension::CCControlSlider::initWithSprites from 0x100389810 to 0x100389ace (702 bytes)
//
// 3 xrefs:
// > cocos2d::extension::CCControlSlider::create_1 @ 0x1003896e7
// > cocos2d::extension::CCControlSlider::create @ 0x1003897d9
// > ??> @ 0x100b2d160
//
// 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:29:11 +0000
//
__int64 __fastcall cocos2d::extension::CCControlSlider::initWithSprites(__int64 a1, _DWORD *a2, __int64 a3, _DWORD *a4)
{
__int64 result; // rax
unsigned int v8; // r13d
_DWORD *v9; // rdi
__int64 v10; // rdi
_DWORD *v11; // rdi
__int64 v12; // r14
__int64 v13; // r14
__int64 v14; // rax
__int64 v15; // r14
__int64 v16; // r14
__int64 v17; // rax
__int64 v18; // r14
__int64 v19; // rax
_BYTE v20[16]; // [rsp+4h] [rbp-5Ch] BYREF
_BYTE v21[8]; // [rsp+14h] [rbp-4Ch] BYREF
float v22; // [rsp+1Ch] [rbp-44h]
float v23; // [rsp+20h] [rbp-40h]
float v24[4]; // [rsp+24h] [rbp-3Ch] BYREF
float v25; // [rsp+34h] [rbp-2Ch]
result = cocos2d::extension::CCControl::init((_DWORD *)a1);
if ( (_BYTE)result )
{
v8 = result;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 440LL))(a1, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1000LL))(a1, 1);
v9 = *(_DWORD **)(a1 + 512);
if ( v9 != a2 )
{
if ( a2 )
{
cocos2d::CCObject::retain(a2);
v9 = *(_DWORD **)(a1 + 512);
}
if ( v9 )
cocos2d::CCObject::release(v9);
*(_QWORD *)(a1 + 512) = a2;
}
v10 = *(_QWORD *)(a1 + 504);
if ( v10 != a3 )
{
if ( a3 )
{
cocos2d::CCObject::retain(a3);
v10 = *(_QWORD *)(a1 + 504);
}
if ( v10 )
cocos2d::CCObject::release(v10);
*(_QWORD *)(a1 + 504) = a3;
}
v11 = *(_DWORD **)(a1 + 496);
if ( v11 != a4 )
{
if ( a4 )
{
cocos2d::CCObject::retain(a4);
v11 = *(_DWORD **)(a1 + 496);
}
if ( v11 )
cocos2d::CCObject::release(v11);
*(_QWORD *)(a1 + 496) = a4;
}
cocos2d::CCNode::boundingBox((__int64)v24, a2);
cocos2d::CCNode::boundingBox((__int64)v20, a4);
cocos2d::extension::CCControlUtils::CCRectUnion(v21, v24, v20);
sub_100278260(v24, v22, v23);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a1 + 320LL))(a1, v24);
v12 = *(_QWORD *)(a1 + 512);
sub_100278250(v24, 0.5, 0.5);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v12 + 296LL))(v12, v24);
v13 = *(_QWORD *)(a1 + 512);
v25 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1) * 0.5;
v14 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1);
sub_100278250(v24, v25, *(float *)(v14 + 4) * 0.5);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v13 + 184LL))(v13, v24);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 512));
v15 = *(_QWORD *)(a1 + 504);
sub_100278250(v24, 0.0, 0.5);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v15 + 296LL))(v15, v24);
v16 = *(_QWORD *)(a1 + 504);
v17 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1);
sub_100278250(v24, 0.0, *(float *)(v17 + 4) * 0.5);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v16 + 184LL))(v16, v24);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 504));
v18 = *(_QWORD *)(a1 + 496);
v19 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1);
sub_100278250(v24, 0.0, 0.5 * *(float *)(v19 + 4));
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v18 + 184LL))(v18, v24);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 456LL))(a1, *(_QWORD *)(a1 + 496));
*(_QWORD *)(a1 + 476) = 0x3F80000000000000LL;
(*(void (__fastcall **)(__int64, double))(*(_QWORD *)a1 + 1360LL))(a1, 0.0);
return v8;
}
return result;
}