{"type": "func", "start": 5373164528, "end": 5373164875, "name": "MoreSearchLayer::selectSong", "pseudocode": "// \n// MoreSearchLayer::selectSong from 0x14043fbf0 to 0x14043fd4b (347 bytes)\n// \n// 4 xrefs:\n// > MoreSearchLayer::onSongFilter @ 0x14043f649\n// > MoreSearchLayer::audioNext @ 0x14043fa8c\n// > MoreSearchLayer::audioPrevious @ 0x14043fbcc\n// > <???> @ 0x140927038\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:32:21 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall MoreSearchLayer::selectSong(__int64 a1, int a2)\n{\n  int v2; // edi\n  __int64 v4; // rbx\n  __int64 v5; // rbx\n  struct cocos2d::CCString *v6; // rax\n  void *v7; // rcx\n  void *v8; // [rsp+30h] [rbp-38h]\n  void *Block[2]; // [rsp+38h] [rbp-30h] BYREF\n  __int64 v10; // [rsp+48h] [rbp-20h]\n  unsigned __int64 v11; // [rsp+50h] [rbp-18h]\n\n  v2 = a2;\n  if ( a2 > 22 )\n    v2 = 22;\n  if ( v2 < 1 )\n    v2 = 1;\n  v4 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v8 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v8);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v4 = *(_QWORD *)&qword_14090BFB0;\n  }\n  v10 = 11;\n  v11 = 15;\n  Block[0] = (void *)0x6C69665F676E6F73LL;\n  Block[1] = (void *)7497076;\n  v5 = *(_QWORD *)(v4 + 848);\n  v6 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)v2);\n  cocos2d::CCDictionary::setObject(v5, v6, Block);\n  if ( v11 > 0xF )\n  {\n    v7 = Block[0];\n    if ( v11 + 1 >= 0x1000 )\n    {\n      v7 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v7);\n  }\n  MoreSearchLayer::updateAudioLabel(a1);\n}", "assembly": "; \n; MoreSearchLayer::selectSong from 0x14043fbf0 to 0x14043fd4b (347 bytes)\n; \n; 4 xrefs:\n; > MoreSearchLayer::onSongFilter @ 0x14043f649\n; > MoreSearchLayer::audioNext @ 0x14043fa8c\n; > MoreSearchLayer::audioPrevious @ 0x14043fbcc\n; > <???> @ 0x140927038\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:32:21 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14043fbf0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x14043fbf5\npush    rdi                                                            ; +0xa, 0x14043fbfa\nsub     rsp, 60h                                                       ; +0xb, 0x14043fbfb\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x14043fbff\nxor     rax, rsp                                                       ; +0x16, 0x14043fc06\nmov     [rsp+68h+var_10], rax                                          ; +0x19, 0x14043fc09\nmov     edi, edx                                                       ; +0x1e, 0x14043fc0e\nmov     rsi, rcx                                                       ; +0x20, 0x14043fc10\nmov     eax, 16h                                                       ; +0x23, 0x14043fc13\ncmp     edx, eax                                                       ; +0x28, 0x14043fc18\ncmovg   edi, eax                                                       ; +0x2a, 0x14043fc1a\nmov     eax, 1                                                         ; +0x2d, 0x14043fc1d\ncmp     edi, eax                                                       ; +0x32, 0x14043fc22\ncmovl   edi, eax                                                       ; +0x34, 0x14043fc24\nmov     rbx, cs:qword_14090BFB0                                        ; +0x37, 0x14043fc27\ntest    rbx, rbx                                                       ; +0x3e, 0x14043fc2e\njnz     short loc_14043FC65                                            ; +0x41, 0x14043fc31\nmov     ecx, 690h; Size                                                ; +0x43, 0x14043fc33\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x48, 0x14043fc38\nmov     [rsp+68h+var_38], rax                                          ; +0x4d, 0x14043fc3d\nmov     rcx, rax                                                       ; +0x52, 0x14043fc42\ncall    GameLevelManager__GameLevelManager                             ; +0x55, 0x14043fc45\nnop                                                                    ; +0x5a, 0x14043fc4a\nmov     cs:qword_14090BFB0, rax                                        ; +0x5b, 0x14043fc4b\nmov     rcx, [rax]                                                     ; +0x62, 0x14043fc52\nmov     rdx, [rcx+48h]                                                 ; +0x65, 0x14043fc55\nmov     rcx, rax                                                       ; +0x69, 0x14043fc59\ncall    rdx                                                            ; +0x6c, 0x14043fc5c\nmov     rbx, cs:qword_14090BFB0                                        ; +0x6e, 0x14043fc5e\nxorps   xmm0, xmm0                                                     ; +0x75, 0x14043fc65\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x78, 0x14043fc68\nmov     [rsp+68h+var_20], 0Bh                                          ; +0x7d, 0x14043fc6d\nmov     [rsp+68h+var_18], 0Fh                                          ; +0x86, 0x14043fc76\nmovsd   xmm0, cs:qword_140790130                                       ; +0x8f, 0x14043fc7f\nmovsd   [rsp+68h+Block], xmm0                                          ; +0x97, 0x14043fc87\nmovzx   eax, cs:word_140790138                                         ; +0x9d, 0x14043fc8d\nmov     word ptr [rsp+68h+Block+8], ax                                 ; +0xa4, 0x14043fc94\nmovzx   eax, cs:byte_14079013A                                         ; +0xa9, 0x14043fc99\nmov     byte ptr [rsp+68h+Block+0Ah], al                               ; +0xb0, 0x14043fca0\nmov     byte ptr [rsp+68h+Block+0Bh], 0                                ; +0xb4, 0x14043fca4\nmov     rbx, [rbx+350h]                                                ; +0xb9, 0x14043fca9\nmov     edx, edi                                                       ; +0xc0, 0x14043fcb0\nlea     rcx, word_1406ED6F8                                            ; +0xc2, 0x14043fcb2\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xc9, 0x14043fcb9\nmov     rdx, rax                                                       ; +0xcf, 0x14043fcbf\nlea     r8, [rsp+68h+Block]                                            ; +0xd2, 0x14043fcc2\nmov     rcx, rbx                                                       ; +0xd7, 0x14043fcc7\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0xda, 0x14043fcca\nnop                                                                    ; +0xe0, 0x14043fcd0\nmov     rdx, [rsp+68h+var_18]                                          ; +0xe1, 0x14043fcd1\ncmp     rdx, 0Fh                                                       ; +0xe6, 0x14043fcd6\njbe     short loc_14043FD24                                            ; +0xea, 0x14043fcda\ninc     rdx                                                            ; +0xec, 0x14043fcdc\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0xef, 0x14043fcdf\nmov     rax, rcx                                                       ; +0xf4, 0x14043fce4\ncmp     rdx, 1000h                                                     ; +0xf7, 0x14043fce7\njb      short loc_14043FD1F                                            ; +0xfe, 0x14043fcee\nadd     rdx, 27h ; '''                                                 ; +0x100, 0x14043fcf0\nmov     rcx, [rcx-8]                                                   ; +0x104, 0x14043fcf4\nsub     rax, rcx                                                       ; +0x108, 0x14043fcf8\nsub     rax, 8                                                         ; +0x10b, 0x14043fcfb\ncmp     rax, 1Fh                                                       ; +0x10f, 0x14043fcff\njbe     short loc_14043FD1F                                            ; +0x113, 0x14043fd03\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x115, 0x14043fd05\nxor     r9d, r9d; LineNo                                               ; +0x11e, 0x14043fd0e\nxor     r8d, r8d; FileName                                             ; +0x121, 0x14043fd11\nxor     edx, edx; FunctionName                                         ; +0x124, 0x14043fd14\nxor     ecx, ecx; Expression                                           ; +0x126, 0x14043fd16\ncall    cs:_invoke_watson                                              ; +0x128, 0x14043fd18\ndb 0CCh                                                                ; +0x12e, 0x14043fd1e\ncall    j_j_free                                                       ; +0x12f, 0x14043fd1f\nmov     rcx, rsi                                                       ; +0x134, 0x14043fd24\ncall    MoreSearchLayer__updateAudioLabel                              ; +0x137, 0x14043fd27\nmov     rcx, [rsp+68h+var_10]                                          ; +0x13c, 0x14043fd2c\nxor     rcx, rsp; StackCookie                                          ; +0x141, 0x14043fd31\ncall    __security_check_cookie                                        ; +0x144, 0x14043fd34\nlea     r11, [rsp+68h+var_8]                                           ; +0x149, 0x14043fd39\nmov     rbx, [r11+20h]                                                 ; +0x14e, 0x14043fd3e\nmov     rsi, [r11+28h]                                                 ; +0x152, 0x14043fd42\nmov     rsp, r11                                                       ; +0x156, 0x14043fd46\npop     rdi                                                            ; +0x159, 0x14043fd49\nretn                                                                   ; +0x15a, 0x14043fd4a", "xrefs": ["MoreSearchLayer::onSongFilter @ 0x14043f649", "MoreSearchLayer::audioNext @ 0x14043fa8c", "MoreSearchLayer::audioPrevious @ 0x14043fbcc", "<???> @ 0x140927038"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}