{"type": "func", "start": 5127860, "end": 5128076, "name": "CustomSongWidget::deleteSong", "pseudocode": "// \n// CustomSongWidget::deleteSong from 0x4e3eb4 to 0x4e3f8c (216 bytes)\n// \n// 1 xrefs:\n// > CustomSongWidget::FLAlert_Clicked @ 0x4e5cd2\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:51:03 +0000\n// \n\nFMODAudioEngine *__fastcall CustomSongWidget::deleteSong(FMODAudioEngine *this)\n{\n  FMODAudioEngine *v1; // r4\n  MusicDownloadManager *v2; // r7\n  int v3; // r0\n  int v4; // r3\n  _BOOL4 isMusicPlaying; // r7\n  char **v6; // r0\n  FMODAudioEngine *v7; // r0\n  MusicDownloadManager *v8; // r0\n  int *v9; // r0\n  int v10; // r3\n  float v11; // r1\n  float v12; // r2\n  char v13; // [sp+4h] [bp-18h] BYREF\n  char v14[15]; // [sp+5h] [bp-17h] BYREF\n\n  v1 = this;\n  if ( *((_DWORD *)this + 68) )\n  {\n    v2 = (MusicDownloadManager *)FMODAudioEngine::sharedEngine(this);\n    v3 = MusicDownloadManager::sharedState(v2);\n    MusicDownloadManager::pathForSong((MusicDownloadManager *)&v14[3], v3);\n    isMusicPlaying = FMODAudioEngine::isMusicPlaying(v2, (unsigned __int8 *)&v14[3], 0, v4);\n    v6 = (char **)std::string::~string((int)&v14[3]);\n    if ( isMusicPlaying )\n    {\n      v7 = (FMODAudioEngine *)FMODAudioEngine::sharedEngine((FMODAudioEngine *)v6);\n      v6 = FMODAudioEngine::stopAllMusic(v7, 1);\n    }\n    v8 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)v6);\n    MusicDownloadManager::deleteSong(v8, *(_DWORD *)(*((_DWORD *)v1 + 68) + 264));\n    CustomSongWidget::updateSongInfo(v1);\n    v9 = *((int **)v1 + 73);\n    v10 = *v9;\n    v13 = -1;\n    strcpy(v14, \"d\");\n    (*(void (__fastcall **)(int *, char *))(v10 + 536))(v9, &v13);\n    (*(void (__fastcall **)(_DWORD, const char *))(**((_DWORD **)v1 + 73) + 464))(*((_DWORD *)v1 + 73), \"Song Deleted\");\n    if ( *((_BYTE *)v1 + 357) )\n    {\n      v11 = 140.0;\n      v12 = 0.35;\n    }\n    else\n    {\n      v11 = 230.0;\n      v12 = 0.4;\n    }\n    cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)v1 + 73), v11, v12, 0.0);\n    return (FMODAudioEngine *)CustomSongWidget::showError((cocos2d::CCNode **)v1, 1);\n  }\n  return this;\n}", "assembly": "; \n; CustomSongWidget::deleteSong from 0x4e3eb4 to 0x4e3f8c (216 bytes)\n; \n; 1 xrefs:\n; > CustomSongWidget::FLAlert_Clicked @ 0x4e5cd2\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:51:03 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x4E3EBC)                ; +0x0, 0x4e3eb4\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x4e3eb6\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x4e3eb8\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x4e3eba\nSUB             SP, SP, #0x1C                                          ; +0x8, 0x4e3ebc\nMOV             R4, R0                                                 ; +0xa, 0x4e3ebe\nLDR             R2, [R3]                                               ; +0xc, 0x4e3ec0\nMOV             R6, R3                                                 ; +0xe, 0x4e3ec2\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x10, 0x4e3ec4\nLDR.W           R2, [R0,#0x110]                                        ; +0x12, 0x4e3ec6\nCMP             R2, #0                                                 ; +0x16, 0x4e3eca\nBEQ             loc_4E3F7C                                             ; +0x18, 0x4e3ecc\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x1a, 0x4e3ece\nADD             R5, SP, #0x1C+var_17+3                                 ; +0x1e, 0x4e3ed2\nMOV             R7, R0                                                 ; +0x20, 0x4e3ed4\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x22, 0x4e3ed6\nLDR.W           R3, [R4,#0x110]                                        ; +0x26, 0x4e3eda\nLDR.W           R2, [R3,#0x108]                                        ; +0x2a, 0x4e3ede\nMOV             R1, R0; int                                            ; +0x2e, 0x4e3ee2\nMOV             R0, R5; this                                           ; +0x30, 0x4e3ee4\nBL              _ZN20MusicDownloadManager11pathForSongEi; MusicDownloadManager::pathForSong(int) ; +0x32, 0x4e3ee6\nMOV             R0, R7; int                                            ; +0x36, 0x4e3eea\nMOV             R1, R5                                                 ; +0x38, 0x4e3eec\nMOVS            R2, #0                                                 ; +0x3a, 0x4e3eee\nBL              _ZN15FMODAudioEngine14isMusicPlayingENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEi; FMODAudioEngine::isMusicPlaying(std::string,int) ; +0x3c, 0x4e3ef0\nMOV             R7, R0                                                 ; +0x40, 0x4e3ef4\nMOV             R0, R5                                                 ; +0x42, 0x4e3ef6\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x44, 0x4e3ef8\nCBZ             R7, loc_4E3F08                                         ; +0x48, 0x4e3efc\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x4a, 0x4e3efe\nMOVS            R1, #1; bool                                           ; +0x4e, 0x4e3f02\nBL              _ZN15FMODAudioEngine12stopAllMusicEb; FMODAudioEngine::stopAllMusic(bool) ; +0x50, 0x4e3f04\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x54, 0x4e3f08\nLDR.W           R3, [R4,#0x110]                                        ; +0x58, 0x4e3f0c\nLDR.W           R1, [R3,#0x108]; int                                   ; +0x5c, 0x4e3f10\nBL              _ZN20MusicDownloadManager10deleteSongEi; MusicDownloadManager::deleteSong(int) ; +0x60, 0x4e3f14\nMOV             R0, R4; this                                           ; +0x64, 0x4e3f18\nBL              _ZN16CustomSongWidget14updateSongInfoEv; CustomSongWidget::updateSongInfo(void) ; +0x66, 0x4e3f1a\nLDR.W           R0, [R4,#0x124]                                        ; +0x6a, 0x4e3f1e\nMOVS            R2, #0xFF                                              ; +0x6e, 0x4e3f22\nADD             R1, SP, #0x1C+var_18                                   ; +0x70, 0x4e3f24\nLDR             R3, [R0]                                               ; +0x72, 0x4e3f26\nSTRB.W          R2, [SP,#0x1C+var_18]                                  ; +0x74, 0x4e3f28\nMOVS            R2, #0x64 ; 'd'                                        ; +0x78, 0x4e3f2c\nSTRB.W          R2, [SP,#0x1C+var_17]                                  ; +0x7a, 0x4e3f2e\nMOVS            R2, #0                                                 ; +0x7e, 0x4e3f32\nLDR.W           R3, [R3,#0x218]                                        ; +0x80, 0x4e3f34\nSTRB.W          R2, [SP,#0x1C+var_17+1]                                ; +0x84, 0x4e3f38\nBLX             R3                                                     ; +0x88, 0x4e3f3c\nLDR.W           R0, [R4,#0x124]                                        ; +0x8a, 0x4e3f3e\nLDR             R1, =(aSongDeleted - 0x4E3F4A); \"Song Deleted\"         ; +0x8e, 0x4e3f42\nLDR             R3, [R0]                                               ; +0x90, 0x4e3f44\nADD             R1, PC; \"Song Deleted\"                                 ; +0x92, 0x4e3f46\nLDR.W           R3, [R3,#0x1D0]                                        ; +0x94, 0x4e3f48\nBLX             R3                                                     ; +0x98, 0x4e3f4c\nLDRB.W          R3, [R4,#0x165]                                        ; +0x9a, 0x4e3f4e\nLDR.W           R0, [R4,#0x124]; this                                  ; +0x9e, 0x4e3f52\nCBZ             R3, loc_4E3F5E                                         ; +0xa2, 0x4e3f56\nLDR             R1, =0x430C0000                                        ; +0xa4, 0x4e3f58\nLDR             R2, =0x3EB33333                                        ; +0xa6, 0x4e3f5a\nB               loc_4E3F62                                             ; +0xa8, 0x4e3f5c\nLDR             R1, flt_4E3F94; float                                  ; +0xaa, 0x4e3f5e\nLDR             R2, flt_4E3F98; float                                  ; +0xac, 0x4e3f60\nMOVS            R3, #0; float                                          ; +0xae, 0x4e3f62\nBL              _ZN7cocos2d13CCLabelBMFont15limitLabelWidthEfff; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0xb0, 0x4e3f64\nMOV             R0, R4; this                                           ; +0xb4, 0x4e3f68\nMOVS            R1, #1; bool                                           ; +0xb6, 0x4e3f6a\nBL              _ZN16CustomSongWidget9showErrorEb; CustomSongWidget::showError(bool) ; +0xb8, 0x4e3f6c\nB               loc_4E3F7C                                             ; +0xbc, 0x4e3f70\nMOV             R0, R5                                                 ; +0xbe, 0x4e3f72\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xc0, 0x4e3f74\nBL              __cxa_end_cleanup                                      ; +0xc4, 0x4e3f78\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xc8, 0x4e3f7c\nLDR             R3, [R6]                                               ; +0xca, 0x4e3f7e\nCMP             R2, R3                                                 ; +0xcc, 0x4e3f80\nBEQ             loc_4E3F88                                             ; +0xce, 0x4e3f82\nBLX             __stack_chk_fail                                       ; +0xd0, 0x4e3f84\nADD             SP, SP, #0x1C                                          ; +0xd4, 0x4e3f88\nPOP             {R4-R7,PC}                                             ; +0xd6, 0x4e3f8a", "xrefs": ["CustomSongWidget::FLAlert_Clicked @ 0x4e5cd2"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}