{"type": "func", "start": 5370203888, "end": 5370204078, "name": "GJGameLevel::getAudioFileName", "pseudocode": "// \n// GJGameLevel::getAudioFileName from 0x14016cef0 to 0x14016cfae (190 bytes)\n// \n// 11 xrefs:\n// > SongSelectNode::getSongFileName @ 0x1400c7e72\n// > EditLevelLayer::playStep2 @ 0x1400d8032\n// > EditLevelLayer::onEdit @ 0x1400d8363\n// > EditorPauseLayer::playStep2 @ 0x1400ddfd0\n// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x140243e8a\n// > LevelInfoLayer::playStep2 @ 0x1402fd0d2\n// > LevelPage::playStep2 @ 0x14031dc32\n// > PlayLayer::setupHasCompleted @ 0x1403a6b61\n// > PlayLayer::prepareMusic @ 0x1403ba931\n// > <???> @ 0x1406cadd0\n// > <???> @ 0x1406caddc\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\n// Hidden C++ exception states: #wind=1\n_QWORD *__fastcall GJGameLevel::getAudioFileName(__int64 a1, _QWORD *a2)\n{\n  unsigned int v3; // edi\n  MusicDownloadManager *v4; // rax\n  _QWORD *v5; // rax\n  size_t v6; // r8\n  _BYTE v8[32]; // [rsp+30h] [rbp-38h] BYREF\n\n  v3 = *(_DWORD *)(a1 + 672);\n  if ( v3 )\n  {\n    v4 = MusicDownloadManager::sharedState();\n    v5 = (_QWORD *)MusicDownloadManager::pathForSong(v4, v8, v3);\n    if ( v5[3] > 0xFu )\n      v5 = (_QWORD *)*v5;\n    *(_OWORD *)a2 = 0;\n    a2[2] = 0;\n    a2[3] = 0;\n    v6 = -1;\n    do\n      ++v6;\n    while ( *((_BYTE *)v5 + v6) );\n    sub_14003A930(a2, v5, v6);\n    sub_14003A830((__int64)v8);\n  }\n  else\n  {\n    LevelTools::getAudioFileName(a2, *(unsigned int *)(a1 + 668));\n  }\n  return a2;\n}", "assembly": "; \n; GJGameLevel::getAudioFileName from 0x14016cef0 to 0x14016cfae (190 bytes)\n; \n; 11 xrefs:\n; > SongSelectNode::getSongFileName @ 0x1400c7e72\n; > EditLevelLayer::playStep2 @ 0x1400d8032\n; > EditLevelLayer::onEdit @ 0x1400d8363\n; > EditorPauseLayer::playStep2 @ 0x1400ddfd0\n; > GJBaseGameLayer::processActivatedAudioTriggers @ 0x140243e8a\n; > LevelInfoLayer::playStep2 @ 0x1402fd0d2\n; > LevelPage::playStep2 @ 0x14031dc32\n; > PlayLayer::setupHasCompleted @ 0x1403a6b61\n; > PlayLayer::prepareMusic @ 0x1403ba931\n; > <???> @ 0x1406cadd0\n; > <???> @ 0x1406caddc\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14016cef0\npush    rdi                                                            ; +0x5, 0x14016cef5\nsub     rsp, 60h                                                       ; +0x6, 0x14016cef6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14016cefa\nxor     rax, rsp                                                       ; +0x11, 0x14016cf01\nmov     [rsp+68h+var_18], rax                                          ; +0x14, 0x14016cf04\nmov     rbx, rdx                                                       ; +0x19, 0x14016cf09\nmov     [rsp+68h+var_40], rdx                                          ; +0x1c, 0x14016cf0c\nmov     edi, [rcx+2A0h]                                                ; +0x21, 0x14016cf11\ntest    edi, edi                                                       ; +0x27, 0x14016cf17\njz      short loc_14016CF82                                            ; +0x29, 0x14016cf19\ncall    MusicDownloadManager__sharedState                              ; +0x2b, 0x14016cf1b\nmov     rcx, rax                                                       ; +0x30, 0x14016cf20\nmov     r8d, edi                                                       ; +0x33, 0x14016cf23\nlea     rdx, [rsp+68h+var_38]                                          ; +0x36, 0x14016cf26\ncall    MusicDownloadManager__pathForSong                              ; +0x3b, 0x14016cf2b\nnop                                                                    ; +0x40, 0x14016cf30\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x41, 0x14016cf31\njbe     short loc_14016CF3B                                            ; +0x46, 0x14016cf36\nmov     rax, [rax]                                                     ; +0x48, 0x14016cf38\nxorps   xmm0, xmm0                                                     ; +0x4b, 0x14016cf3b\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x4e, 0x14016cf3e\nmov     qword ptr [rbx+10h], 0                                         ; +0x51, 0x14016cf41\nmov     qword ptr [rbx+18h], 0                                         ; +0x59, 0x14016cf49\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x61, 0x14016cf51\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x68, 0x14016cf58\ninc     r8                                                             ; +0x70, 0x14016cf60\ncmp     byte ptr [rax+r8], 0                                           ; +0x73, 0x14016cf63\njnz     short loc_14016CF60                                            ; +0x78, 0x14016cf68\nmov     rdx, rax                                                       ; +0x7a, 0x14016cf6a\nmov     rcx, rbx                                                       ; +0x7d, 0x14016cf6d\ncall    sub_14003A930                                                  ; +0x80, 0x14016cf70\nnop                                                                    ; +0x85, 0x14016cf75\nlea     rcx, [rsp+68h+var_38]                                          ; +0x86, 0x14016cf76\ncall    sub_14003A830                                                  ; +0x8b, 0x14016cf7b\njmp     short loc_14016CF90                                            ; +0x90, 0x14016cf80\nmov     edx, [rcx+29Ch]                                                ; +0x92, 0x14016cf82\nmov     rcx, rbx                                                       ; +0x98, 0x14016cf88\ncall    LevelTools__getAudioFileName                                   ; +0x9b, 0x14016cf8b\nmov     rax, rbx                                                       ; +0xa0, 0x14016cf90\nmov     rcx, [rsp+68h+var_18]                                          ; +0xa3, 0x14016cf93\nxor     rcx, rsp; StackCookie                                          ; +0xa8, 0x14016cf98\ncall    __security_check_cookie                                        ; +0xab, 0x14016cf9b\nmov     rbx, [rsp+68h+arg_10]                                          ; +0xb0, 0x14016cfa0\nadd     rsp, 60h                                                       ; +0xb8, 0x14016cfa8\npop     rdi                                                            ; +0xbc, 0x14016cfac\nretn                                                                   ; +0xbd, 0x14016cfad", "xrefs": ["SongSelectNode::getSongFileName @ 0x1400c7e72", "EditLevelLayer::playStep2 @ 0x1400d8032", "EditLevelLayer::onEdit @ 0x1400d8363", "EditorPauseLayer::playStep2 @ 0x1400ddfd0", "GJBaseGameLayer::processActivatedAudioTriggers @ 0x140243e8a", "LevelInfoLayer::playStep2 @ 0x1402fd0d2", "LevelPage::playStep2 @ 0x14031dc32", "PlayLayer::setupHasCompleted @ 0x1403a6b61", "PlayLayer::prepareMusic @ 0x1403ba931", "<???> @ 0x1406cadd0", "<???> @ 0x1406caddc"], "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"}