{"type": "func", "start": 5370197984, "end": 5370198157, "name": "CustomSongWidget::onToggleFavorite", "pseudocode": "// \n// CustomSongWidget::onToggleFavorite from 0x14016b7e0 to 0x14016b88d (173 bytes)\n// \n// 2 xrefs:\n// > CustomSongWidget::init @ 0x14016a0d7\n// > <???> @ 0x140918110\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:29 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall CustomSongWidget::onToggleFavorite(__int64 a1)\n{\n  __int64 v2; // rbx\n  _BYTE v3[24]; // [rsp+20h] [rbp-18h] BYREF\n  void *v4; // [rsp+40h] [rbp+8h] BYREF\n\n  if ( *(_QWORD *)(a1 + 336) )\n  {\n    v2 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v4 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v4);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v2 = qword_14090C070;\n    }\n    LODWORD(v4) = *(_DWORD *)(*(_QWORD *)(a1 + 336) + 320LL);\n    if ( (int)v4 > 0 && !sub_140066A60((_QWORD *)(v2 + 776), (unsigned __int8 *)&v4) )\n      sub_140068190(v2 + 776, (__int64)v3, (unsigned __int8 *)&v4);\n    CustomSongWidget::updateSongInfo(a1);\n  }\n}", "assembly": "; \n; CustomSongWidget::onToggleFavorite from 0x14016b7e0 to 0x14016b88d (173 bytes)\n; \n; 2 xrefs:\n; > CustomSongWidget::init @ 0x14016a0d7\n; > <???> @ 0x140918110\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:29 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14016b7e0\npush    rdi                                                            ; +0x5, 0x14016b7e5\nsub     rsp, 30h                                                       ; +0x6, 0x14016b7e6\nmov     rdi, rcx                                                       ; +0xa, 0x14016b7ea\ncmp     qword ptr [rcx+150h], 0                                        ; +0xd, 0x14016b7ed\njz      loc_14016B882                                                  ; +0x15, 0x14016b7f5\nmov     rbx, cs:qword_14090C070                                        ; +0x1b, 0x14016b7fb\ntest    rbx, rbx                                                       ; +0x22, 0x14016b802\njnz     short loc_14016B839                                            ; +0x25, 0x14016b805\nmov     ecx, 3D0h; Size                                                ; +0x27, 0x14016b807\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2c, 0x14016b80c\nmov     [rsp+38h+arg_0], rax                                           ; +0x31, 0x14016b811\nmov     rcx, rax                                                       ; +0x36, 0x14016b816\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x39, 0x14016b819\nnop                                                                    ; +0x3e, 0x14016b81e\nmov     cs:qword_14090C070, rax                                        ; +0x3f, 0x14016b81f\nmov     rcx, [rax]                                                     ; +0x46, 0x14016b826\nmov     rdx, [rcx+48h]                                                 ; +0x49, 0x14016b829\nmov     rcx, rax                                                       ; +0x4d, 0x14016b82d\ncall    rdx                                                            ; +0x50, 0x14016b830\nmov     rbx, cs:qword_14090C070                                        ; +0x52, 0x14016b832\nmov     rax, [rdi+150h]                                                ; +0x59, 0x14016b839\nmov     ecx, [rax+140h]                                                ; +0x60, 0x14016b840\nmov     dword ptr [rsp+38h+arg_0], ecx                                 ; +0x66, 0x14016b846\ntest    ecx, ecx                                                       ; +0x6a, 0x14016b84a\njle     short loc_14016B87A                                            ; +0x6c, 0x14016b84c\nlea     rcx, [rbx+308h]                                                ; +0x6e, 0x14016b84e\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x75, 0x14016b855\ncall    sub_140066A60                                                  ; +0x7a, 0x14016b85a\ntest    rax, rax                                                       ; +0x7f, 0x14016b85f\njnz     short loc_14016B87A                                            ; +0x82, 0x14016b862\nlea     rcx, [rbx+308h]                                                ; +0x84, 0x14016b864\nlea     r8, [rsp+38h+arg_0]                                            ; +0x8b, 0x14016b86b\nlea     rdx, [rsp+38h+var_18]                                          ; +0x90, 0x14016b870\ncall    sub_140068190                                                  ; +0x95, 0x14016b875\nmov     rcx, rdi                                                       ; +0x9a, 0x14016b87a\ncall    CustomSongWidget__updateSongInfo                               ; +0x9d, 0x14016b87d\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xa2, 0x14016b882\nadd     rsp, 30h                                                       ; +0xa7, 0x14016b887\npop     rdi                                                            ; +0xab, 0x14016b88b\nretn                                                                   ; +0xac, 0x14016b88c", "xrefs": ["CustomSongWidget::init @ 0x14016a0d7", "<???> @ 0x140918110"], "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"}