{"type": "func", "start": 5372090240, "end": 5372090967, "name": "MusicBrowser::setupSongControls", "pseudocode": "// \n// MusicBrowser::setupSongControls from 0x140339780 to 0x140339a57 (727 bytes)\n// \n// 2 xrefs:\n// > MusicBrowser::init @ 0x1403393f9\n// > <???> @ 0x1406d5324\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid MusicBrowser::setupSongControls(MusicBrowser *a1)\n{\n  float v1; // xmm0_4\n  cocos2d::CCDirector *v3; // rax\n  const char *v4; // r8\n  Slider *v5; // rax\n  SliderDelegate *v6; // rcx\n  float v7; // xmm0_4\n  cocos2d::CCLabelBMFont *v8; // rax\n  cocos2d::CCLayer *m_mainLayer; // rcx\n  __int64 v10; // rdx\n  float v11; // xmm0_4\n  cocos2d::CCLabelBMFont_vtbl *v12; // rbx\n  __int64 v13; // rax\n  float v14; // xmm0_4\n  struct cocos2d::CCSprite *v15; // rbx\n  CCMenuItemSpriteExtra *v16; // rax\n  cocos2d::CCMenu *m_buttonMenu; // rcx\n  float v18; // xmm0_4\n  CCMenuItemSpriteExtra_vtbl *v19; // rbx\n  struct cocos2d::CCPoint v20; // rax\n  struct cocos2d::CCPoint v21; // [rsp+40h] [rbp-28h] BYREF\n  char v22; // [rsp+70h] [rbp+8h] BYREF\n  float v23; // [rsp+78h] [rbp+10h]\n  char v24; // [rsp+80h] [rbp+18h] BYREF\n\n  v3 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(v3);\n  cocos2d::CCPoint::CCPoint(v1, (float)(v23 * 0.5) - 50.0);\n  v5 = Slider::create(\n         a1,\n         (cocos2d::SEL_MenuHandler *)GJScaleControl::sliderChanged,\n         v4,\n         \"slidergroove.png\",\n         \"sliderthumb.png\",\n         \"sliderthumbsel.png\",\n         0.69999999);\n  a1->m_playSlider = v5;\n  v6 = &a1->SliderDelegate;\n  if ( !a1 )\n    v6 = nullptr;\n  v5->m_delegate = v6;\n  v7 = ((float (__fastcall *)(cocos2d::CCLayer *, Slider *, __int64))a1->m_mainLayer->addChild_0)(\n         a1->m_mainLayer,\n         a1->m_playSlider,\n         20);\n  cocos2d::CCPoint::CCPoint(v7, 0.0);\n  cocos2d::CCPoint::operator+(&v22, &v24);\n  a1->m_playSlider->setPosition_0(a1->m_playSlider, (const cocos2d::CCPoint *)&v24);\n  v8 = cocos2d::CCLabelBMFont::create(\"0/0\", \"chatFont.fnt\");\n  m_mainLayer = a1->m_mainLayer;\n  a1->m_playLabel = v8;\n  m_mainLayer->addChild_0(m_mainLayer, v8, 20);\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_playLabel->setScale_0)(a1->m_playLabel);\n  a1->m_playLabel->setColor(&a1->m_playLabel->cocos2d::CCRGBAProtocol, &stru_140529B84);\n  LOBYTE(v10) = -106;\n  v11 = ((float (__fastcall *)(cocos2d::CCRGBAProtocol *, __int64))a1->m_playLabel->setOpacity)(\n          &a1->m_playLabel->cocos2d::CCRGBAProtocol,\n          v10);\n  v12 = a1->m_playLabel->__vftable;\n  cocos2d::CCPoint::CCPoint(v11, 0.0);\n  v14 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v12->setAnchorPoint)(a1->m_playLabel, v13);\n  cocos2d::CCPoint::CCPoint(v14, 80.0);\n  cocos2d::CCPoint::operator+(&v22, &v24);\n  a1->m_playLabel->setPosition_0(a1->m_playLabel, (const cocos2d::CCPoint *)&v24);\n  v15 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_stopMusicBtn_001.png\");\n  ((void (__fastcall *)(struct cocos2d::CCSprite *))v15->setScale_0)(v15);\n  v16 = CCMenuItemSpriteExtra::create(v15, nullptr, a1, (cocos2d::SEL_MenuHandler *)MusicBrowser::onPlaybackControl);\n  m_buttonMenu = a1->m_buttonMenu;\n  a1->m_playButton = v16;\n  v18 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))m_buttonMenu->addChild_1)(m_buttonMenu, v16);\n  cocos2d::CCPoint::CCPoint(v18, -100.0);\n  cocos2d::CCPoint::operator+(&v22, &v24);\n  v19 = a1->m_playButton->__vftable;\n  v20 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v21);\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v19->setPosition_0)(a1->m_playButton, v20);\n  a1->m_playButton->setTag(a1->m_playButton, 0);\n}", "assembly": "; \n; MusicBrowser::setupSongControls from 0x140339780 to 0x140339a57 (727 bytes)\n; \n; 2 xrefs:\n; > MusicBrowser::init @ 0x1403393f9\n; > <???> @ 0x1406d5324\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbx                                                            ; +0x0, 0x140339780\npush    rdi                                                            ; +0x2, 0x140339782\nsub     rsp, 58h                                                       ; +0x3, 0x140339783\nmov     rdi, rcx                                                       ; +0x7, 0x140339787\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xa, 0x14033978a\nmov     rcx, rax                                                       ; +0x10, 0x140339790\nlea     rdx, [rsp+68h+arg_8]                                           ; +0x13, 0x140339793\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x18, 0x140339798\nmovss   xmm2, [rsp+68h+arg_C]                                          ; +0x1e, 0x14033979e\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x24, 0x1403397a4\nmulss   xmm2, cs:dword_140622B08                                       ; +0x29, 0x1403397a9\nmovss   xmm1, [rsp+68h+arg_8]                                          ; +0x31, 0x1403397b1\nmulss   xmm1, cs:dword_140622B08                                       ; +0x37, 0x1403397b7\naddss   xmm2, cs:dword_140623348                                       ; +0x3f, 0x1403397bf\nsubss   xmm1, cs:dword_1406231E0                                       ; +0x47, 0x1403397c7\nsubss   xmm2, cs:dword_140623140                                       ; +0x4f, 0x1403397cf\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x57, 0x1403397d7\nmovss   xmm0, cs:dword_140622B74                                       ; +0x5d, 0x1403397dd\nlea     rax, aSliderthumbsel; \"sliderthumbsel.png\"                     ; +0x65, 0x1403397e5\nmovss   [rsp+68h+var_38], xmm0                                         ; +0x6c, 0x1403397ec\nlea     r9, aSlidergroovePn; \"slidergroove.png\"                        ; +0x72, 0x1403397f2\nmov     [rsp+68h+var_40], rax                                          ; +0x79, 0x1403397f9\nlea     rdx, GJScaleControl__sliderChanged; Merged with: GJScaleControl::sliderChanged, MusicBrowser::sliderChanged ; +0x7e, 0x1403397fe\nlea     rax, aSliderthumbPng; \"sliderthumb.png\"                        ; +0x85, 0x140339805\nmov     rcx, rdi                                                       ; +0x8c, 0x14033980c\nmov     [rsp+68h+var_48], rax                                          ; +0x8f, 0x14033980f\ncall    Slider__create                                                 ; +0x94, 0x140339814\nxor     edx, edx                                                       ; +0x99, 0x140339819\nmov     [rdi+318h], rax                                                ; +0x9b, 0x14033981b\ntest    rdi, rdi                                                       ; +0xa2, 0x140339822\nlea     rcx, [rdi+298h]                                                ; +0xa5, 0x140339825\ncmovz   rcx, rdx                                                       ; +0xac, 0x14033982c\nmov     [rax+1B8h], rcx                                                ; +0xb0, 0x140339830\nlea     r8d, [rdx+14h]                                                 ; +0xb7, 0x140339837\nmov     rcx, [rdi+240h]                                                ; +0xbb, 0x14033983b\nmov     rdx, [rdi+318h]                                                ; +0xc2, 0x140339842\nmov     rax, [rcx]                                                     ; +0xc9, 0x140339849\ncall    qword ptr [rax+1B8h]                                           ; +0xcc, 0x14033984c\nxorps   xmm2, xmm2                                                     ; +0xd2, 0x140339852\nlea     rcx, [rsp+68h+arg_18]                                          ; +0xd5, 0x140339855\nxorps   xmm1, xmm1                                                     ; +0xdd, 0x14033985d\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xe0, 0x140339860\nmov     r8, rax                                                        ; +0xe6, 0x140339866\nlea     rdx, [rsp+68h+arg_10]                                          ; +0xe9, 0x140339869\nlea     rcx, [rsp+68h+arg_0]                                           ; +0xf1, 0x140339871\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0xf6, 0x140339876\nmov     rcx, [rdi+318h]                                                ; +0xfc, 0x14033987c\nlea     rdx, [rsp+68h+arg_10]                                          ; +0x103, 0x140339883\nmov     rax, [rcx]                                                     ; +0x10b, 0x14033988b\ncall    qword ptr [rax+0B8h]                                           ; +0x10e, 0x14033988e\nlea     rdx, aChatfontFnt; \"chatFont.fnt\"                              ; +0x114, 0x140339894\nlea     rcx, a00_1; \"0/0\"                                              ; +0x11b, 0x14033989b\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x122, 0x1403398a2\nmov     rcx, [rdi+240h]                                                ; +0x128, 0x1403398a8\nmov     r8d, 14h                                                       ; +0x12f, 0x1403398af\nmov     [rdi+320h], rax                                                ; +0x135, 0x1403398b5\nmov     rdx, rax                                                       ; +0x13c, 0x1403398bc\nmov     r9, [rcx]                                                      ; +0x13f, 0x1403398bf\ncall    qword ptr [r9+1B8h]                                            ; +0x142, 0x1403398c2\nmov     rcx, [rdi+320h]                                                ; +0x149, 0x1403398c9\nmovss   xmm1, cs:dword_140622B38                                       ; +0x150, 0x1403398d0\nmov     rax, [rcx]                                                     ; +0x158, 0x1403398d8\ncall    qword ptr [rax+0A0h]                                           ; +0x15b, 0x1403398db\nmov     rcx, [rdi+320h]                                                ; +0x161, 0x1403398e1\nlea     rdx, stru_140529B84                                            ; +0x168, 0x1403398e8\nadd     rcx, 170h                                                      ; +0x16f, 0x1403398ef\nmov     rax, [rcx]                                                     ; +0x176, 0x1403398f6\ncall    qword ptr [rax]                                                ; +0x179, 0x1403398f9\nmov     rcx, [rdi+320h]                                                ; +0x17b, 0x1403398fb\nmov     dl, 96h                                                        ; +0x182, 0x140339902\nadd     rcx, 170h                                                      ; +0x184, 0x140339904\nmov     rax, [rcx]                                                     ; +0x18b, 0x14033990b\ncall    qword ptr [rax+28h]                                            ; +0x18e, 0x14033990e\nmov     rax, [rdi+320h]                                                ; +0x191, 0x140339911\nlea     rcx, [rsp+68h+arg_10]                                          ; +0x198, 0x140339918\nmovss   xmm2, cs:dword_140622B08                                       ; +0x1a0, 0x140339920\nxorps   xmm1, xmm1                                                     ; +0x1a8, 0x140339928\nmov     rbx, [rax]                                                     ; +0x1ab, 0x14033992b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1ae, 0x14033992e\nmov     rcx, [rdi+320h]                                                ; +0x1b4, 0x140339934\nmov     rdx, rax                                                       ; +0x1bb, 0x14033993b\ncall    qword ptr [rbx+110h]                                           ; +0x1be, 0x14033993e\nmovss   xmm1, cs:dword_14062326C                                       ; +0x1c4, 0x140339944\nxorps   xmm2, xmm2                                                     ; +0x1cc, 0x14033994c\nlea     rcx, [rsp+68h+arg_18]                                          ; +0x1cf, 0x14033994f\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1d7, 0x140339957\nmov     r8, rax                                                        ; +0x1dd, 0x14033995d\nlea     rdx, [rsp+68h+arg_10]                                          ; +0x1e0, 0x140339960\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x1e8, 0x140339968\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x1ed, 0x14033996d\nmov     rcx, [rdi+320h]                                                ; +0x1f3, 0x140339973\nlea     rdx, [rsp+68h+arg_10]                                          ; +0x1fa, 0x14033997a\nmov     rax, [rcx]                                                     ; +0x202, 0x140339982\ncall    qword ptr [rax+0B8h]                                           ; +0x205, 0x140339985\nlea     rcx, aGjStopmusicbtn; \"GJ_stopMusicBtn_001.png\"                ; +0x20b, 0x14033998b\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x212, 0x140339992\nmovss   xmm1, cs:dword_140622B38                                       ; +0x218, 0x140339998\nmov     rcx, rax                                                       ; +0x220, 0x1403399a0\nmov     rbx, rax                                                       ; +0x223, 0x1403399a3\nmov     rdx, [rax]                                                     ; +0x226, 0x1403399a6\ncall    qword ptr [rdx+0A0h]                                           ; +0x229, 0x1403399a9\nlea     r9, MusicBrowser__onPlaybackControl                            ; +0x22f, 0x1403399af\nmov     r8, rdi                                                        ; +0x236, 0x1403399b6\nxor     edx, edx                                                       ; +0x239, 0x1403399b9\nmov     rcx, rbx                                                       ; +0x23b, 0x1403399bb\ncall    CCMenuItemSpriteExtra__create                                  ; +0x23e, 0x1403399be\nmov     rcx, [rdi+220h]                                                ; +0x243, 0x1403399c3\nmov     rdx, rax                                                       ; +0x24a, 0x1403399ca\nmov     [rdi+328h], rax                                                ; +0x24d, 0x1403399cd\nmov     r8, [rcx]                                                      ; +0x254, 0x1403399d4\ncall    qword ptr [r8+1C0h]                                            ; +0x257, 0x1403399d7\nmovss   xmm1, cs:dword_1406239E8                                       ; +0x25e, 0x1403399de\nlea     rcx, [rsp+68h+arg_18]                                          ; +0x266, 0x1403399e6\nxorps   xmm2, xmm2                                                     ; +0x26e, 0x1403399ee\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x271, 0x1403399f1\nmov     r8, rax                                                        ; +0x277, 0x1403399f7\nlea     rdx, [rsp+68h+arg_10]                                          ; +0x27a, 0x1403399fa\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x282, 0x140339a02\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x287, 0x140339a07\nmov     rax, [rdi+328h]                                                ; +0x28d, 0x140339a0d\nlea     r8, [rsp+68h+arg_10]                                           ; +0x294, 0x140339a14\nmov     rcx, [rdi+220h]                                                ; +0x29c, 0x140339a1c\nlea     rdx, [rsp+68h+var_28]                                          ; +0x2a3, 0x140339a23\nmov     rbx, [rax]                                                     ; +0x2a8, 0x140339a28\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x2ab, 0x140339a2b\nmov     rcx, [rdi+328h]                                                ; +0x2b1, 0x140339a31\nmov     rdx, rax                                                       ; +0x2b8, 0x140339a38\ncall    qword ptr [rbx+0B8h]                                           ; +0x2bb, 0x140339a3b\nmov     rcx, [rdi+328h]                                                ; +0x2c1, 0x140339a41\nxor     edx, edx                                                       ; +0x2c8, 0x140339a48\nmov     rax, [rcx]                                                     ; +0x2ca, 0x140339a4a\ncall    qword ptr [rax+40h]                                            ; +0x2cd, 0x140339a4d\nadd     rsp, 58h                                                       ; +0x2d0, 0x140339a50\npop     rdi                                                            ; +0x2d4, 0x140339a54\npop     rbx                                                            ; +0x2d5, 0x140339a55\nretn                                                                   ; +0x2d6, 0x140339a56", "xrefs": ["MusicBrowser::init @ 0x1403393f9", "<???> @ 0x1406d5324"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}