{"type": "func", "start": 5372633248, "end": 5372633656, "name": "GJSongBrowser::FLAlert_Clicked", "pseudocode": "// \n// GJSongBrowser::FLAlert_Clicked from 0x1403be0a0 to 0x1403be238 (408 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140782cf0\n// > <???> @ 0x140923f48\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:31:27 +0000\n// \n\n// Hidden C++ exception states: #wind=3\n__int64 __fastcall GJSongBrowser::FLAlert_Clicked(__int64 a1, __int64 a2, char a3)\n{\n  __int64 result; // rax\n  __int64 v6; // rcx\n  cocos2d::CCArray *DownloadedSongs; // rdi\n  unsigned int i; // ebx\n  struct cocos2d::CCObject *v9; // rsi\n  __int64 v10; // rcx\n  const char *v11; // rcx\n  __int64 v12; // rcx\n  void *v13; // [rsp+20h] [rbp-48h]\n  void *v14; // [rsp+20h] [rbp-48h]\n  void *v15; // [rsp+20h] [rbp-48h]\n  char *FileName[4]; // [rsp+28h] [rbp-40h] BYREF\n\n  result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  if ( (_DWORD)result == 1 && a3 )\n  {\n    v6 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v13 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v13);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v6 = qword_14090C070;\n    }\n    DownloadedSongs = (cocos2d::CCArray *)MusicDownloadManager::getDownloadedSongs(v6);\n    for ( i = 0; i < cocos2d::CCArray::count(DownloadedSongs); ++i )\n    {\n      v9 = cocos2d::CCArray::objectAtIndex(DownloadedSongs, i);\n      v10 = qword_14090C070;\n      if ( !qword_14090C070 )\n      {\n        v14 = operator new(0x3D0u);\n        qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v14);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n        v10 = qword_14090C070;\n      }\n      MusicDownloadManager::pathForSong(v10, FileName, *((unsigned int *)v9 + 80));\n      v11 = (const char *)FileName;\n      if ( FileName[3] > (char *)0xF )\n        v11 = FileName[0];\n      remove(v11);\n      sub_14003D310((__int64)FileName);\n    }\n    v12 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v15 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v15);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v12 = qword_14090C070;\n    }\n    MusicDownloadManager::clearUnusedSongs(v12);\n    return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 608) + 1072LL))(a1 - 608, 0);\n  }\n  return result;\n}", "assembly": "; \n; GJSongBrowser::FLAlert_Clicked from 0x1403be0a0 to 0x1403be238 (408 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140782cf0\n; > <???> @ 0x140923f48\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:31:27 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1403be0a0\npush    rbp                                                            ; +0x5, 0x1403be0a5\npush    rsi                                                            ; +0x6, 0x1403be0a6\npush    rdi                                                            ; +0x7, 0x1403be0a7\nsub     rsp, 50h                                                       ; +0x8, 0x1403be0a8\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x1403be0ac\nxor     rax, rsp                                                       ; +0x13, 0x1403be0b3\nmov     [rsp+68h+var_20], rax                                          ; +0x16, 0x1403be0b6\nmovzx   ebx, r8b                                                       ; +0x1b, 0x1403be0bb\nmov     rbp, rcx                                                       ; +0x1f, 0x1403be0bf\nmov     rax, [rdx]                                                     ; +0x22, 0x1403be0c2\nmov     rcx, rdx                                                       ; +0x25, 0x1403be0c5\ncall    qword ptr [rax+38h]                                            ; +0x28, 0x1403be0c8\ncmp     eax, 1                                                         ; +0x2b, 0x1403be0cb\njnz     loc_1403BE21B                                                  ; +0x2e, 0x1403be0ce\ntest    bl, bl                                                         ; +0x34, 0x1403be0d4\njz      loc_1403BE21B                                                  ; +0x36, 0x1403be0d6\nmov     rcx, cs:qword_14090C070                                        ; +0x3c, 0x1403be0dc\ntest    rcx, rcx                                                       ; +0x43, 0x1403be0e3\njnz     short loc_1403BE11A                                            ; +0x46, 0x1403be0e6\nmov     ecx, 3D0h; Size                                                ; +0x48, 0x1403be0e8\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x4d, 0x1403be0ed\nmov     [rsp+68h+var_48], rax                                          ; +0x52, 0x1403be0f2\nmov     rcx, rax                                                       ; +0x57, 0x1403be0f7\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x5a, 0x1403be0fa\nnop                                                                    ; +0x5f, 0x1403be0ff\nmov     cs:qword_14090C070, rax                                        ; +0x60, 0x1403be100\nmov     rcx, [rax]                                                     ; +0x67, 0x1403be107\nmov     rdx, [rcx+48h]                                                 ; +0x6a, 0x1403be10a\nmov     rcx, rax                                                       ; +0x6e, 0x1403be10e\ncall    rdx                                                            ; +0x71, 0x1403be111\nmov     rcx, cs:qword_14090C070                                        ; +0x73, 0x1403be113\ncall    MusicDownloadManager__getDownloadedSongs                       ; +0x7a, 0x1403be11a\nmov     rdi, rax                                                       ; +0x7f, 0x1403be11f\nxor     ebx, ebx                                                       ; +0x82, 0x1403be122\nmov     rcx, rax                                                       ; +0x84, 0x1403be124\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x87, 0x1403be127\ntest    eax, eax                                                       ; +0x8d, 0x1403be12d\njz      loc_1403BE1C6                                                  ; +0x8f, 0x1403be12f\nmov     edx, ebx                                                       ; +0x95, 0x1403be135\nmov     rcx, rdi                                                       ; +0x97, 0x1403be137\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x9a, 0x1403be13a\nmov     rsi, rax                                                       ; +0xa0, 0x1403be140\nmov     rcx, cs:qword_14090C070                                        ; +0xa3, 0x1403be143\ntest    rcx, rcx                                                       ; +0xaa, 0x1403be14a\njnz     short loc_1403BE181                                            ; +0xad, 0x1403be14d\nmov     ecx, 3D0h; Size                                                ; +0xaf, 0x1403be14f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xb4, 0x1403be154\nmov     [rsp+68h+var_48], rax                                          ; +0xb9, 0x1403be159\nmov     rcx, rax                                                       ; +0xbe, 0x1403be15e\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0xc1, 0x1403be161\nnop                                                                    ; +0xc6, 0x1403be166\nmov     cs:qword_14090C070, rax                                        ; +0xc7, 0x1403be167\nmov     rcx, [rax]                                                     ; +0xce, 0x1403be16e\nmov     rdx, [rcx+48h]                                                 ; +0xd1, 0x1403be171\nmov     rcx, rax                                                       ; +0xd5, 0x1403be175\ncall    rdx                                                            ; +0xd8, 0x1403be178\nmov     rcx, cs:qword_14090C070                                        ; +0xda, 0x1403be17a\nmov     r8d, [rsi+140h]                                                ; +0xe1, 0x1403be181\nlea     rdx, [rsp+68h+FileName]                                        ; +0xe8, 0x1403be188\ncall    MusicDownloadManager__pathForSong                              ; +0xed, 0x1403be18d\nlea     rcx, [rsp+68h+FileName]                                        ; +0xf2, 0x1403be192\ncmp     [rsp+68h+var_28], 0Fh                                          ; +0xf7, 0x1403be197\ncmova   rcx, [rsp+68h+FileName]; FileName                              ; +0xfd, 0x1403be19d\ncall    cs:remove                                                      ; +0x103, 0x1403be1a3\nlea     rcx, [rsp+68h+FileName]                                        ; +0x109, 0x1403be1a9\ncall    sub_14003D310                                                  ; +0x10e, 0x1403be1ae\ninc     ebx                                                            ; +0x113, 0x1403be1b3\nmov     rcx, rdi                                                       ; +0x115, 0x1403be1b5\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x118, 0x1403be1b8\ncmp     ebx, eax                                                       ; +0x11e, 0x1403be1be\njb      loc_1403BE135                                                  ; +0x120, 0x1403be1c0\nmov     rcx, cs:qword_14090C070                                        ; +0x126, 0x1403be1c6\ntest    rcx, rcx                                                       ; +0x12d, 0x1403be1cd\njnz     short loc_1403BE204                                            ; +0x130, 0x1403be1d0\nmov     ecx, 3D0h; Size                                                ; +0x132, 0x1403be1d2\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x137, 0x1403be1d7\nmov     [rsp+68h+var_48], rax                                          ; +0x13c, 0x1403be1dc\nmov     rcx, rax                                                       ; +0x141, 0x1403be1e1\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x144, 0x1403be1e4\nnop                                                                    ; +0x149, 0x1403be1e9\nmov     cs:qword_14090C070, rax                                        ; +0x14a, 0x1403be1ea\nmov     rcx, [rax]                                                     ; +0x151, 0x1403be1f1\nmov     rdx, [rcx+48h]                                                 ; +0x154, 0x1403be1f4\nmov     rcx, rax                                                       ; +0x158, 0x1403be1f8\ncall    rdx                                                            ; +0x15b, 0x1403be1fb\nmov     rcx, cs:qword_14090C070                                        ; +0x15d, 0x1403be1fd\ncall    MusicDownloadManager__clearUnusedSongs                         ; +0x164, 0x1403be204\nlea     rcx, [rbp-260h]                                                ; +0x169, 0x1403be209\nmov     rax, [rcx]                                                     ; +0x170, 0x1403be210\nxor     edx, edx                                                       ; +0x173, 0x1403be213\ncall    qword ptr [rax+430h]                                           ; +0x175, 0x1403be215\nmov     rcx, [rsp+68h+var_20]                                          ; +0x17b, 0x1403be21b\nxor     rcx, rsp; StackCookie                                          ; +0x180, 0x1403be220\ncall    __security_check_cookie                                        ; +0x183, 0x1403be223\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x188, 0x1403be228\nadd     rsp, 50h                                                       ; +0x190, 0x1403be230\npop     rdi                                                            ; +0x194, 0x1403be234\npop     rsi                                                            ; +0x195, 0x1403be235\npop     rbp                                                            ; +0x196, 0x1403be236\nretn                                                                   ; +0x197, 0x1403be237", "xrefs": ["<???> @ 0x140782cf0", "<???> @ 0x140923f48"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}