//
// GameToolbox::addRThumbScrollButton from 0x14006f100 to 0x14006f2ac (428 bytes)
//
// 3 xrefs:
// > AchievementsLayer::customSetup @ 0x140097957
// > LevelBrowserLayer::init @ 0x1403e3faa
// > ??> @ 0x140911750
//
// 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 11:25:49 +0000
//
__int64 __fastcall GameToolbox::addRThumbScrollButton(__int64 a1)
{
__int64 v2; // rax
struct cocos2d::CCSprite *v3; // r14
__int64 v4; // rbx
float v5; // xmm6_4
cocos2d::CCDirector *v6; // rax
float v7; // xmm0_4
__int64 v8; // rax
struct cocos2d::CCSprite *v9; // rdi
__int64 v10; // rax
__int64 v11; // rbx
__int64 v12; // rax
struct cocos2d::CCSprite *v13; // rdi
__int64 v14; // rax
__int64 v15; // rbx
__int64 v16; // rax
char v18; // [rsp+50h] [rbp+8h] BYREF
float v19; // [rsp+54h] [rbp+Ch]
char v20; // [rsp+58h] [rbp+10h] BYREF
char v21; // [rsp+60h] [rbp+18h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v2, &v18);
v3 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_RThumb_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v3);
v4 = *(_QWORD *)v3;
v5 = (float)(v19 * 0.5) + 80.0;
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector();
v7 = cocos2d::CCDirector::getScreenRight(v6) - 24.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, v7, v5);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v4 + 184))(v3, v8);
v9 = cocos2d::CCSprite::createWithSpriteFrameName("edit_upBtn_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v9);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, 0.0, 22.0);
v11 = v10;
v12 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v3 + 200LL))(v3);
cocos2d::CCPoint::operator+(v12, &v20, v11);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, char *))(*(_QWORD *)v9 + 184LL))(v9, &v20);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v9 + 160LL))(v9);
v13 = cocos2d::CCSprite::createWithSpriteFrameName("edit_downBtn_001.png");
(*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, 0.0, -22.0);
v15 = v14;
v16 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v3 + 200LL))(v3);
cocos2d::CCPoint::operator+(v16, &v20, v15);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, char *))(*(_QWORD *)v13 + 184LL))(v13, &v20);
return (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v13 + 160LL))(v13);
}