{"type": "func", "start": 5372113216, "end": 5372113481, "name": "MusicDownloadManager::getSongInfoObject", "pseudocode": "// \n// MusicDownloadManager::getSongInfoObject from 0x14033f140 to 0x14033f249 (265 bytes)\n// \n// 12 xrefs:\n// > AudioAssetsBrowser::setupList @ 0x140083e7c\n// > FindBPMLayer::create @ 0x14009ba37\n// > FindBPMLayer::recordingDidStop @ 0x14009bce8\n// > LevelCell::loadCustomLevelCell @ 0x1400af3d7\n// > SongSelectNode::init @ 0x1400c75ef\n// > CustomSongWidget::onMore @ 0x1400ca2a3\n// > MusicDownloadManager::getSongInfo @ 0x14033d610\n// > MusicDownloadManager::downloadSong @ 0x14033eab8\n// > MusicDownloadManager::onDownloadSongCompleted @ 0x14033ee15\n// > SongInfoObject::create_1 @ 0x14034474e\n// > PlayLayer::setupHasCompleted @ 0x1403a6cb7\n// > <???> @ 0x1406d56c0\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\nSongInfoObject *MusicDownloadManager::getSongInfoObject(MusicDownloadManager *a1, int a2)\n{\n  __int64 v2; // rdi\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // r8\n  SongInfoObject *v7; // rbx\n  void *v8; // rcx\n  cocos2d::CCDictionary *m_musicObjects; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v12; // [rsp+30h] [rbp-28h]\n\n  v2 = a2;\n  v4 = cocos2d::CCString::createWithFormat(\"%i\", (unsigned int)a2);\n  CString = cocos2d::CCString::getCString(v4);\n  *(_OWORD *)Block = 0;\n  v12 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( CString[v6] );\n  sub_14003A930(Block, CString, v6);\n  v7 = (SongInfoObject *)cocos2d::CCDictionary::objectForKey(a1->m_songObjects, Block);\n  if ( *((_QWORD *)&v12 + 1) > 0xFu )\n  {\n    v8 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v12 + 1) + 1LL) >= 0x1000 )\n    {\n      v8 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v8);\n  }\n  if ( v7 || (int)v2 <= 10000000 )\n    return v7;\n  m_musicObjects = a1->m_musicObjects;\n  if ( m_musicObjects )\n    return (SongInfoObject *)cocos2d::CCDictionary::objectForKey(m_musicObjects, v2);\n  else\n    return nullptr;\n}", "assembly": "; \n; MusicDownloadManager::getSongInfoObject from 0x14033f140 to 0x14033f249 (265 bytes)\n; \n; 12 xrefs:\n; > AudioAssetsBrowser::setupList @ 0x140083e7c\n; > FindBPMLayer::create @ 0x14009ba37\n; > FindBPMLayer::recordingDidStop @ 0x14009bce8\n; > LevelCell::loadCustomLevelCell @ 0x1400af3d7\n; > SongSelectNode::init @ 0x1400c75ef\n; > CustomSongWidget::onMore @ 0x1400ca2a3\n; > MusicDownloadManager::getSongInfo @ 0x14033d610\n; > MusicDownloadManager::downloadSong @ 0x14033eab8\n; > MusicDownloadManager::onDownloadSongCompleted @ 0x14033ee15\n; > SongInfoObject::create_1 @ 0x14034474e\n; > PlayLayer::setupHasCompleted @ 0x1403a6cb7\n; > <???> @ 0x1406d56c0\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, 0x14033f140\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x14033f145\npush    rdi                                                            ; +0xa, 0x14033f14a\nsub     rsp, 50h                                                       ; +0xb, 0x14033f14b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x14033f14f\nxor     rax, rsp                                                       ; +0x16, 0x14033f156\nmov     [rsp+58h+var_18], rax                                          ; +0x19, 0x14033f159\nmovsxd  rdi, edx                                                       ; +0x1e, 0x14033f15e\nmov     rsi, rcx                                                       ; +0x21, 0x14033f161\nmov     edx, edi                                                       ; +0x24, 0x14033f164\nlea     rcx, aI_11; \"%i\"                                               ; +0x26, 0x14033f166\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x2d, 0x14033f16d\nmov     rcx, rax                                                       ; +0x33, 0x14033f173\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x36, 0x14033f176\nxorps   xmm0, xmm0                                                     ; +0x3c, 0x14033f17c\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x3f, 0x14033f17f\nxorps   xmm1, xmm1                                                     ; +0x44, 0x14033f184\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x47, 0x14033f187\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x4d, 0x14033f18d\ninc     r8                                                             ; +0x54, 0x14033f194\ncmp     byte ptr [rax+r8], 0                                           ; +0x57, 0x14033f197\njnz     short loc_14033F194                                            ; +0x5c, 0x14033f19c\nmov     rdx, rax                                                       ; +0x5e, 0x14033f19e\nlea     rcx, [rsp+58h+Block]                                           ; +0x61, 0x14033f1a1\ncall    sub_14003A930                                                  ; +0x66, 0x14033f1a6\nnop                                                                    ; +0x6b, 0x14033f1ab\nlea     rdx, [rsp+58h+Block]                                           ; +0x6c, 0x14033f1ac\nmov     rcx, [rsi+158h]                                                ; +0x71, 0x14033f1b1\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x78, 0x14033f1b8\nmov     rbx, rax                                                       ; +0x7e, 0x14033f1be\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x81, 0x14033f1c1\ncmp     rdx, 0Fh                                                       ; +0x86, 0x14033f1c6\njbe     short loc_14033F201                                            ; +0x8a, 0x14033f1ca\ninc     rdx                                                            ; +0x8c, 0x14033f1cc\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x8f, 0x14033f1cf\nmov     rax, rcx                                                       ; +0x94, 0x14033f1d4\ncmp     rdx, 1000h                                                     ; +0x97, 0x14033f1d7\njb      short loc_14033F1FC                                            ; +0x9e, 0x14033f1de\nadd     rdx, 27h ; '''                                                 ; +0xa0, 0x14033f1e0\nmov     rcx, [rcx-8]                                                   ; +0xa4, 0x14033f1e4\nsub     rax, rcx                                                       ; +0xa8, 0x14033f1e8\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xab, 0x14033f1eb\ncmp     rax, 1Fh                                                       ; +0xaf, 0x14033f1ef\njbe     short loc_14033F1FC                                            ; +0xb3, 0x14033f1f3\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb5, 0x14033f1f5\nalign 4                                                                ; +0xbb, 0x14033f1fb\ncall    j_j_free                                                       ; +0xbc, 0x14033f1fc\ntest    rbx, rbx                                                       ; +0xc1, 0x14033f201\njnz     short loc_14033F229                                            ; +0xc4, 0x14033f204\ncmp     edi, 989680h                                                   ; +0xc6, 0x14033f206\njle     short loc_14033F229                                            ; +0xcc, 0x14033f20c\nmov     rcx, [rsi+1B0h]                                                ; +0xce, 0x14033f20e\ntest    rcx, rcx                                                       ; +0xd5, 0x14033f215\njz      short loc_14033F225                                            ; +0xd8, 0x14033f218\nmov     rdx, rdi                                                       ; +0xda, 0x14033f21a\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0xdd, 0x14033f21d\njmp     short loc_14033F22C                                            ; +0xe3, 0x14033f223\nxor     eax, eax                                                       ; +0xe5, 0x14033f225\njmp     short loc_14033F22C                                            ; +0xe7, 0x14033f227\nmov     rax, rbx                                                       ; +0xe9, 0x14033f229\nmov     rcx, [rsp+58h+var_18]                                          ; +0xec, 0x14033f22c\nxor     rcx, rsp; StackCookie                                          ; +0xf1, 0x14033f231\ncall    __security_check_cookie                                        ; +0xf4, 0x14033f234\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xf9, 0x14033f239\nmov     rsi, [rsp+58h+arg_18]                                          ; +0xfe, 0x14033f23e\nadd     rsp, 50h                                                       ; +0x103, 0x14033f243\npop     rdi                                                            ; +0x107, 0x14033f247\nretn                                                                   ; +0x108, 0x14033f248", "xrefs": ["AudioAssetsBrowser::setupList @ 0x140083e7c", "FindBPMLayer::create @ 0x14009ba37", "FindBPMLayer::recordingDidStop @ 0x14009bce8", "LevelCell::loadCustomLevelCell @ 0x1400af3d7", "SongSelectNode::init @ 0x1400c75ef", "CustomSongWidget::onMore @ 0x1400ca2a3", "MusicDownloadManager::getSongInfo @ 0x14033d610", "MusicDownloadManager::downloadSong @ 0x14033eab8", "MusicDownloadManager::onDownloadSongCompleted @ 0x14033ee15", "SongInfoObject::create_1 @ 0x14034474e", "PlayLayer::setupHasCompleted @ 0x1403a6cb7", "<???> @ 0x1406d56c0"], "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"}