{"type": "func", "start": 5692968, "end": 5693090, "name": "CustomSFXWidget::updateProgressBar", "pseudocode": "// \n// CustomSFXWidget::updateProgressBar from 0x56de28 to 0x56dea2 (122 bytes)\n// \n// 3 xrefs:\n// > CustomSFXWidget::startMonitorDownload @ 0x56deb4\n// > CustomSFXWidget::init @ 0x56eec0\n// > CustomSFXWidget::updateDownloadProgress @ 0x56f0b2\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 CustomSFXWidget::updateProgressBar(CustomSFXWidget *a1, int a2)\n{\n  cocos2d::CCSprite *m_progressBarSprite; // r6\n  cocos2d::CCSprite *m_progressOutlineSprite; // r3\n  float v4; // s14\n  void (__fastcall *setTextureRect)(cocos2d::CCSprite *__hidden, const cocos2d::CCRect *); // r7\n  float v6; // r3\n  cocos2d::CCRect v7; // [sp+Ch] [bp-18h] BYREF\n\n  m_progressBarSprite = a1->m_progressBarSprite;\n  m_progressOutlineSprite = a1->m_progressOutlineSprite;\n  v4 = m_progressOutlineSprite->m_obRect.size.width - 4.0;\n  setTextureRect = m_progressBarSprite->setTextureRect;\n  if ( v4 > (float)(v4 * (float)((float)(a2 & ~(a2 >> 31)) / 100.0)) )\n    v6 = v4 * (float)((float)(a2 & ~(a2 >> 31)) / 100.0);\n  else\n    v6 = m_progressOutlineSprite->m_obRect.size.width - 4.0;\n  cocos2d::CCRect::CCRect(&v7, 0.0, 0.0, v6, 8.0);\n  setTextureRect(m_progressBarSprite, &v7);\n}", "assembly": "; \n; CustomSFXWidget::updateProgressBar from 0x56de28 to 0x56dea2 (122 bytes)\n; \n; 3 xrefs:\n; > CustomSFXWidget::startMonitorDownload @ 0x56deb4\n; > CustomSFXWidget::init @ 0x56eec0\n; > CustomSFXWidget::updateDownloadProgress @ 0x56f0b2\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            {R4-R7,LR}                                             ; +0x0, 0x56de28\nVMOV.F32        S14, #4.0                                              ; +0x2, 0x56de2a\nLDR             R4, =(__stack_chk_guard_ptr - 0x56DE3E)                ; +0x6, 0x56de2e\nSUB             SP, SP, #0x24                                          ; +0x8, 0x56de30\nBIC.W           R1, R1, R1,ASR#31                                      ; +0xa, 0x56de32\nVLDR            S13, =100.0                                            ; +0xe, 0x56de36\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0x12, 0x56de3a\nLDR             R4, [R4]; __stack_chk_guard                            ; +0x14, 0x56de3c\nLDR.W           R6, [R0,#0x13C]                                        ; +0x16, 0x56de3e\nADD             R5, SP, #0x24+var_18                                   ; +0x1a, 0x56de42\nLDR             R3, [R4]                                               ; +0x1c, 0x56de44\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x1e, 0x56de46\nLDR.W           R3, [R0,#0x138]                                        ; +0x20, 0x56de48\nMOV             R0, R5; this                                           ; +0x24, 0x56de4c\nVLDR            S15, [R3,#0x158]                                       ; +0x26, 0x56de4e\nLDR             R3, [R6]                                               ; +0x2a, 0x56de52\nVSUB.F32        S14, S15, S14                                          ; +0x2c, 0x56de54\nLDR.W           R7, [R3,#0x230]                                        ; +0x30, 0x56de58\nVMOV            S15, R1                                                ; +0x34, 0x56de5c\nMOVS            R1, #0; float                                          ; +0x38, 0x56de60\nMOV             R2, R1; float                                          ; +0x3a, 0x56de62\nMOV.W           R3, #0x41000000                                        ; +0x3c, 0x56de64\nSTR             R3, [SP,#0x24+var_24]; float                           ; +0x40, 0x56de68\nVCVT.F32.S32    S15, S15                                               ; +0x42, 0x56de6a\nVDIV.F32        S15, S15, S13                                          ; +0x46, 0x56de6e\nVMUL.F32        S15, S14, S15                                          ; +0x4a, 0x56de72\nVCMPE.F32       S14, S15                                               ; +0x4e, 0x56de76\nVMRS            APSR_nzcv, FPSCR                                       ; +0x52, 0x56de7a\nITE LE                                                                 ; +0x56, 0x56de7e\nVMOVLE          R3, S14                                                ; +0x58, 0x56de80\nVMOVGT          R3, S15; float                                         ; +0x5c, 0x56de84\nBL              _ZN7cocos2d6CCRectC1Effff; cocos2d::CCRect::CCRect(float,float,float,float) ; +0x60, 0x56de88\nMOV             R0, R6                                                 ; +0x64, 0x56de8c\nMOV             R1, R5                                                 ; +0x66, 0x56de8e\nBLX             R7                                                     ; +0x68, 0x56de90\nLDR             R2, [SP,#0x24+var_8]                                   ; +0x6a, 0x56de92\nLDR             R3, [R4]                                               ; +0x6c, 0x56de94\nCMP             R2, R3                                                 ; +0x6e, 0x56de96\nBEQ             loc_56DE9E                                             ; +0x70, 0x56de98\nBLX             __stack_chk_fail                                       ; +0x72, 0x56de9a\nADD             SP, SP, #0x24 ; '$'                                    ; +0x76, 0x56de9e\nPOP             {R4-R7,PC}                                             ; +0x78, 0x56dea0", "xrefs": ["CustomSFXWidget::startMonitorDownload @ 0x56deb4", "CustomSFXWidget::init @ 0x56eec0", "CustomSFXWidget::updateDownloadProgress @ 0x56f0b2"], "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"}