{"type": "func", "start": 4298186500, "end": 4298186672, "name": "GameManager::getMenuMusicFile", "pseudocode": "// \n// GameManager::getMenuMusicFile from 0x100311f04 to 0x100311fb0 (172 bytes)\n// \n// 2 xrefs:\n// > GameManager::playMenuMusic @ 0x1003120dc\n// > GameManager::fadeInMenuMusic @ 0x100312324\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 __usercall GameManager::getMenuMusicFile(__int64 a1@<X0>, _QWORD *a2@<X8>)\n{\n  MusicDownloadManager *v4; // x0\n  std::string *p_p; // x1\n  std::string __p; // [xsp+8h] [xbp-28h] BYREF\n\n  if ( *(int *)(a1 + 1048) < 1 )\n    goto LABEL_11;\n  v4 = MusicDownloadManager::sharedState();\n  if ( !MusicDownloadManager::isSongDownloaded(v4, *(_DWORD *)(a1 + 1048)) )\n  {\n    *(_DWORD *)(a1 + 1048) = 0;\n    goto LABEL_11;\n  }\n  if ( *(int *)(a1 + 1048) < 1 )\n  {\nLABEL_11:\n    sub_100009900(a2, \"menuLoop.mp3\");\n    return;\n  }\n  MusicDownloadManager::sharedState();\n  MusicDownloadManager::pathForSong(*(unsigned int *)(a1 + 1048), &__p);\n  if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n    p_p = &__p;\n  else\n    p_p = (std::string *)__p.__r_.__value_.__r.__words[0];\n  sub_100009900(a2, (char *)p_p);\n  if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__p.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; GameManager::getMenuMusicFile from 0x100311f04 to 0x100311fb0 (172 bytes)\n; \n; 2 xrefs:\n; > GameManager::playMenuMusic @ 0x1003120dc\n; > GameManager::fadeInMenuMusic @ 0x100312324\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x100311f04\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x100311f08\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x100311f0c\nADD             X29, SP, #0x30                                         ; +0xc, 0x100311f10\nMOV             X19, X8                                                ; +0x10, 0x100311f14\nLDR             W8, [X0,#0x418]                                        ; +0x14, 0x100311f18\nCMP             W8, #1                                                 ; +0x18, 0x100311f1c\nB.LT            loc_100311F94                                          ; +0x1c, 0x100311f20\nMOV             X20, X0                                                ; +0x20, 0x100311f24\nBL              MusicDownloadManager__sharedState                      ; +0x24, 0x100311f28\nLDR             W1, [X20,#0x418]                                       ; +0x28, 0x100311f2c\nBL              MusicDownloadManager__isSongDownloaded                 ; +0x2c, 0x100311f30\nTBZ             W0, #0, loc_100311F90                                  ; +0x30, 0x100311f34\nLDR             W8, [X20,#0x418]                                       ; +0x34, 0x100311f38\nCMP             W8, #1                                                 ; +0x38, 0x100311f3c\nB.LT            loc_100311F94                                          ; +0x3c, 0x100311f40\nBL              MusicDownloadManager__sharedState                      ; +0x40, 0x100311f44\nLDR             W1, [X20,#0x418]                                       ; +0x44, 0x100311f48\nADD             X20, SP, #0x30+__p                                     ; +0x48, 0x100311f4c\nADD             X8, SP, #0x30+__p                                      ; +0x4c, 0x100311f50\nBL              MusicDownloadManager__pathForSong                      ; +0x50, 0x100311f54\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0x54, 0x100311f58\nLDR             X9, [SP,#0x30+__p]                                     ; +0x58, 0x100311f5c\nCMP             W8, #0                                                 ; +0x5c, 0x100311f60\nCSEL            X1, X9, X20, LT; __s                                   ; +0x60, 0x100311f64\nMOV             X0, X19; int                                           ; +0x64, 0x100311f68\nBL              sub_100009900                                          ; +0x68, 0x100311f6c\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0x6c, 0x100311f70\nTBZ             W8, #0x1F, loc_100311F80                               ; +0x70, 0x100311f74\nLDR             X0, [SP,#0x30+__p]; __p                                ; +0x74, 0x100311f78\nBL              __ZdlPv; operator delete(void *)                       ; +0x78, 0x100311f7c\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x7c, 0x100311f80\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x80, 0x100311f84\nADD             SP, SP, #0x40 ; '@'                                    ; +0x84, 0x100311f88\nRET                                                                    ; +0x88, 0x100311f8c\nSTR             WZR, [X20,#0x418]                                      ; +0x8c, 0x100311f90\nADRL            X1, aMenuloopMp3; \"menuLoop.mp3\"                       ; +0x90, 0x100311f94\nMOV             X0, X19; int                                           ; +0x98, 0x100311f9c\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x9c, 0x100311fa0\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xa0, 0x100311fa4\nADD             SP, SP, #0x40 ; '@'                                    ; +0xa4, 0x100311fa8\nB               sub_100009900                                          ; +0xa8, 0x100311fac", "xrefs": ["GameManager::playMenuMusic @ 0x1003120dc", "GameManager::fadeInMenuMusic @ 0x100312324"], "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"}