{"type": "func", "start": 3363044, "end": 3363364, "name": "CustomSongCell::loadFromObject", "pseudocode": "// \n// CustomSongCell::loadFromObject from 0x3350e4 to 0x335224 (320 bytes)\n// \n// 2 xrefs:\n// > CustomListView::reloadAll @ 0x33a678\n// > CustomListView::loadCell @ 0x33bb58\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 CustomSongCell::loadFromObject(CustomSongCell *a1, SongInfoObject *a2)\n{\n  CustomSongWidget *v4; // r7\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9\n  cocos2d::CCSprite *v6; // r7\n  CCMenuItemSpriteExtra *v7; // r7\n  cocos2d::CCNode *v8; // r7\n  void (__fastcall *v9)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8\n  int m_songID; // r5\n  cocos2d::CCPoint v11; // [sp+1Ch] [bp-18h] BYREF\n  cocos2d::CCPoint v12; // [sp+24h] [bp-10h] BYREF\n\n  a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, 1);\n  a1->m_songInfoObject = a2;\n  v4 = CustomSongWidget::create(a2, &a1->CustomSongDelegate, (bool)&dword_0 + 1, (bool)&dword_0 + 1, 0, 0, 0, 0, 0);\n  a1->m_mainLayer->addChild_0(a1->m_mainLayer, v4, 2);\n  setPosition = v4->setPosition;\n  cocos2d::CCPoint::CCPoint(&v12, a1->m_width * 0.5, a1->m_height * 0.5);\n  setPosition(v4, &v12);\n  v4->m_isInCell = 1;\n  v6 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_trashBtn_001.png\");\n  ((void (__fastcall *)(cocos2d::CCSprite *, int))v6->setScale)(v6, 1058642330);\n  LODWORD(v12.x) = CustomSongCell::onDelete;\n  v12.y = 0.0;\n  v7 = CCMenuItemSpriteExtra::create(\n         v6,\n         nullptr,\n         (cocos2d::SEL_MenuHandler)__PAIR64__(CustomSongCell::onDelete, (unsigned int)a1));\n  CCMenuItemSpriteExtra::setSizeMult(v7, 1.5);\n  v8 = (cocos2d::CCNode *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v7, nullptr);\n  a1->m_mainLayer->addChild_0(a1->m_mainLayer, v8, 3);\n  v9 = v8->setPosition;\n  cocos2d::CCPoint::CCPoint(&v11, (float)(a1->m_width * 0.5) + 90.0, (float)(a1->m_height * 0.5) - 24.0);\n  v9(v8, &v11);\n  m_songID = a1->m_songInfoObject->m_songID;\n  a1->m_selected = m_songID == a1->getActiveSongID(a1);\n}", "assembly": "; \n; CustomSongCell::loadFromObject from 0x3350e4 to 0x335224 (320 bytes)\n; \n; 2 xrefs:\n; > CustomListView::reloadAll @ 0x33a678\n; > CustomListView::loadCell @ 0x33bb58\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.W          {R4-R9,LR}                                             ; +0x0, 0x3350e4\nMOV             R4, R0                                                 ; +0x4, 0x3350e8\nLDR             R6, =(__stack_chk_guard_ptr - 0x3350F8)                ; +0x6, 0x3350ea\nMOV             R7, R1                                                 ; +0x8, 0x3350ec\nVPUSH           {D8}                                                   ; +0xa, 0x3350ee\nMOVS            R1, #1                                                 ; +0xe, 0x3350f2\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x10, 0x3350f4\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x12, 0x3350f6\nLDR.W           R0, [R0,#0x194]                                        ; +0x14, 0x3350f8\nMOVS            R5, #0                                                 ; +0x18, 0x3350fc\nLDR             R3, [R6]                                               ; +0x1a, 0x3350fe\nVMOV.F32        S16, #0.5                                              ; +0x1c, 0x335100\nSUB             SP, SP, #0x34                                          ; +0x20, 0x335104\nADD.W           R8, SP, #0x34+var_10                                   ; +0x22, 0x335106\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x26, 0x33510a\nLDR             R3, [R0]                                               ; +0x28, 0x33510c\nLDR.W           R3, [R3,#0x11C]                                        ; +0x2a, 0x33510e\nBLX             R3                                                     ; +0x2e, 0x335112\nMOVS            R2, #(dword_0+1); CustomSongDelegate *                 ; +0x30, 0x335114\nMOV             R3, R2; bool                                           ; +0x32, 0x335116\nSTR.W           R7, [R4,#0x1A0]                                        ; +0x34, 0x335118\nSTR             R5, [SP,#0x34+var_34]; bool                            ; +0x38, 0x33511c\nMOV             R0, R7; this                                           ; +0x3a, 0x33511e\nSTR             R5, [SP,#0x34+var_30]; bool                            ; +0x3c, 0x335120\nADD.W           R1, R4, #0x19C; SongInfoObject *                       ; +0x3e, 0x335122\nSTR             R5, [SP,#0x34+var_2C]; bool                            ; +0x42, 0x335126\nSTR             R5, [SP,#0x34+var_28]; bool                            ; +0x44, 0x335128\nSTR             R5, [SP,#0x34+var_24]; bool                            ; +0x46, 0x33512a\nBL              _ZN16CustomSongWidget6createEP14SongInfoObjectP18CustomSongDelegatebbbbbbi; CustomSongWidget::create(SongInfoObject *,CustomSongDelegate *,bool,bool,bool,bool,bool,bool,int) ; +0x48, 0x33512c\nMOVS            R2, #2                                                 ; +0x4c, 0x335130\nMOV             R7, R0                                                 ; +0x4e, 0x335132\nLDR.W           R0, [R4,#0x194]                                        ; +0x50, 0x335134\nMOV             R1, R7                                                 ; +0x54, 0x335138\nLDR             R3, [R0]                                               ; +0x56, 0x33513a\nLDR.W           R3, [R3,#0xE0]                                         ; +0x58, 0x33513c\nBLX             R3                                                     ; +0x5c, 0x335140\nVLDR            S14, [R4,#0x188]                                       ; +0x5e, 0x335142\nLDR             R3, [R7]                                               ; +0x62, 0x335146\nMOV             R0, R8; this                                           ; +0x64, 0x335148\nVLDR            S15, [R4,#0x18C]                                       ; +0x66, 0x33514a\nLDR.W           R9, [R3,#0x5C]                                         ; +0x6a, 0x33514e\nVMUL.F32        S14, S14, S16                                          ; +0x6e, 0x335152\nVMUL.F32        S15, S15, S16                                          ; +0x72, 0x335156\nVMOV            R1, S14; float                                         ; +0x76, 0x33515a\nVMOV            R2, S15; float                                         ; +0x7a, 0x33515e\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x7e, 0x335162\nMOV             R1, R8                                                 ; +0x82, 0x335166\nMOV             R0, R7                                                 ; +0x84, 0x335168\nBLX             R9                                                     ; +0x86, 0x33516a\nLDR             R0, =(aGjTrashbtn001P - 0x335178); \"GJ_trashBtn_001.png\" ; +0x88, 0x33516c\nMOVS            R3, #1                                                 ; +0x8a, 0x33516e\nSTRB.W          R3, [R7,#0x16C]                                        ; +0x8c, 0x335170\nADD             R0, PC; \"GJ_trashBtn_001.png\"                          ; +0x90, 0x335174\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x92, 0x335176\nLDR             R1, =0x3F19999A                                        ; +0x96, 0x33517a\nLDR             R3, [R0]                                               ; +0x98, 0x33517c\nMOV             R7, R0                                                 ; +0x9a, 0x33517e\nLDR             R3, [R3,#0x50]                                         ; +0x9c, 0x335180\nBLX             R3                                                     ; +0x9e, 0x335182\nLDR             R3, =(_ZN14CustomSongCell8onDeleteEPN7cocos2d8CCObjectE_ptr - 0x33518E) ; +0xa0, 0x335184\nMOV             R2, R4                                                 ; +0xa2, 0x335186\nMOV             R1, R5                                                 ; +0xa4, 0x335188\nADD             R3, PC; _ZN14CustomSongCell8onDeleteEPN7cocos2d8CCObjectE_ptr ; +0xa6, 0x33518a\nLDR             R3, [R3]; CustomSongCell::onDelete(cocos2d::CCObject *) ; +0xa8, 0x33518c\nSTR             R5, [SP,#0x34+var_34]                                  ; +0xaa, 0x33518e\nMOV             R0, R7                                                 ; +0xac, 0x335190\nSTR             R3, [SP,#0x34+var_10]                                  ; +0xae, 0x335192\nSTR             R5, [SP,#0x34+var_C]                                   ; +0xb0, 0x335194\nBL              _ZN21CCMenuItemSpriteExtra6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemSpriteExtra::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0xb2, 0x335196\nMOV.W           R1, #0x3FC00000; float                                 ; +0xb6, 0x33519a\nMOV             R7, R0                                                 ; +0xba, 0x33519e\nBL              _ZN21CCMenuItemSpriteExtra11setSizeMultEf; CCMenuItemSpriteExtra::setSizeMult(float) ; +0xbc, 0x3351a0\nMOV             R1, R5; cocos2d::CCMenuItem *                          ; +0xc0, 0x3351a4\nMOV             R0, R7; this                                           ; +0xc2, 0x3351a6\nBL              _ZN7cocos2d6CCMenu6createEPNS_10CCMenuItemEz; cocos2d::CCMenu::create(cocos2d::CCMenuItem *,...) ; +0xc4, 0x3351a8\nMOVS            R2, #3                                                 ; +0xc8, 0x3351ac\nADD             R5, SP, #0x34+var_18                                   ; +0xca, 0x3351ae\nMOV             R7, R0                                                 ; +0xcc, 0x3351b0\nLDR.W           R0, [R4,#0x194]                                        ; +0xce, 0x3351b2\nMOV             R1, R7                                                 ; +0xd2, 0x3351b6\nLDR             R3, [R0]                                               ; +0xd4, 0x3351b8\nLDR.W           R3, [R3,#0xE0]                                         ; +0xd6, 0x3351ba\nBLX             R3                                                     ; +0xda, 0x3351be\nVLDR            S13, [R4,#0x188]                                       ; +0xdc, 0x3351c0\nLDR             R3, [R7]                                               ; +0xe0, 0x3351c4\nMOV             R0, R5; this                                           ; +0xe2, 0x3351c6\nVLDR            S15, =90.0                                             ; +0xe4, 0x3351c8\nLDR.W           R8, [R3,#0x5C]                                         ; +0xe8, 0x3351cc\nVLDR            S14, [R4,#0x18C]                                       ; +0xec, 0x3351d0\nVMLA.F32        S15, S13, S16                                          ; +0xf0, 0x3351d4\nVMOV            R1, S15; float                                         ; +0xf4, 0x3351d8\nVMOV.F32        S15, #24.0                                             ; +0xf8, 0x3351dc\nVNMLS.F32       S15, S14, S16                                          ; +0xfc, 0x3351e0\nVMOV            R2, S15; float                                         ; +0x100, 0x3351e4\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x104, 0x3351e8\nMOV             R1, R5                                                 ; +0x108, 0x3351ec\nMOV             R0, R7                                                 ; +0x10a, 0x3351ee\nBLX             R8                                                     ; +0x10c, 0x3351f0\nLDR.W           R3, [R4,#0x1A0]                                        ; +0x10e, 0x3351f2\nMOV             R0, R4                                                 ; +0x112, 0x3351f6\nLDR.W           R5, [R3,#0x108]                                        ; +0x114, 0x3351f8\nLDR             R3, [R4]                                               ; +0x118, 0x3351fc\nLDR.W           R3, [R3,#0x23C]                                        ; +0x11a, 0x3351fe\nBLX             R3                                                     ; +0x11e, 0x335202\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x120, 0x335204\nSUBS            R3, R5, R0                                             ; +0x122, 0x335206\nNEGS            R0, R3                                                 ; +0x124, 0x335208\nADCS            R0, R3                                                 ; +0x126, 0x33520a\nLDR             R3, [R6]                                               ; +0x128, 0x33520c\nSTRB.W          R0, [R4,#0x1A4]                                        ; +0x12a, 0x33520e\nCMP             R2, R3                                                 ; +0x12e, 0x335212\nBEQ             loc_33521A                                             ; +0x130, 0x335214\nBLX             __stack_chk_fail                                       ; +0x132, 0x335216\nADD             SP, SP, #0x34 ; '4'                                    ; +0x136, 0x33521a\nVPOP            {D8}                                                   ; +0x138, 0x33521c\nPOP.W           {R4-R9,PC}                                             ; +0x13c, 0x335220", "xrefs": ["CustomListView::reloadAll @ 0x33a678", "CustomListView::loadCell @ 0x33bb58"], "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"}