{"type": "func", "start": 5370141104, "end": 5370141330, "name": "GameLevelManager::getStoredLevelComments", "pseudocode": "// \n// GameLevelManager::getStoredLevelComments from 0x14015d9b0 to 0x14015da92 (226 bytes)\n// \n// 3 xrefs:\n// > InfoLayer::init @ 0x1402bc6d1\n// > InfoLayer::loadPage @ 0x1402be596\n// > <???> @ 0x1406caac4\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\ncocos2d::CCArray *GameLevelManager::getStoredLevelComments(GameLevelManager *a1, const char *a2)\n{\n  size_t v4; // r8\n  cocos2d::CCArray *v5; // rbx\n  void *v6; // rcx\n  cocos2d::CCArray *result; // rax\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v9; // [rsp+30h] [rbp-28h]\n\n  if ( !GameLevelManager::isTimeValid(a1, a2, 600.0) )\n    return nullptr;\n  *(_OWORD *)Block = 0;\n  v9 = 0;\n  v4 = -1;\n  do\n    ++v4;\n  while ( a2[v4] );\n  sub_14003A930(Block, a2, v4);\n  v5 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_storedLevels, Block);\n  if ( *((_QWORD *)&v9 + 1) > 0xFu )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v9 + 1) + 1LL) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v6);\n  }\n  result = nullptr;\n  if ( v5 )\n    return v5;\n  return result;\n}", "assembly": "; \n; GameLevelManager::getStoredLevelComments from 0x14015d9b0 to 0x14015da92 (226 bytes)\n; \n; 3 xrefs:\n; > InfoLayer::init @ 0x1402bc6d1\n; > InfoLayer::loadPage @ 0x1402be596\n; > <???> @ 0x1406caac4\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, 0x14015d9b0\npush    rdi                                                            ; +0x5, 0x14015d9b5\nsub     rsp, 50h                                                       ; +0x6, 0x14015d9b6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x14015d9ba\nxor     rax, rsp                                                       ; +0x11, 0x14015d9c1\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x14015d9c4\nmov     rbx, rdx                                                       ; +0x19, 0x14015d9c9\nmov     rdi, rcx                                                       ; +0x1c, 0x14015d9cc\nmovss   xmm2, cs:dword_1406234D0                                       ; +0x1f, 0x14015d9cf\ncall    GameLevelManager__isTimeValid                                  ; +0x27, 0x14015d9d7\ntest    al, al                                                         ; +0x2c, 0x14015d9dc\njz      loc_14015DA78                                                  ; +0x2e, 0x14015d9de\nxorps   xmm0, xmm0                                                     ; +0x34, 0x14015d9e4\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x37, 0x14015d9e7\nxorps   xmm1, xmm1                                                     ; +0x3c, 0x14015d9ec\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x3f, 0x14015d9ef\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x45, 0x14015d9f5\nnop     dword ptr [rax+00h]                                            ; +0x4c, 0x14015d9fc\ninc     r8                                                             ; +0x50, 0x14015da00\ncmp     byte ptr [rbx+r8], 0                                           ; +0x53, 0x14015da03\njnz     short loc_14015DA00                                            ; +0x58, 0x14015da08\nmov     rdx, rbx                                                       ; +0x5a, 0x14015da0a\nlea     rcx, [rsp+58h+Block]                                           ; +0x5d, 0x14015da0d\ncall    sub_14003A930                                                  ; +0x62, 0x14015da12\nnop                                                                    ; +0x67, 0x14015da17\nlea     rdx, [rsp+58h+Block]                                           ; +0x68, 0x14015da18\nmov     rcx, [rdi+220h]                                                ; +0x6d, 0x14015da1d\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 &) ; +0x74, 0x14015da24\nmov     rbx, rax                                                       ; +0x7a, 0x14015da2a\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x7d, 0x14015da2d\ncmp     rdx, 0Fh                                                       ; +0x82, 0x14015da32\njbe     short loc_14015DA6D                                            ; +0x86, 0x14015da36\ninc     rdx                                                            ; +0x88, 0x14015da38\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x8b, 0x14015da3b\nmov     rax, rcx                                                       ; +0x90, 0x14015da40\ncmp     rdx, 1000h                                                     ; +0x93, 0x14015da43\njb      short loc_14015DA68                                            ; +0x9a, 0x14015da4a\nadd     rdx, 27h ; '''                                                 ; +0x9c, 0x14015da4c\nmov     rcx, [rcx-8]                                                   ; +0xa0, 0x14015da50\nsub     rax, rcx                                                       ; +0xa4, 0x14015da54\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xa7, 0x14015da57\ncmp     rax, 1Fh                                                       ; +0xab, 0x14015da5b\njbe     short loc_14015DA68                                            ; +0xaf, 0x14015da5f\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb1, 0x14015da61\nalign 8                                                                ; +0xb7, 0x14015da67\ncall    j_j_free                                                       ; +0xb8, 0x14015da68\nxor     eax, eax                                                       ; +0xbd, 0x14015da6d\ntest    rbx, rbx                                                       ; +0xbf, 0x14015da6f\ncmovnz  rax, rbx                                                       ; +0xc2, 0x14015da72\njmp     short loc_14015DA7A                                            ; +0xc6, 0x14015da76\nxor     eax, eax                                                       ; +0xc8, 0x14015da78\nmov     rcx, [rsp+58h+var_18]                                          ; +0xca, 0x14015da7a\nxor     rcx, rsp; StackCookie                                          ; +0xcf, 0x14015da7f\ncall    __security_check_cookie                                        ; +0xd2, 0x14015da82\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xd7, 0x14015da87\nadd     rsp, 50h                                                       ; +0xdc, 0x14015da8c\npop     rdi                                                            ; +0xe0, 0x14015da90\nretn                                                                   ; +0xe1, 0x14015da91", "xrefs": ["InfoLayer::init @ 0x1402bc6d1", "InfoLayer::loadPage @ 0x1402be596", "<???> @ 0x1406caac4"], "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"}