//
// GameToolbox::addRThumbScrollButton from 0x3cd6b8 to 0x3cd7da (290 bytes)
//
// 2 xrefs:
// > AchievementsLayer::customSetup @ 0x422674
// > LevelBrowserLayer::init @ 0x4a7ea6
//
// 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:46:38 +0000
//
int __fastcall GameToolbox::addRThumbScrollButton(GameToolbox *this, cocos2d::CCLayer *a2)
{
const char *v3; // r1
int v4; // r5
cocos2d::CCDirector *v5; // r0
void (__fastcall *v6)(int, _BYTE *); // r7
cocos2d::CCDirector *v7; // r0
float v8; // r0
const char *v9; // r1
int v10; // r7
void (__fastcall *v11)(int, _BYTE *); // r10
int v12; // r11
const char *v13; // r1
int v14; // r7
void (__fastcall *v15)(int, _BYTE *); // r6
int v16; // r5
_BYTE v18[4]; // [sp+4h] [bp-20h] BYREF
float v19; // [sp+8h] [bp-1Ch]
_BYTE v20[8]; // [sp+Ch] [bp-18h] BYREF
_BYTE v21[8]; // [sp+14h] [bp-10h] BYREF
cocos2d::CCDirector::sharedDirector(this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v18);
v4 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_RThumb_001.png", v3);
v5 = (cocos2d::CCDirector *)(*(int (__fastcall **)(GameToolbox *, int))(*(_DWORD *)this + 228))(this, v4);
v6 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v4 + 92);
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);
v8 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v7));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, v8 - 24.0, (float)(v19 * 0.5) + 80.0);
v6(v4, v21);
v10 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_upBtn_001.png", v9);
(*(void (__fastcall **)(GameToolbox *, int))(*(_DWORD *)this + 228))(this, v10);
v11 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v10 + 92);
v12 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 96))(v4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, 0.0, 22.0);
cocos2d::CCPoint::operator+(v21, v12, v20);
v11(v10, v21);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 80))(v10, 1060320051);
v14 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_downBtn_001.png", v13);
(*(void (__fastcall **)(GameToolbox *, int))(*(_DWORD *)this + 228))(this, v14);
v15 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v14 + 92);
v16 = (*(int (__fastcall **)(int))(*(_DWORD *)v4 + 96))(v4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, 0.0, -22.0);
cocos2d::CCPoint::operator+(v21, v16, v20);
v15(v14, v21);
return (*(int (__fastcall **)(int, int))(*(_DWORD *)v14 + 80))(v14, 1060320051);
}