{"type": "func", "start": 5692464, "end": 5692608, "name": "CustomSFXWidget::onPlayback", "pseudocode": "// \n// CustomSFXWidget::onPlayback from 0x56dc30 to 0x56dcc0 (144 bytes)\n// \n// 1 xrefs:\n// > CustomSFXWidget::downloadSFXFinished @ 0x56f114\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::onPlayback(CustomSFXWidget *a1, cocos2d::CCObject *a2)\n{\n  FMODAudioEngine *v3; // r0\n  CustomSFXDelegate *m_delegate; // r0\n  FMODAudioEngine *v5; // r7\n  MusicDownloadManager *v6; // r0\n  char *v7; // [sp+4h] [bp-10h] BYREF\n  _BYTE v8[4]; // [sp+8h] [bp-Ch] BYREF\n\n  if ( a1->m_sfxObject )\n  {\n    v3 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::stopAllEffects(v3);\n    m_delegate = a1->m_delegate;\n    if ( !m_delegate\n      || !((int (__fastcall *)(CustomSFXDelegate *, SFXInfoObject *))m_delegate->overridePlaySFX)(\n            m_delegate,\n            a1->m_sfxObject) )\n    {\n      v5 = FMODAudioEngine::sharedEngine();\n      v6 = MusicDownloadManager::sharedState();\n      MusicDownloadManager::pathForSFX((MusicDownloadManager *)&v7, v6, a1->m_sfxObject->m_sfxID);\n      sub_776584((int)v8, v7);\n      FMODAudioEngine::playEffectAsync(v5, (int)v8);\n      sub_774008(v8);\n      sub_774008(&v7);\n    }\n  }\n}", "assembly": "; \n; CustomSFXWidget::onPlayback from 0x56dc30 to 0x56dcc0 (144 bytes)\n; \n; 1 xrefs:\n; > CustomSFXWidget::downloadSFXFinished @ 0x56f114\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x56DC38)                ; +0x0, 0x56dc30\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x56dc32\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x56dc34\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x56dc36\nSUB             SP, SP, #0x14                                          ; +0x8, 0x56dc38\nMOV             R4, R0                                                 ; +0xa, 0x56dc3a\nLDR             R2, [R3]                                               ; +0xc, 0x56dc3c\nMOV             R5, R3                                                 ; +0xe, 0x56dc3e\nSTR             R2, [SP,#0x14+var_8]                                   ; +0x10, 0x56dc40\nLDR.W           R2, [R0,#0x110]                                        ; +0x12, 0x56dc42\nCBZ             R2, loc_56DCB0                                         ; +0x16, 0x56dc46\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x18, 0x56dc48\nBL              _ZN15FMODAudioEngine14stopAllEffectsEv; FMODAudioEngine::stopAllEffects(void) ; +0x1c, 0x56dc4c\nLDR.W           R0, [R4,#0x144]                                        ; +0x20, 0x56dc50\nCBZ             R0, loc_56DC62                                         ; +0x24, 0x56dc54\nLDR             R3, [R0]                                               ; +0x26, 0x56dc56\nLDR.W           R1, [R4,#0x110]                                        ; +0x28, 0x56dc58\nLDR             R3, [R3,#8]                                            ; +0x2c, 0x56dc5c\nBLX             R3                                                     ; +0x2e, 0x56dc5e\nCBNZ            R0, loc_56DCB0                                         ; +0x30, 0x56dc60\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x32, 0x56dc62\nADD             R6, SP, #0x14+var_10                                   ; +0x36, 0x56dc66\nMOV             R7, R0                                                 ; +0x38, 0x56dc68\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x3a, 0x56dc6a\nLDR.W           R3, [R4,#0x110]                                        ; +0x3e, 0x56dc6e\nADD             R4, SP, #0x14+var_C                                    ; +0x42, 0x56dc72\nLDR             R2, [R3,#0x34]                                         ; +0x44, 0x56dc74\nMOV             R1, R0; int                                            ; +0x46, 0x56dc76\nMOV             R0, R6; this                                           ; +0x48, 0x56dc78\nBL              _ZN20MusicDownloadManager10pathForSFXEi; MusicDownloadManager::pathForSFX(int) ; +0x4a, 0x56dc7a\nMOV             R0, R4; int                                            ; +0x4e, 0x56dc7e\nLDR             R1, [SP,#0x14+var_10]; char *                          ; +0x50, 0x56dc80\nMOV             R2, SP                                                 ; +0x52, 0x56dc82\nBL              sub_776584                                             ; +0x54, 0x56dc84\nMOV             R0, R7                                                 ; +0x58, 0x56dc88\nMOV             R1, R4                                                 ; +0x5a, 0x56dc8a\nBL              _ZN15FMODAudioEngine15playEffectAsyncESs; FMODAudioEngine::playEffectAsync(std::string) ; +0x5c, 0x56dc8c\nMOV             R0, R4                                                 ; +0x60, 0x56dc90\nBL              sub_774008                                             ; +0x62, 0x56dc92\nMOV             R0, R6                                                 ; +0x66, 0x56dc96\nBL              sub_774008                                             ; +0x68, 0x56dc98\nB               loc_56DCB0                                             ; +0x6c, 0x56dc9c\nMOV             R0, R4                                                 ; +0x6e, 0x56dc9e\nBL              sub_774008                                             ; +0x70, 0x56dca0\nB               loc_56DCA6                                             ; +0x74, 0x56dca4\nMOV             R0, R6                                                 ; +0x76, 0x56dca6\nBL              sub_774008                                             ; +0x78, 0x56dca8\nBL              __cxa_end_cleanup                                      ; +0x7c, 0x56dcac\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x80, 0x56dcb0\nLDR             R3, [R5]                                               ; +0x82, 0x56dcb2\nCMP             R2, R3                                                 ; +0x84, 0x56dcb4\nBEQ             loc_56DCBC                                             ; +0x86, 0x56dcb6\nBLX             __stack_chk_fail                                       ; +0x88, 0x56dcb8\nADD             SP, SP, #0x14                                          ; +0x8c, 0x56dcbc\nPOP             {R4-R7,PC}                                             ; +0x8e, 0x56dcbe", "xrefs": ["CustomSFXWidget::downloadSFXFinished @ 0x56f114"], "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"}