{"type": "func", "start": 3954336, "end": 3954436, "name": "GJGameLevel::getAudioFileName", "pseudocode": "// \n// GJGameLevel::getAudioFileName from 0x3c56a0 to 0x3c5704 (100 bytes)\n// \n// 10 xrefs:\n// > PlayLayer::prepareMusic @ 0x3147ac\n// > PlayLayer::setupHasCompleted @ 0x31bd2c\n// > LevelInfoLayer::playStep2 @ 0x3b0fb0\n// > EditLevelLayer::playStep2 @ 0x3b5f68\n// > EditLevelLayer::onEdit @ 0x3b7eaa\n// > EditorPauseLayer::playStep2 @ 0x3ff4cc\n// > LevelPage::playStep2 @ 0x408f70\n// > SongSelectNode::getSongFileName @ 0x45e40a\n// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x48b3b6\n// > GJWorldNode::playStep2 @ 0x4fc870\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\nGJGameLevel *__fastcall GJGameLevel::getAudioFileName(GJGameLevel *this, int a2)\n{\n  MusicDownloadManager *v3; // r0\n  char *v5; // [sp+8h] [bp-Ch] BYREF\n\n  if ( *(_DWORD *)(a2 + 356) )\n  {\n    v3 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::pathForSong((MusicDownloadManager *)&v5, (int)v3);\n    sub_776584((int)this, v5);\n    sub_774008(&v5);\n  }\n  else\n  {\n    LevelTools::getAudioFileName((LevelTools *)this, *(_DWORD *)(a2 + 352));\n  }\n  return this;\n}", "assembly": "; \n; GJGameLevel::getAudioFileName from 0x3c56a0 to 0x3c5704 (100 bytes)\n; \n; 10 xrefs:\n; > PlayLayer::prepareMusic @ 0x3147ac\n; > PlayLayer::setupHasCompleted @ 0x31bd2c\n; > LevelInfoLayer::playStep2 @ 0x3b0fb0\n; > EditLevelLayer::playStep2 @ 0x3b5f68\n; > EditLevelLayer::onEdit @ 0x3b7eaa\n; > EditorPauseLayer::playStep2 @ 0x3ff4cc\n; > LevelPage::playStep2 @ 0x408f70\n; > SongSelectNode::getSongFileName @ 0x45e40a\n; > GJBaseGameLayer::processActivatedAudioTriggers @ 0x48b3b6\n; > GJWorldNode::playStep2 @ 0x4fc870\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 - 0x3C56A8)                ; +0x0, 0x3c56a0\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x3c56a2\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x3c56a4\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x3c56a6\nSUB             SP, SP, #0x14                                          ; +0x8, 0x3c56a8\nMOV             R7, R0                                                 ; +0xa, 0x3c56aa\nLDR             R2, [R3]                                               ; +0xc, 0x3c56ac\nMOV             R6, R1                                                 ; +0xe, 0x3c56ae\nMOV             R4, R3                                                 ; +0x10, 0x3c56b0\nSTR             R2, [SP,#0x14+var_8]                                   ; +0x12, 0x3c56b2\nLDR.W           R2, [R1,#0x164]                                        ; +0x14, 0x3c56b4\nCBZ             R2, loc_3C56DE                                         ; +0x18, 0x3c56b8\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x1a, 0x3c56ba\nADD             R5, SP, #0x14+var_C                                    ; +0x1e, 0x3c56be\nLDR.W           R2, [R6,#0x164]                                        ; +0x20, 0x3c56c0\nMOV             R1, R0; int                                            ; +0x24, 0x3c56c4\nMOV             R0, R5; this                                           ; +0x26, 0x3c56c6\nBL              _ZN20MusicDownloadManager11pathForSongEi; MusicDownloadManager::pathForSong(int) ; +0x28, 0x3c56c8\nMOV             R0, R7; int                                            ; +0x2c, 0x3c56cc\nLDR             R1, [SP,#0x14+var_C]; char *                           ; +0x2e, 0x3c56ce\nADD             R2, SP, #0x14+var_10                                   ; +0x30, 0x3c56d0\nBL              sub_776584                                             ; +0x32, 0x3c56d2\nMOV             R0, R5                                                 ; +0x36, 0x3c56d6\nBL              sub_774008                                             ; +0x38, 0x3c56d8\nB               loc_3C56F2                                             ; +0x3c, 0x3c56dc\nLDR.W           R1, [R1,#0x160]; int                                   ; +0x3e, 0x3c56de\nBL              _ZN10LevelTools16getAudioFileNameEi; LevelTools::getAudioFileName(int) ; +0x42, 0x3c56e2\nB               loc_3C56F2                                             ; +0x46, 0x3c56e6\nMOV             R0, R5                                                 ; +0x48, 0x3c56e8\nBL              sub_774008                                             ; +0x4a, 0x3c56ea\nBL              __cxa_end_cleanup                                      ; +0x4e, 0x3c56ee\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x52, 0x3c56f2\nMOV             R0, R7                                                 ; +0x54, 0x3c56f4\nLDR             R3, [R4]                                               ; +0x56, 0x3c56f6\nCMP             R2, R3                                                 ; +0x58, 0x3c56f8\nBEQ             loc_3C5700                                             ; +0x5a, 0x3c56fa\nBLX             __stack_chk_fail                                       ; +0x5c, 0x3c56fc\nADD             SP, SP, #0x14                                          ; +0x60, 0x3c5700\nPOP             {R4-R7,PC}                                             ; +0x62, 0x3c5702", "xrefs": ["PlayLayer::prepareMusic @ 0x3147ac", "PlayLayer::setupHasCompleted @ 0x31bd2c", "LevelInfoLayer::playStep2 @ 0x3b0fb0", "EditLevelLayer::playStep2 @ 0x3b5f68", "EditLevelLayer::onEdit @ 0x3b7eaa", "EditorPauseLayer::playStep2 @ 0x3ff4cc", "LevelPage::playStep2 @ 0x408f70", "SongSelectNode::getSongFileName @ 0x45e40a", "GJBaseGameLayer::processActivatedAudioTriggers @ 0x48b3b6", "GJWorldNode::playStep2 @ 0x4fc870"], "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"}