{"type": "func", "start": 5370158480, "end": 5370158666, "name": "CustomSFXWidget::onCancelDownload", "pseudocode": "// \n// CustomSFXWidget::onCancelDownload from 0x140161d90 to 0x140161e4a (186 bytes)\n// \n// 2 xrefs:\n// > CustomSFXWidget::init @ 0x140160998\n// > <???> @ 0x140917d5c\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:27:25 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall CustomSFXWidget::onCancelDownload(__int64 a1)\n{\n  __int64 v2; // rbx\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rsi\n  __int64 AchievementsWithID; // rax\n  void *v7; // [rsp+30h] [rbp+8h]\n\n  v2 = qword_14090C070;\n  if ( !qword_14090C070 )\n  {\n    v7 = operator new(0x3D0u);\n    qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v7);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n    v2 = qword_14090C070;\n  }\n  v3 = cocos2d::CCString::createWithFormat(\"d_%i\", *(_DWORD *)(a1 + 496));\n  CString = cocos2d::CCString::getCString(v3);\n  AchievementsWithID = AchievementManager::getAchievementsWithID(v2, (__int64)CString);\n  if ( AchievementsWithID )\n    *(_BYTE *)(AchievementsWithID + 204) = 1;\n  MusicDownloadManager::removeDLFromActive(v2, CString);\n  return (*(__int64 (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)(a1 + 320) + 56LL))(\n           a1 + 320,\n           *(unsigned int *)(a1 + 496),\n           3);\n}", "assembly": "; \n; CustomSFXWidget::onCancelDownload from 0x140161d90 to 0x140161e4a (186 bytes)\n; \n; 2 xrefs:\n; > CustomSFXWidget::init @ 0x140160998\n; > <???> @ 0x140917d5c\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:27:25 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140161d90\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140161d95\npush    rdi                                                            ; +0xa, 0x140161d9a\nsub     rsp, 20h                                                       ; +0xb, 0x140161d9b\nmov     rdi, rcx                                                       ; +0xf, 0x140161d9f\nmov     rbx, cs:qword_14090C070                                        ; +0x12, 0x140161da2\ntest    rbx, rbx                                                       ; +0x19, 0x140161da9\njnz     short loc_140161DE0                                            ; +0x1c, 0x140161dac\nmov     ecx, 3D0h; Size                                                ; +0x1e, 0x140161dae\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x23, 0x140161db3\nmov     [rsp+28h+arg_0], rax                                           ; +0x28, 0x140161db8\nmov     rcx, rax                                                       ; +0x2d, 0x140161dbd\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x30, 0x140161dc0\nnop                                                                    ; +0x35, 0x140161dc5\nmov     cs:qword_14090C070, rax                                        ; +0x36, 0x140161dc6\nmov     rcx, [rax]                                                     ; +0x3d, 0x140161dcd\nmov     rdx, [rcx+48h]                                                 ; +0x40, 0x140161dd0\nmov     rcx, rax                                                       ; +0x44, 0x140161dd4\ncall    rdx                                                            ; +0x47, 0x140161dd7\nmov     rbx, cs:qword_14090C070                                        ; +0x49, 0x140161dd9\nmov     edx, [rdi+1F0h]                                                ; +0x50, 0x140161de0\nlea     rcx, aDI; \"d_%i\"                                               ; +0x56, 0x140161de6\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x5d, 0x140161ded\nmov     rcx, rax                                                       ; +0x63, 0x140161df3\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x66, 0x140161df6\nmov     rsi, rax                                                       ; +0x6c, 0x140161dfc\nmov     rdx, rax                                                       ; +0x6f, 0x140161dff\nmov     rcx, rbx                                                       ; +0x72, 0x140161e02\ncall    AchievementManager__getAchievementsWithID; Merged with: AchievementManager::getAchievementsWithID, MusicDownloadManager::getDLObject ; +0x75, 0x140161e05\ntest    rax, rax                                                       ; +0x7a, 0x140161e0a\njz      short loc_140161E16                                            ; +0x7d, 0x140161e0d\nmov     byte ptr [rax+0CCh], 1                                         ; +0x7f, 0x140161e0f\nmov     rdx, rsi                                                       ; +0x86, 0x140161e16\nmov     rcx, rbx                                                       ; +0x89, 0x140161e19\ncall    MusicDownloadManager__removeDLFromActive                       ; +0x8c, 0x140161e1c\nlea     rcx, [rdi+140h]                                                ; +0x91, 0x140161e21\nmov     rax, [rcx]                                                     ; +0x98, 0x140161e28\nmov     r8d, 3                                                         ; +0x9b, 0x140161e2b\nmov     edx, [rdi+1F0h]                                                ; +0xa1, 0x140161e31\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xa7, 0x140161e37\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xac, 0x140161e3c\nadd     rsp, 20h                                                       ; +0xb1, 0x140161e41\npop     rdi                                                            ; +0xb5, 0x140161e45\njmp     qword ptr [rax+38h]                                            ; +0xb6, 0x140161e46", "xrefs": ["CustomSFXWidget::init @ 0x140160998", "<???> @ 0x140917d5c"], "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"}