{"type": "func", "start": 4301146528, "end": 4301146729, "name": "CustomSFXWidget::updateDownloadProgress", "pseudocode": "// \n// CustomSFXWidget::updateDownloadProgress from 0x1005e49a0 to 0x1005e4a69 (201 bytes)\n// \n// 6 xrefs:\n// > CustomSFXWidget::init @ 0x1005e3908\n// > CustomSFXWidget::onDownload @ 0x1005e3a71\n// > CustomSFXWidget::startMonitorDownload @ 0x1005e461a\n// > CustomSFXWidget::startDownload @ 0x1005e4964\n// > CustomSFXWidget::updateDownloadProgress @ 0x1005e49dd\n// > CustomSFXWidget::downloadFailed @ 0x1005e4aec\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall CustomSFXWidget::updateDownloadProgress(CustomSFXWidget *a1, float a2)\n{\n  __m128 v2; // xmm2\n  MusicDownloadManager *v3; // rax\n  int SFXDownloadProgress; // eax\n  int v5; // ecx\n  cocos2d::CCSprite *m_progressBarSprite; // rbx\n  _BYTE v7[32]; // [rsp+0h] [rbp-20h] BYREF\n\n  v3 = MusicDownloadManager::sharedState();\n  SFXDownloadProgress = MusicDownloadManager::getSFXDownloadProgress(v3, a1->m_sfxObject->m_sfxID);\n  if ( a1->m_sfxObject == nullptr || SFXDownloadProgress == -1 )\n  {\n    cocos2d::CCNode::unschedule(a1, (cocos2d::SEL_SCHEDULE)(unsigned __int64)CustomSFXWidget::updateDownloadProgress);\n    CustomSFXWidget::updateSFXInfo(a1);\n  }\n  else\n  {\n    v5 = 0;\n    if ( SFXDownloadProgress > 0 )\n      v5 = SFXDownloadProgress;\n    m_progressBarSprite = a1->m_progressBarSprite;\n    v2.f32[0] = fminf(\n                  (float)((float)v5 / 100.0) * (float)(a1->m_progressOutlineSprite->m_obRect.size.width + -4.0),\n                  a1->m_progressOutlineSprite->m_obRect.size.width + -4.0);\n    sub_10028CC00((__int64)v7, 0.0, 0.0, v2, (__m128)0x41000000u);\n    ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))m_progressBarSprite->setTextureRect)(m_progressBarSprite, v7);\n  }\n}", "assembly": "; \n; CustomSFXWidget::updateDownloadProgress from 0x1005e49a0 to 0x1005e4a69 (201 bytes)\n; \n; 6 xrefs:\n; > CustomSFXWidget::init @ 0x1005e3908\n; > CustomSFXWidget::onDownload @ 0x1005e3a71\n; > CustomSFXWidget::startMonitorDownload @ 0x1005e461a\n; > CustomSFXWidget::startDownload @ 0x1005e4964\n; > CustomSFXWidget::updateDownloadProgress @ 0x1005e49dd\n; > CustomSFXWidget::downloadFailed @ 0x1005e4aec\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbp                                                            ; +0x0, 0x1005e49a0\nmov     rbp, rsp                                                       ; +0x1, 0x1005e49a1\npush    r14                                                            ; +0x4, 0x1005e49a4\npush    rbx                                                            ; +0x6, 0x1005e49a6\nsub     rsp, 10h                                                       ; +0x7, 0x1005e49a7\nmov     rbx, rdi                                                       ; +0xb, 0x1005e49ab\ncall    MusicDownloadManager__sharedState                              ; +0xe, 0x1005e49ae\nmov     rcx, [rbx+150h]                                                ; +0x13, 0x1005e49b3\nmov     esi, [rcx+38h]                                                 ; +0x1a, 0x1005e49ba\nmov     rdi, rax                                                       ; +0x1d, 0x1005e49bd\ncall    MusicDownloadManager__getSFXDownloadProgress                   ; +0x20, 0x1005e49c0\ncmp     qword ptr [rbx+150h], 0                                        ; +0x25, 0x1005e49c5\nsetz    cl                                                             ; +0x2d, 0x1005e49cd\ncmp     eax, 0FFFFFFFFh                                                ; +0x30, 0x1005e49d0\nsetz    dl                                                             ; +0x33, 0x1005e49d3\nor      dl, cl                                                         ; +0x36, 0x1005e49d6\ncmp     dl, 1                                                          ; +0x38, 0x1005e49d8\njnz     short loc_1005E49FE                                            ; +0x3b, 0x1005e49db\nlea     rsi, CustomSFXWidget__updateDownloadProgress                   ; +0x3d, 0x1005e49dd\nmov     rdi, rbx                                                       ; +0x44, 0x1005e49e4\nxor     edx, edx                                                       ; +0x47, 0x1005e49e7\ncall    cocos2d__CCNode__unschedule                                    ; +0x49, 0x1005e49e9\nmov     rdi, rbx                                                       ; +0x4e, 0x1005e49ee\nadd     rsp, 10h                                                       ; +0x51, 0x1005e49f1\npop     rbx                                                            ; +0x55, 0x1005e49f5\npop     r14                                                            ; +0x56, 0x1005e49f6\npop     rbp                                                            ; +0x58, 0x1005e49f8\njmp     CustomSFXWidget__updateSFXInfo                                 ; +0x59, 0x1005e49f9\nxor     ecx, ecx                                                       ; +0x5e, 0x1005e49fe\ntest    eax, eax                                                       ; +0x60, 0x1005e4a00\ncmovg   ecx, eax                                                       ; +0x62, 0x1005e4a02\nmov     rax, [rbx+1A0h]                                                ; +0x65, 0x1005e4a05\nmovss   xmm0, dword ptr [rax+1B0h]                                     ; +0x6c, 0x1005e4a0c\naddss   xmm0, cs:dword_100815290                                       ; +0x74, 0x1005e4a14\nmov     rbx, [rbx+1A8h]                                                ; +0x7c, 0x1005e4a1c\ncvtsi2ss xmm2, ecx                                                     ; +0x83, 0x1005e4a23\ndivss   xmm2, cs:dword_100815014                                       ; +0x87, 0x1005e4a27\nmulss   xmm2, xmm0                                                     ; +0x8f, 0x1005e4a2f\nminss   xmm2, xmm0                                                     ; +0x93, 0x1005e4a33\nlea     r14, [rbp+var_20]                                              ; +0x97, 0x1005e4a37\nmovss   xmm3, cs:dword_100815034                                       ; +0x9b, 0x1005e4a3b\nxorps   xmm0, xmm0                                                     ; +0xa3, 0x1005e4a43\nxorps   xmm1, xmm1                                                     ; +0xa6, 0x1005e4a46\nmov     rdi, r14                                                       ; +0xa9, 0x1005e4a49\ncall    sub_10028CC00                                                  ; +0xac, 0x1005e4a4c\nmov     rax, [rbx]                                                     ; +0xb1, 0x1005e4a51\nmov     rdi, rbx                                                       ; +0xb4, 0x1005e4a54\nmov     rsi, r14                                                       ; +0xb7, 0x1005e4a57\ncall    qword ptr [rax+460h]                                           ; +0xba, 0x1005e4a5a\nadd     rsp, 10h                                                       ; +0xc0, 0x1005e4a60\npop     rbx                                                            ; +0xc4, 0x1005e4a64\npop     r14                                                            ; +0xc5, 0x1005e4a65\npop     rbp                                                            ; +0xc7, 0x1005e4a67\nretn                                                                   ; +0xc8, 0x1005e4a68", "xrefs": ["CustomSFXWidget::init @ 0x1005e3908", "CustomSFXWidget::onDownload @ 0x1005e3a71", "CustomSFXWidget::startMonitorDownload @ 0x1005e461a", "CustomSFXWidget::startDownload @ 0x1005e4964", "CustomSFXWidget::updateDownloadProgress @ 0x1005e49dd", "CustomSFXWidget::downloadFailed @ 0x1005e4aec"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}