{"type": "func", "start": 5370346464, "end": 5370347076, "name": "EditorSoundBrowserLayer::updatePageLabel", "pseudocode": "// \n// EditorSoundBrowserLayer::updatePageLabel from 0x14018fbe0 to 0x14018fe44 (612 bytes)\n// \n// 5 xrefs:\n// > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f43c\n// > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f8ef\n// > EditorSoundBrowserLayer::loadEditorSoundsFinished @ 0x14019049a\n// > EditorSoundBrowserLayer::loadEditorSoundsFailed @ 0x140190549\n// > <???> @ 0x140919250\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:27:42 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall EditorSoundBrowserLayer::updatePageLabel(__int64 a1)\n{\n  int v2; // edi\n  cocos2d::CCArray *v3; // rcx\n  cocos2d::CCArray *v4; // rcx\n  unsigned int v5; // ecx\n  int v6; // edx\n  unsigned int v7; // r8d\n  cocos2d::CCString *v8; // rax\n  char *CString; // rax\n  size_t v10; // r8\n  cocos2d::CCString *v11; // rax\n  void **v12; // rdx\n  __int64 v13; // rdx\n  cocos2d::CCArray *v14; // rcx\n  bool v15; // di\n  __int64 v16; // rcx\n  __int64 v17; // rcx\n  void *v18; // rcx\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int64 v20; // [rsp+40h] [rbp-28h]\n  unsigned __int64 v21; // [rsp+48h] [rbp-20h]\n\n  if ( *(_QWORD *)(a1 + 1048) )\n  {\n    v2 = 10 * *(_DWORD *)(a1 + 1036) + 1;\n    v3 = *(cocos2d::CCArray **)(a1 + 1088);\n    if ( v3 && !cocos2d::CCArray::count(v3) )\n      v2 = 0;\n    v4 = *(cocos2d::CCArray **)(a1 + 1088);\n    if ( v4 )\n      v5 = cocos2d::CCArray::count(v4);\n    else\n      v5 = 0;\n    v6 = *(_DWORD *)(a1 + 1036);\n    v7 = v5 + 10 * v6;\n    *(_OWORD *)Block = 0;\n    v20 = 0;\n    v21 = 15;\n    LOBYTE(Block[0]) = 0;\n    if ( v7 )\n    {\n      if ( *(_DWORD *)(a1 + 1032) < 2u )\n      {\n        v11 = cocos2d::CCString::createWithFormat(\"%d-%d of %d\", v2, v7, *(_DWORD *)(a1 + 1096));\n        CString = (char *)cocos2d::CCString::getCString(v11);\n        v10 = -1;\n        do\n          ++v10;\n        while ( CString[v10] );\n      }\n      else\n      {\n        v8 = cocos2d::CCString::createWithFormat(\"Page %d\", v6 + 1);\n        CString = (char *)cocos2d::CCString::getCString(v8);\n        v10 = -1;\n        do\n          ++v10;\n        while ( CString[v10] );\n      }\n      sub_1400405A0(Block, CString, v10);\n    }\n    else\n    {\n      v20 = 10;\n      strcpy((char *)Block, \"No results\");\n    }\n    v12 = Block;\n    if ( v21 > 0xF )\n      v12 = (void **)Block[0];\n    (**(void (__fastcall ***)(__int64, void **))(*(_QWORD *)(a1 + 1048) + 360LL))(*(_QWORD *)(a1 + 1048) + 360LL, v12);\n    if ( *(_DWORD *)(a1 + 1032) < 2u )\n    {\n      v15 = *(_DWORD *)(a1 + 1096) > 10 * (*(_DWORD *)(a1 + 1036) + 1);\n    }\n    else\n    {\n      v14 = *(cocos2d::CCArray **)(a1 + 1088);\n      v15 = v14 && (int)cocos2d::CCArray::count(v14) >= 10;\n    }\n    v16 = *(_QWORD *)(a1 + 1056);\n    if ( v16 )\n    {\n      LOBYTE(v13) = *(_DWORD *)(a1 + 1036) > 0;\n      (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v16 + 336LL))(v16, v13);\n    }\n    v17 = *(_QWORD *)(a1 + 1064);\n    if ( v17 )\n      (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v17 + 336LL))(v17, v15);\n    if ( v21 > 0xF )\n    {\n      v18 = Block[0];\n      if ( v21 + 1 >= 0x1000 )\n      {\n        v18 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v18 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v18);\n    }\n  }\n}", "assembly": "; \n; EditorSoundBrowserLayer::updatePageLabel from 0x14018fbe0 to 0x14018fe44 (612 bytes)\n; \n; 5 xrefs:\n; > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f43c\n; > EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f8ef\n; > EditorSoundBrowserLayer::loadEditorSoundsFinished @ 0x14019049a\n; > EditorSoundBrowserLayer::loadEditorSoundsFailed @ 0x140190549\n; > <???> @ 0x140919250\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:27:42 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14018fbe0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14018fbe5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14018fbea\npush    rdi                                                            ; +0xf, 0x14018fbef\nsub     rsp, 60h                                                       ; +0x10, 0x14018fbf0\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x14018fbf4\nxor     rax, rsp                                                       ; +0x1b, 0x14018fbfb\nmov     [rsp+68h+var_18], rax                                          ; +0x1e, 0x14018fbfe\nmov     rbx, rcx                                                       ; +0x23, 0x14018fc03\ncmp     qword ptr [rcx+418h], 0                                        ; +0x26, 0x14018fc06\njz      loc_14018FE21                                                  ; +0x2e, 0x14018fc0e\nmov     eax, [rcx+40Ch]                                                ; +0x34, 0x14018fc14\nlea     edx, [rax+rax*4]                                               ; +0x3a, 0x14018fc1a\nlea     edi, ds:1[rdx*2]                                               ; +0x3d, 0x14018fc1d\nmov     rcx, [rcx+440h]                                                ; +0x44, 0x14018fc24\nxor     ebp, ebp                                                       ; +0x4b, 0x14018fc2b\ntest    rcx, rcx                                                       ; +0x4d, 0x14018fc2d\njz      short loc_14018FC3D                                            ; +0x50, 0x14018fc30\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x52, 0x14018fc32\ntest    eax, eax                                                       ; +0x58, 0x14018fc38\ncmovz   edi, ebp                                                       ; +0x5a, 0x14018fc3a\nmov     rcx, [rbx+440h]                                                ; +0x5d, 0x14018fc3d\ntest    rcx, rcx                                                       ; +0x64, 0x14018fc44\njz      short loc_14018FC53                                            ; +0x67, 0x14018fc47\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x69, 0x14018fc49\nmov     ecx, eax                                                       ; +0x6f, 0x14018fc4f\njmp     short loc_14018FC55                                            ; +0x71, 0x14018fc51\nmov     ecx, ebp                                                       ; +0x73, 0x14018fc53\nmov     edx, [rbx+40Ch]                                                ; +0x75, 0x14018fc55\nlea     eax, [rdx+rdx*4]                                               ; +0x7b, 0x14018fc5b\nlea     r8d, [rcx+rax*2]                                               ; +0x7e, 0x14018fc5e\nxorps   xmm0, xmm0                                                     ; +0x82, 0x14018fc62\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x85, 0x14018fc65\nmov     [rsp+68h+var_28], rbp                                          ; +0x8a, 0x14018fc6a\nmov     [rsp+68h+var_20], 0Fh                                          ; +0x8f, 0x14018fc6f\nmov     byte ptr [rsp+68h+Block], bpl                                  ; +0x98, 0x14018fc78\ntest    r8d, r8d                                                       ; +0x9d, 0x14018fc7d\njnz     short loc_14018FCAC                                            ; +0xa0, 0x14018fc80\nmov     [rsp+68h+var_28], 0Ah                                          ; +0xa2, 0x14018fc82\nmovsd   xmm0, qword ptr cs:aNoResults; \"No results\"                    ; +0xab, 0x14018fc8b\nmovsd   [rsp+68h+Block], xmm0                                          ; +0xb3, 0x14018fc93\nmovzx   eax, word ptr cs:aNoResults+8; \"ts\"                            ; +0xb9, 0x14018fc99\nmov     word ptr [rsp+68h+Block+8], ax                                 ; +0xc0, 0x14018fca0\nmov     byte ptr [rsp+68h+Block+0Ah], r8b                              ; +0xc5, 0x14018fca5\njmp     short loc_14018FD29                                            ; +0xca, 0x14018fcaa\nmov     eax, [rbx+408h]                                                ; +0xcc, 0x14018fcac\ntest    eax, eax                                                       ; +0xd2, 0x14018fcb2\njz      short loc_14018FCEC                                            ; +0xd4, 0x14018fcb4\ncmp     eax, 1                                                         ; +0xd6, 0x14018fcb6\njz      short loc_14018FCEC                                            ; +0xd9, 0x14018fcb9\ninc     edx                                                            ; +0xdb, 0x14018fcbb\nlea     rcx, aPageD; \"Page %d\"                                         ; +0xdd, 0x14018fcbd\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xe4, 0x14018fcc4\nmov     rcx, rax                                                       ; +0xea, 0x14018fcca\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xed, 0x14018fccd\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xf3, 0x14018fcd3\nnop     word ptr [rax+rax+00h]                                         ; +0xfa, 0x14018fcda\ninc     r8                                                             ; +0x100, 0x14018fce0\ncmp     byte ptr [rax+r8], 0                                           ; +0x103, 0x14018fce3\njnz     short loc_14018FCE0                                            ; +0x108, 0x14018fce8\njmp     short loc_14018FD1C                                            ; +0x10a, 0x14018fcea\nmov     r9d, [rbx+448h]                                                ; +0x10c, 0x14018fcec\nmov     edx, edi                                                       ; +0x113, 0x14018fcf3\nlea     rcx, aDDOfD; \"%d-%d of %d\"                                     ; +0x115, 0x14018fcf5\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x11c, 0x14018fcfc\nmov     rcx, rax                                                       ; +0x122, 0x14018fd02\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x125, 0x14018fd05\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x12b, 0x14018fd0b\ninc     r8; Size                                                       ; +0x132, 0x14018fd12\ncmp     byte ptr [rax+r8], 0                                           ; +0x135, 0x14018fd15\njnz     short loc_14018FD12                                            ; +0x13a, 0x14018fd1a\nmov     rdx, rax; Src                                                  ; +0x13c, 0x14018fd1c\nlea     rcx, [rsp+68h+Block]; void *                                   ; +0x13f, 0x14018fd1f\ncall    sub_1400405A0                                                  ; +0x144, 0x14018fd24\nmov     rsi, rbx                                                       ; +0x149, 0x14018fd29\nmov     edi, 408h                                                      ; +0x14c, 0x14018fd2c\nlea     rdx, [rsp+68h+Block]                                           ; +0x151, 0x14018fd31\ncmp     [rsp+68h+var_20], 0Fh                                          ; +0x156, 0x14018fd36\ncmova   rdx, [rsp+68h+Block]                                           ; +0x15c, 0x14018fd3c\nmov     rcx, [rbx+418h]                                                ; +0x162, 0x14018fd42\nadd     rcx, 168h                                                      ; +0x169, 0x14018fd49\nmov     rax, [rcx]                                                     ; +0x170, 0x14018fd50\ncall    qword ptr [rax]                                                ; +0x173, 0x14018fd53\nmov     eax, [rdi+rbx]                                                 ; +0x175, 0x14018fd55\ntest    eax, eax                                                       ; +0x178, 0x14018fd58\njz      short loc_14018FD82                                            ; +0x17a, 0x14018fd5a\ncmp     eax, 1                                                         ; +0x17c, 0x14018fd5c\njz      short loc_14018FD82                                            ; +0x17f, 0x14018fd5f\nmov     rcx, [rbx+440h]                                                ; +0x181, 0x14018fd61\ntest    rcx, rcx                                                       ; +0x188, 0x14018fd68\njz      short loc_14018FD7D                                            ; +0x18b, 0x14018fd6b\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x18d, 0x14018fd6d\ncmp     eax, 0Ah                                                       ; +0x193, 0x14018fd73\njl      short loc_14018FD7D                                            ; +0x196, 0x14018fd76\nmov     dil, 1                                                         ; +0x198, 0x14018fd78\njmp     short loc_14018FD99                                            ; +0x19b, 0x14018fd7b\nxor     dil, dil                                                       ; +0x19d, 0x14018fd7d\njmp     short loc_14018FD99                                            ; +0x1a0, 0x14018fd80\nmov     eax, [rbx+40Ch]                                                ; +0x1a2, 0x14018fd82\ninc     eax                                                            ; +0x1a8, 0x14018fd88\nlea     eax, [rax+rax*4]                                               ; +0x1aa, 0x14018fd8a\nadd     eax, eax                                                       ; +0x1ad, 0x14018fd8d\ncmp     [rbx+448h], eax                                                ; +0x1af, 0x14018fd8f\nsetnle  dil                                                            ; +0x1b5, 0x14018fd95\nmov     rcx, [rbx+420h]                                                ; +0x1b9, 0x14018fd99\ntest    rcx, rcx                                                       ; +0x1c0, 0x14018fda0\njz      short loc_14018FDB8                                            ; +0x1c3, 0x14018fda3\ncmp     dword ptr [rbx+40Ch], 0                                        ; +0x1c5, 0x14018fda5\nsetnle  dl                                                             ; +0x1cc, 0x14018fdac\nmov     rax, [rcx]                                                     ; +0x1cf, 0x14018fdaf\ncall    qword ptr [rax+150h]                                           ; +0x1d2, 0x14018fdb2\nmov     rcx, [rbx+428h]                                                ; +0x1d8, 0x14018fdb8\ntest    rcx, rcx                                                       ; +0x1df, 0x14018fdbf\njz      short loc_14018FDD2                                            ; +0x1e2, 0x14018fdc2\nmov     rax, [rcx]                                                     ; +0x1e4, 0x14018fdc4\nmovzx   edx, dil                                                       ; +0x1e7, 0x14018fdc7\ncall    qword ptr [rax+150h]                                           ; +0x1eb, 0x14018fdcb\nnop                                                                    ; +0x1f1, 0x14018fdd1\nmov     rdx, [rsp+68h+var_20]                                          ; +0x1f2, 0x14018fdd2\ncmp     rdx, 0Fh                                                       ; +0x1f7, 0x14018fdd7\njbe     short loc_14018FE21                                            ; +0x1fb, 0x14018fddb\ninc     rdx                                                            ; +0x1fd, 0x14018fddd\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x200, 0x14018fde0\nmov     rax, rcx                                                       ; +0x205, 0x14018fde5\ncmp     rdx, 1000h                                                     ; +0x208, 0x14018fde8\njb      short loc_14018FE1C                                            ; +0x20f, 0x14018fdef\nadd     rdx, 27h ; '''                                                 ; +0x211, 0x14018fdf1\nmov     rcx, [rcx-8]                                                   ; +0x215, 0x14018fdf5\nsub     rax, rcx                                                       ; +0x219, 0x14018fdf9\nsub     rax, 8                                                         ; +0x21c, 0x14018fdfc\ncmp     rax, 1Fh                                                       ; +0x220, 0x14018fe00\njbe     short loc_14018FE1C                                            ; +0x224, 0x14018fe04\nmov     [rsp+68h+Reserved], rbp; Reserved                              ; +0x226, 0x14018fe06\nxor     r9d, r9d; LineNo                                               ; +0x22b, 0x14018fe0b\nxor     r8d, r8d; FileName                                             ; +0x22e, 0x14018fe0e\nxor     edx, edx; FunctionName                                         ; +0x231, 0x14018fe11\nxor     ecx, ecx; Expression                                           ; +0x233, 0x14018fe13\ncall    cs:_invoke_watson                                              ; +0x235, 0x14018fe15\nalign 4                                                                ; +0x23b, 0x14018fe1b\ncall    j_j_free                                                       ; +0x23c, 0x14018fe1c\nmov     rcx, [rsp+68h+var_18]                                          ; +0x241, 0x14018fe21\nxor     rcx, rsp; StackCookie                                          ; +0x246, 0x14018fe26\ncall    __security_check_cookie                                        ; +0x249, 0x14018fe29\nlea     r11, [rsp+68h+var_8]                                           ; +0x24e, 0x14018fe2e\nmov     rbx, [r11+18h]                                                 ; +0x253, 0x14018fe33\nmov     rbp, [r11+20h]                                                 ; +0x257, 0x14018fe37\nmov     rsi, [r11+28h]                                                 ; +0x25b, 0x14018fe3b\nmov     rsp, r11                                                       ; +0x25f, 0x14018fe3f\npop     rdi                                                            ; +0x262, 0x14018fe42\nretn                                                                   ; +0x263, 0x14018fe43", "xrefs": ["EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f43c", "EditorSoundBrowserLayer::loadCurrentPage @ 0x14018f8ef", "EditorSoundBrowserLayer::loadEditorSoundsFinished @ 0x14019049a", "EditorSoundBrowserLayer::loadEditorSoundsFailed @ 0x140190549", "<???> @ 0x140919250"], "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"}