{"type": "func", "start": 5370159232, "end": 5370159519, "name": "CustomSFXWidget::onToggleFavorite", "pseudocode": "// \n// CustomSFXWidget::onToggleFavorite from 0x140162080 to 0x14016219f (287 bytes)\n// \n// 2 xrefs:\n// > CustomSFXWidget::init @ 0x140160e12\n// > <???> @ 0x140917d80\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=2\n__int64 __fastcall CustomSFXWidget::onToggleFavorite(__int64 a1)\n{\n  __int64 result; // rax\n  __int64 v3; // rbx\n  __int64 v4; // rcx\n  _BYTE v5[24]; // [rsp+20h] [rbp-18h] BYREF\n  void *v6; // [rsp+40h] [rbp+8h] BYREF\n\n  result = *(_QWORD *)(a1 + 336);\n  if ( result )\n  {\n    v3 = qword_14090C070;\n    if ( *(int *)(result + 76) <= 0 )\n    {\n      if ( !qword_14090C070 )\n      {\n        v6 = operator new(0x3D0u);\n        qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v6);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n        v3 = qword_14090C070;\n      }\n      LODWORD(v6) = *(_DWORD *)(*(_QWORD *)(a1 + 336) + 56LL);\n      if ( (int)v6 <= 0 || sub_140066A60((_QWORD *)(v3 + 648), (unsigned __int8 *)&v6) )\n        return CustomSFXWidget::updateSFXInfo(a1);\n      v4 = v3 + 648;\n    }\n    else\n    {\n      if ( !qword_14090C070 )\n      {\n        v6 = operator new(0x3D0u);\n        qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v6);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n        v3 = qword_14090C070;\n      }\n      LODWORD(v6) = *(_DWORD *)(*(_QWORD *)(a1 + 336) + 76LL);\n      if ( (int)v6 <= 1 || sub_140066A60((_QWORD *)(v3 + 712), (unsigned __int8 *)&v6) )\n        return CustomSFXWidget::updateSFXInfo(a1);\n      v4 = v3 + 712;\n    }\n    sub_140068190(v4, (__int64)v5, (unsigned __int8 *)&v6);\n    return CustomSFXWidget::updateSFXInfo(a1);\n  }\n  return result;\n}", "assembly": "; \n; CustomSFXWidget::onToggleFavorite from 0x140162080 to 0x14016219f (287 bytes)\n; \n; 2 xrefs:\n; > CustomSFXWidget::init @ 0x140160e12\n; > <???> @ 0x140917d80\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, 0x140162080\npush    rdi                                                            ; +0x5, 0x140162085\nsub     rsp, 30h                                                       ; +0x6, 0x140162086\nmov     rdi, rcx                                                       ; +0xa, 0x14016208a\nmov     rax, [rcx+150h]                                                ; +0xd, 0x14016208d\ntest    rax, rax                                                       ; +0x14, 0x140162094\njz      loc_140162194                                                  ; +0x17, 0x140162097\nmov     rbx, cs:qword_14090C070                                        ; +0x1d, 0x14016209d\ncmp     dword ptr [rax+4Ch], 0                                         ; +0x24, 0x1401620a4\njle     short loc_140162117                                            ; +0x28, 0x1401620a8\ntest    rbx, rbx                                                       ; +0x2a, 0x1401620aa\njnz     short loc_1401620E1                                            ; +0x2d, 0x1401620ad\nmov     ecx, 3D0h; Size                                                ; +0x2f, 0x1401620af\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x34, 0x1401620b4\nmov     [rsp+38h+arg_0], rax                                           ; +0x39, 0x1401620b9\nmov     rcx, rax                                                       ; +0x3e, 0x1401620be\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x41, 0x1401620c1\nnop                                                                    ; +0x46, 0x1401620c6\nmov     cs:qword_14090C070, rax                                        ; +0x47, 0x1401620c7\nmov     rcx, [rax]                                                     ; +0x4e, 0x1401620ce\nmov     rdx, [rcx+48h]                                                 ; +0x51, 0x1401620d1\nmov     rcx, rax                                                       ; +0x55, 0x1401620d5\ncall    rdx                                                            ; +0x58, 0x1401620d8\nmov     rbx, cs:qword_14090C070                                        ; +0x5a, 0x1401620da\nmov     rax, [rdi+150h]                                                ; +0x61, 0x1401620e1\nmov     ecx, [rax+4Ch]                                                 ; +0x68, 0x1401620e8\nmov     dword ptr [rsp+38h+arg_0], ecx                                 ; +0x6b, 0x1401620eb\ncmp     ecx, 1                                                         ; +0x6f, 0x1401620ef\njle     loc_14016218C                                                  ; +0x72, 0x1401620f2\nlea     rcx, [rbx+2C8h]                                                ; +0x78, 0x1401620f8\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x7f, 0x1401620ff\ncall    sub_140066A60                                                  ; +0x84, 0x140162104\ntest    rax, rax                                                       ; +0x89, 0x140162109\njnz     short loc_14016218C                                            ; +0x8c, 0x14016210c\nlea     rcx, [rbx+2C8h]                                                ; +0x8e, 0x14016210e\njmp     short loc_14016217D                                            ; +0x95, 0x140162115\ntest    rbx, rbx                                                       ; +0x97, 0x140162117\njnz     short loc_14016214E                                            ; +0x9a, 0x14016211a\nmov     ecx, 3D0h; Size                                                ; +0x9c, 0x14016211c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xa1, 0x140162121\nmov     [rsp+38h+arg_0], rax                                           ; +0xa6, 0x140162126\nmov     rcx, rax                                                       ; +0xab, 0x14016212b\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0xae, 0x14016212e\nnop                                                                    ; +0xb3, 0x140162133\nmov     cs:qword_14090C070, rax                                        ; +0xb4, 0x140162134\nmov     rcx, [rax]                                                     ; +0xbb, 0x14016213b\nmov     rdx, [rcx+48h]                                                 ; +0xbe, 0x14016213e\nmov     rcx, rax                                                       ; +0xc2, 0x140162142\ncall    rdx                                                            ; +0xc5, 0x140162145\nmov     rbx, cs:qword_14090C070                                        ; +0xc7, 0x140162147\nmov     rax, [rdi+150h]                                                ; +0xce, 0x14016214e\nmov     ecx, [rax+38h]                                                 ; +0xd5, 0x140162155\nmov     dword ptr [rsp+38h+arg_0], ecx                                 ; +0xd8, 0x140162158\ntest    ecx, ecx                                                       ; +0xdc, 0x14016215c\njle     short loc_14016218C                                            ; +0xde, 0x14016215e\nlea     rcx, [rbx+288h]                                                ; +0xe0, 0x140162160\nlea     rdx, [rsp+38h+arg_0]                                           ; +0xe7, 0x140162167\ncall    sub_140066A60                                                  ; +0xec, 0x14016216c\ntest    rax, rax                                                       ; +0xf1, 0x140162171\njnz     short loc_14016218C                                            ; +0xf4, 0x140162174\nlea     rcx, [rbx+288h]                                                ; +0xf6, 0x140162176\nlea     r8, [rsp+38h+arg_0]                                            ; +0xfd, 0x14016217d\nlea     rdx, [rsp+38h+var_18]                                          ; +0x102, 0x140162182\ncall    sub_140068190                                                  ; +0x107, 0x140162187\nmov     rcx, rdi                                                       ; +0x10c, 0x14016218c\ncall    CustomSFXWidget__updateSFXInfo                                 ; +0x10f, 0x14016218f\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x114, 0x140162194\nadd     rsp, 30h                                                       ; +0x119, 0x140162199\npop     rdi                                                            ; +0x11d, 0x14016219d\nretn                                                                   ; +0x11e, 0x14016219e", "xrefs": ["CustomSFXWidget::init @ 0x140160e12", "<???> @ 0x140917d80"], "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"}