{"type": "func", "start": 5370979936, "end": 5370980520, "name": "GameLevelManager::getLengthStr", "pseudocode": "// \n// GameLevelManager::getLengthStr from 0x14022a660 to 0x14022a8a8 (584 bytes)\n// \n// 2 xrefs:\n// > LevelSearchLayer::getSearchObject @ 0x14043873c\n// > <???> @ 0x14091bdc4\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:28:28 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n_QWORD *__fastcall GameLevelManager::getLengthStr(\n        __int64 a1,\n        _QWORD *a2,\n        char a3,\n        char a4,\n        char a5,\n        char a6,\n        char a7,\n        char a8)\n{\n  int v11; // ebp\n  __int64 v12; // rdx\n  int v13; // esi\n  size_t v14; // rdi\n  char v15; // al\n  cocos2d::CCString *v16; // rax\n  char *CString; // rax\n  size_t v18; // r8\n  cocos2d::CCString *v19; // rax\n  const char *v20; // rax\n  void **v21; // rcx\n  __int64 v22; // rdi\n  size_t v23; // r8\n  __int128 Buf2; // [rsp+28h] [rbp-80h] BYREF\n  __int64 v26; // [rsp+38h] [rbp-70h]\n  __int64 v27; // [rsp+40h] [rbp-68h]\n  _QWORD *v28; // [rsp+48h] [rbp-60h]\n  void *Buf1[2]; // [rsp+50h] [rbp-58h] BYREF\n  __int128 v30; // [rsp+60h] [rbp-48h]\n\n  v28 = a2;\n  *(_OWORD *)Buf1 = 0;\n  *(_QWORD *)&v30 = 0;\n  *((_QWORD *)&v30 + 1) = 15;\n  LOBYTE(Buf1[0]) = 0;\n  v11 = 0;\n  v12 = 0;\n  v13 = 0;\n  v14 = -1;\n  do\n  {\n    switch ( v13 )\n    {\n      case 0:\n        v15 = a3;\n        break;\n      case 1:\n        v15 = a4;\n        break;\n      case 2:\n        v15 = a5;\n        break;\n      case 3:\n        v15 = a6;\n        break;\n      case 4:\n        v15 = a7;\n        break;\n      case 5:\n        v15 = a8;\n        break;\n    }\n    if ( v15 )\n    {\n      if ( v11 > 0 )\n        sub_140044D80(Buf1, byte_14070ECF8, 1u);\n      v16 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)v13);\n      CString = (char *)cocos2d::CCString::getCString(v16);\n      v18 = -1;\n      do\n        ++v18;\n      while ( CString[v18] );\n      sub_140044D80(Buf1, CString, v18);\n      ++v11;\n      v12 = (unsigned int)v13;\n    }\n    ++v13;\n  }\n  while ( v13 <= 5 );\n  if ( v11 == 1 )\n  {\n    v19 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v12);\n    v20 = cocos2d::CCString::getCString(v19);\n    *(_OWORD *)a2 = 0;\n    a2[2] = 0;\n    a2[3] = 0;\n    do\n      ++v14;\n    while ( v20[v14] );\n    sub_14003D230(a2, v20, v14);\n    sub_14003D310((__int64)Buf1);\n  }\n  else\n  {\n    Buf2 = 0;\n    v26 = 0;\n    v27 = 15;\n    LOBYTE(Buf2) = 0;\n    v21 = Buf1;\n    if ( *((_QWORD *)&v30 + 1) > 0xFu )\n      v21 = (void **)Buf1[0];\n    v22 = v30;\n    v23 = v30;\n    if ( (_QWORD)v30 )\n      v23 = 0;\n    if ( memcmp(v21, &Buf2, v23) || v22 )\n    {\n      *(_OWORD *)a2 = *(_OWORD *)Buf1;\n      *((_OWORD *)a2 + 1) = v30;\n    }\n    else\n    {\n      *(_OWORD *)a2 = 0;\n      a2[2] = 1;\n      a2[3] = 15;\n      *(_WORD *)a2 = 45;\n      sub_14003D310((__int64)Buf1);\n    }\n  }\n  return a2;\n}", "assembly": "; \n; GameLevelManager::getLengthStr from 0x14022a660 to 0x14022a8a8 (584 bytes)\n; \n; 2 xrefs:\n; > LevelSearchLayer::getSearchObject @ 0x14043873c\n; > <???> @ 0x14091bdc4\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:28:28 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14022a660\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14022a665\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14022a66a\npush    rdi                                                            ; +0xf, 0x14022a66f\npush    r12                                                            ; +0x10, 0x14022a670\npush    r13                                                            ; +0x12, 0x14022a672\npush    r14                                                            ; +0x14, 0x14022a674\npush    r15                                                            ; +0x16, 0x14022a676\nsub     rsp, 80h                                                       ; +0x18, 0x14022a678\nmov     rax, cs:__security_cookie                                      ; +0x1f, 0x14022a67f\nxor     rax, rsp                                                       ; +0x26, 0x14022a686\nmov     [rsp+0A8h+var_38], rax                                         ; +0x29, 0x14022a689\nmovzx   r14d, r9b                                                      ; +0x2e, 0x14022a68e\nmovzx   r15d, r8b                                                      ; +0x32, 0x14022a692\nmov     rbx, rdx                                                       ; +0x36, 0x14022a696\nmov     [rsp+0A8h+var_60], rdx                                         ; +0x39, 0x14022a699\nxor     r12d, r12d                                                     ; +0x3e, 0x14022a69e\nxorps   xmm0, xmm0                                                     ; +0x41, 0x14022a6a1\nmovups  xmmword ptr [rsp+0A8h+Buf1], xmm0                              ; +0x44, 0x14022a6a4\nmov     qword ptr [rsp+0A8h+var_48], r12                               ; +0x49, 0x14022a6a9\nmov     qword ptr [rsp+0A8h+var_48+8], 0Fh                             ; +0x4e, 0x14022a6ae\nmov     byte ptr [rsp+0A8h+Buf1], r12b                                 ; +0x57, 0x14022a6b7\nmov     ebp, r12d                                                      ; +0x5c, 0x14022a6bc\nmov     edx, r12d                                                      ; +0x5f, 0x14022a6bf\nmov     esi, r12d                                                      ; +0x62, 0x14022a6c2\nlea     r13, cs:140000000h                                             ; +0x65, 0x14022a6c5\nmov     rdi, 0FFFFFFFFFFFFFFFFh                                        ; +0x6c, 0x14022a6cc\nnop     dword ptr [rax+00h]                                            ; +0x73, 0x14022a6d3\nnop     word ptr [rax+rax+00000000h]                                   ; +0x77, 0x14022a6d7\nmovsxd  rax, esi                                                       ; +0x80, 0x14022a6e0\nmov     ecx, ds:(jpt_14022A6EE - 140000000h)[r13+rax*4]; switch 6 cases ; +0x83, 0x14022a6e3\nadd     rcx, r13                                                       ; +0x8b, 0x14022a6eb\njmp     rcx; switch jump                                               ; +0x8e, 0x14022a6ee\nmovzx   eax, r15b; jumptable 000000014022A6EE case 0                   ; +0x90, 0x14022a6f0\njmp     short loc_14022A722                                            ; +0x94, 0x14022a6f4\nmovzx   eax, r14b; jumptable 000000014022A6EE case 1                   ; +0x96, 0x14022a6f6\njmp     short loc_14022A722                                            ; +0x9a, 0x14022a6fa\nmovzx   eax, [rsp+0A8h+arg_20]; jumptable 000000014022A6EE case 2      ; +0x9c, 0x14022a6fc\njmp     short loc_14022A722                                            ; +0xa4, 0x14022a704\nmovzx   eax, [rsp+0A8h+arg_28]; jumptable 000000014022A6EE case 3      ; +0xa6, 0x14022a706\njmp     short loc_14022A722                                            ; +0xae, 0x14022a70e\nmovzx   eax, [rsp+0A8h+arg_30]; jumptable 000000014022A6EE case 4      ; +0xb0, 0x14022a710\njmp     short loc_14022A722                                            ; +0xb8, 0x14022a718\nmovzx   eax, [rsp+0A8h+arg_38]; jumptable 000000014022A6EE case 5      ; +0xba, 0x14022a71a\ntest    al, al                                                         ; +0xc2, 0x14022a722\njz      short loc_14022A77B                                            ; +0xc4, 0x14022a724\ntest    ebp, ebp                                                       ; +0xc6, 0x14022a726\njle     short loc_14022A741                                            ; +0xc8, 0x14022a728\nmov     r8d, 1; Size                                                   ; +0xca, 0x14022a72a\nlea     rdx, byte_14070ECF8; void *                                    ; +0xd0, 0x14022a730\nlea     rcx, [rsp+0A8h+Buf1]; Src                                      ; +0xd7, 0x14022a737\ncall    sub_140044D80                                                  ; +0xdc, 0x14022a73c\nmov     edx, esi                                                       ; +0xe1, 0x14022a741\nlea     rcx, word_1406ED6F8                                            ; +0xe3, 0x14022a743\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xea, 0x14022a74a\nmov     rcx, rax                                                       ; +0xf0, 0x14022a750\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xf3, 0x14022a753\nmov     r8, rdi                                                        ; +0xf9, 0x14022a759\nnop     dword ptr [rax+00h]                                            ; +0xfc, 0x14022a75c\ninc     r8; Size                                                       ; +0x100, 0x14022a760\ncmp     byte ptr [rax+r8], 0                                           ; +0x103, 0x14022a763\njnz     short loc_14022A760                                            ; +0x108, 0x14022a768\nmov     rdx, rax; void *                                               ; +0x10a, 0x14022a76a\nlea     rcx, [rsp+0A8h+Buf1]; Src                                      ; +0x10d, 0x14022a76d\ncall    sub_140044D80                                                  ; +0x112, 0x14022a772\ninc     ebp                                                            ; +0x117, 0x14022a777\nmov     edx, esi                                                       ; +0x119, 0x14022a779\ninc     esi                                                            ; +0x11b, 0x14022a77b\ncmp     esi, 5                                                         ; +0x11d, 0x14022a77d\njle     loc_14022A6E0                                                  ; +0x120, 0x14022a780\ncmp     ebp, 1                                                         ; +0x126, 0x14022a786\njnz     short loc_14022A7D7                                            ; +0x129, 0x14022a789\nlea     rcx, word_1406ED6F8                                            ; +0x12b, 0x14022a78b\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x132, 0x14022a792\nmov     rcx, rax                                                       ; +0x138, 0x14022a798\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x13b, 0x14022a79b\nxorps   xmm0, xmm0                                                     ; +0x141, 0x14022a7a1\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x144, 0x14022a7a4\nmov     [rbx+10h], r12                                                 ; +0x147, 0x14022a7a7\nmov     [rbx+18h], r12                                                 ; +0x14b, 0x14022a7ab\nnop                                                                    ; +0x14f, 0x14022a7af\ninc     rdi                                                            ; +0x150, 0x14022a7b0\ncmp     byte ptr [rax+rdi], 0                                          ; +0x153, 0x14022a7b3\njnz     short loc_14022A7B0                                            ; +0x157, 0x14022a7b7\nmov     r8, rdi                                                        ; +0x159, 0x14022a7b9\nmov     rdx, rax                                                       ; +0x15c, 0x14022a7bc\nmov     rcx, rbx                                                       ; +0x15f, 0x14022a7bf\ncall    sub_14003D230                                                  ; +0x162, 0x14022a7c2\nnop                                                                    ; +0x167, 0x14022a7c7\nlea     rcx, [rsp+0A8h+Buf1]                                           ; +0x168, 0x14022a7c8\ncall    sub_14003D310                                                  ; +0x16d, 0x14022a7cd\njmp     loc_14022A85D                                                  ; +0x172, 0x14022a7d2\nxorps   xmm0, xmm0                                                     ; +0x177, 0x14022a7d7\nmovups  [rsp+0A8h+Buf2], xmm0                                          ; +0x17a, 0x14022a7da\nmov     [rsp+0A8h+var_70], r12                                         ; +0x17f, 0x14022a7df\nmov     [rsp+0A8h+var_68], 0Fh                                         ; +0x184, 0x14022a7e4\nmov     byte ptr [rsp+0A8h+Buf2], 0                                    ; +0x18d, 0x14022a7ed\nlea     rcx, [rsp+0A8h+Buf1]                                           ; +0x192, 0x14022a7f2\ncmp     qword ptr [rsp+0A8h+var_48+8], 0Fh                             ; +0x197, 0x14022a7f7\ncmova   rcx, [rsp+0A8h+Buf1]; Buf1                                     ; +0x19d, 0x14022a7fd\nmov     rdi, qword ptr [rsp+0A8h+var_48]                               ; +0x1a3, 0x14022a803\nmov     r8, rdi                                                        ; +0x1a8, 0x14022a808\ntest    rdi, rdi                                                       ; +0x1ab, 0x14022a80b\ncmovnz  r8, r12; Size                                                  ; +0x1ae, 0x14022a80e\nlea     rdx, [rsp+0A8h+Buf2]; Buf2                                     ; +0x1b2, 0x14022a812\ncall    memcmp                                                         ; +0x1b7, 0x14022a817\ntest    eax, eax                                                       ; +0x1bc, 0x14022a81c\njnz     short loc_14022A84C                                            ; +0x1be, 0x14022a81e\ntest    rdi, rdi                                                       ; +0x1c0, 0x14022a820\njnz     short loc_14022A84C                                            ; +0x1c3, 0x14022a823\nxorps   xmm0, xmm0                                                     ; +0x1c5, 0x14022a825\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x1c8, 0x14022a828\nmov     qword ptr [rbx+10h], 1                                         ; +0x1cb, 0x14022a82b\nmov     qword ptr [rbx+18h], 0Fh                                       ; +0x1d3, 0x14022a833\nmov     word ptr [rbx], 2Dh ; '-'                                      ; +0x1db, 0x14022a83b\nlea     rcx, [rsp+0A8h+Buf1]                                           ; +0x1e0, 0x14022a840\ncall    sub_14003D310                                                  ; +0x1e5, 0x14022a845\njmp     short loc_14022A85D                                            ; +0x1ea, 0x14022a84a\nmovups  xmm0, xmmword ptr [rsp+0A8h+Buf1]                              ; +0x1ec, 0x14022a84c\nmovups  xmmword ptr [rbx], xmm0                                        ; +0x1f1, 0x14022a851\nmovups  xmm1, [rsp+0A8h+var_48]                                        ; +0x1f4, 0x14022a854\nmovups  xmmword ptr [rbx+10h], xmm1                                    ; +0x1f9, 0x14022a859\nmov     rax, rbx                                                       ; +0x1fd, 0x14022a85d\nmov     rcx, [rsp+0A8h+var_38]                                         ; +0x200, 0x14022a860\nxor     rcx, rsp; StackCookie                                          ; +0x205, 0x14022a865\ncall    __security_check_cookie                                        ; +0x208, 0x14022a868\nlea     r11, [rsp+0A8h+var_28]                                         ; +0x20d, 0x14022a86d\nmov     rbx, [r11+30h]                                                 ; +0x215, 0x14022a875\nmov     rbp, [r11+40h]                                                 ; +0x219, 0x14022a879\nmov     rsi, [r11+48h]                                                 ; +0x21d, 0x14022a87d\nmov     rsp, r11                                                       ; +0x221, 0x14022a881\npop     r15                                                            ; +0x224, 0x14022a884\npop     r14                                                            ; +0x226, 0x14022a886\npop     r13                                                            ; +0x228, 0x14022a888\npop     r12                                                            ; +0x22a, 0x14022a88a\npop     rdi                                                            ; +0x22c, 0x14022a88c\nretn                                                                   ; +0x22d, 0x14022a88d\nalign 10h                                                              ; +0x22e, 0x14022a88e\ndd offset loc_14022A6F0 - 140000000h; jump table for switch statement  ; +0x230, 0x14022a890", "xrefs": ["LevelSearchLayer::getSearchObject @ 0x14043873c", "<???> @ 0x14091bdc4"], "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"}