{"type": "func", "start": 5370146048, "end": 5370146497, "name": "GameLevelManager::resetCommentTimersForLevelID", "pseudocode": "// \n// GameLevelManager::resetCommentTimersForLevelID from 0x14015ed00 to 0x14015eec1 (449 bytes)\n// \n// 3 xrefs:\n// > InfoLayer::onRefreshComments @ 0x1402bce2a\n// > InfoLayer::toggleSmallCommentMode @ 0x1402bf2a6\n// > <???> @ 0x1406caae8\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=2\nvoid GameLevelManager::resetCommentTimersForLevelID(GameLevelManager *a1, int a2, CommentKeyType a3)\n{\n  int v6; // r14d\n  int v7; // esi\n  char v8; // di\n  int v9; // ebx\n  cocos2d::CCString *v10; // rax\n  const char *CString; // rax\n  size_t v12; // r8\n  void **v13; // rdx\n  void **v14; // rdx\n  void *v15; // rcx\n  void *v16; // rcx\n  void *v17; // [rsp+30h] [rbp-68h]\n  void *Block[2]; // [rsp+38h] [rbp-60h] BYREF\n  __int64 v19; // [rsp+48h] [rbp-50h]\n  unsigned __int64 v20; // [rsp+50h] [rbp-48h]\n\n  v6 = 0;\n  v7 = 0;\n  while ( 2 )\n  {\n    v8 = 1;\n    v9 = 0;\n    do\n    {\n      if ( !qword_1406C2EC0 )\n      {\n        v17 = operator new(0x3D0u);\n        qword_1406C2EC0 = sub_140141280((__int64)v17);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n      }\n      v10 = cocos2d::CCString::createWithFormat(\"comment_%i_%i_%i_%i\", a2, v9, v7, a3);\n      CString = cocos2d::CCString::getCString(v10);\n      *(_OWORD *)Block = 0;\n      v19 = 0;\n      v20 = 0;\n      v12 = -1;\n      do\n        ++v12;\n      while ( CString[v12] );\n      sub_14003A930(Block, CString, v12);\n      v6 |= 1u;\n      v13 = Block;\n      if ( v20 > 0xF )\n        v13 = (void **)Block[0];\n      if ( GameLevelManager::keyHasTimer(a1, (const char *)v13) )\n      {\n        v14 = Block;\n        if ( v20 > 0xF )\n          v14 = (void **)Block[0];\n        GameLevelManager::resetTimerForKey(a1, (const char *)v14);\n      }\n      else\n      {\n        v8 = 0;\n      }\n      if ( ++v9 > 100 )\n      {\n        if ( v20 > 0xF )\n        {\n          v16 = Block[0];\n          if ( v20 + 1 >= 0x1000 )\n          {\n            v16 = *((void **)Block[0] - 1);\n            if ( (unsigned __int64)((char *)Block[0] - (char *)v16 - 8) > 0x1F )\nLABEL_25:\n              invalid_parameter_noinfo_noreturn();\n          }\n          j_j_free(v16);\n        }\n        return;\n      }\n      if ( v20 > 0xF )\n      {\n        v15 = Block[0];\n        if ( v20 + 1 >= 0x1000 )\n        {\n          v15 = *((void **)Block[0] - 1);\n          if ( (unsigned __int64)((char *)Block[0] - (char *)v15 - 8) > 0x1F )\n            goto LABEL_25;\n        }\n        j_j_free(v15);\n      }\n    }\n    while ( v8 );\n    if ( ++v7 < 2 )\n      continue;\n    break;\n  }\n}", "assembly": "; \n; GameLevelManager::resetCommentTimersForLevelID from 0x14015ed00 to 0x14015eec1 (449 bytes)\n; \n; 3 xrefs:\n; > InfoLayer::onRefreshComments @ 0x1402bce2a\n; > InfoLayer::toggleSmallCommentMode @ 0x1402bf2a6\n; > <???> @ 0x1406caae8\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_18], rbx                                              ; +0x0, 0x14015ed00\npush    rbp                                                            ; +0x5, 0x14015ed05\npush    rsi                                                            ; +0x6, 0x14015ed06\npush    rdi                                                            ; +0x7, 0x14015ed07\npush    r12                                                            ; +0x8, 0x14015ed08\npush    r13                                                            ; +0xa, 0x14015ed0a\npush    r14                                                            ; +0xc, 0x14015ed0c\npush    r15                                                            ; +0xe, 0x14015ed0e\nsub     rsp, 60h                                                       ; +0x10, 0x14015ed10\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x14015ed14\nxor     rax, rsp                                                       ; +0x1b, 0x14015ed1b\nmov     [rsp+98h+var_40], rax                                          ; +0x1e, 0x14015ed1e\nmov     r12d, r8d                                                      ; +0x23, 0x14015ed23\nmov     r15d, edx                                                      ; +0x26, 0x14015ed26\nmov     rbp, rcx                                                       ; +0x29, 0x14015ed29\nxor     r13d, r13d                                                     ; +0x2c, 0x14015ed2c\nmov     r14d, r13d                                                     ; +0x2f, 0x14015ed2f\nmov     dword ptr [rsp+98h+var_68], r13d                               ; +0x32, 0x14015ed32\nmov     esi, r13d                                                      ; +0x37, 0x14015ed37\nnop     word ptr [rax+rax+00h]                                         ; +0x3a, 0x14015ed3a\nmov     dil, 1                                                         ; +0x40, 0x14015ed40\nmov     ebx, r13d                                                      ; +0x43, 0x14015ed43\ncmp     cs:qword_1406C2EC0, 0                                          ; +0x46, 0x14015ed46\njnz     short loc_14015ED78                                            ; +0x4e, 0x14015ed4e\nmov     ecx, 3D0h; Size                                                ; +0x50, 0x14015ed50\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x55, 0x14015ed55\nmov     [rsp+98h+var_68], rax                                          ; +0x5a, 0x14015ed5a\nmov     rcx, rax                                                       ; +0x5f, 0x14015ed5f\ncall    sub_140141280                                                  ; +0x62, 0x14015ed62\nnop                                                                    ; +0x67, 0x14015ed67\nmov     cs:qword_1406C2EC0, rax                                        ; +0x68, 0x14015ed68\nmov     rdx, [rax]                                                     ; +0x6f, 0x14015ed6f\nmov     rcx, rax                                                       ; +0x72, 0x14015ed72\ncall    qword ptr [rdx+48h]                                            ; +0x75, 0x14015ed75\nmov     [rsp+98h+var_78], r12d                                         ; +0x78, 0x14015ed78\nmov     r9d, esi                                                       ; +0x7d, 0x14015ed7d\nmov     r8d, ebx                                                       ; +0x80, 0x14015ed80\nmov     edx, r15d                                                      ; +0x83, 0x14015ed83\nlea     rcx, aCommentIIII; \"comment_%i_%i_%i_%i\"                       ; +0x86, 0x14015ed86\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x8d, 0x14015ed8d\nmov     rcx, rax                                                       ; +0x93, 0x14015ed93\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x96, 0x14015ed96\nxorps   xmm0, xmm0                                                     ; +0x9c, 0x14015ed9c\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0x9f, 0x14015ed9f\nmov     [rsp+98h+var_50], r13                                          ; +0xa4, 0x14015eda4\nmov     [rsp+98h+var_48], r13                                          ; +0xa9, 0x14015eda9\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xae, 0x14015edae\ninc     r8                                                             ; +0xb5, 0x14015edb5\ncmp     byte ptr [rax+r8], 0                                           ; +0xb8, 0x14015edb8\njnz     short loc_14015EDB5                                            ; +0xbd, 0x14015edbd\nmov     rdx, rax                                                       ; +0xbf, 0x14015edbf\nlea     rcx, [rsp+98h+Block]                                           ; +0xc2, 0x14015edc2\ncall    sub_14003A930                                                  ; +0xc7, 0x14015edc7\nor      r14d, 1                                                        ; +0xcc, 0x14015edcc\nlea     rdx, [rsp+98h+Block]                                           ; +0xd0, 0x14015edd0\ncmp     [rsp+98h+var_48], 0Fh                                          ; +0xd5, 0x14015edd5\ncmova   rdx, [rsp+98h+Block]                                           ; +0xdb, 0x14015eddb\nmov     rcx, rbp                                                       ; +0xe1, 0x14015ede1\ncall    GameLevelManager__keyHasTimer                                  ; +0xe4, 0x14015ede4\ntest    al, al                                                         ; +0xe9, 0x14015ede9\njz      short loc_14015EE08                                            ; +0xeb, 0x14015edeb\nlea     rdx, [rsp+98h+Block]                                           ; +0xed, 0x14015eded\ncmp     [rsp+98h+var_48], 0Fh                                          ; +0xf2, 0x14015edf2\ncmova   rdx, [rsp+98h+Block]                                           ; +0xf8, 0x14015edf8\nmov     rcx, rbp                                                       ; +0xfe, 0x14015edfe\ncall    GameLevelManager__resetTimerForKey                             ; +0x101, 0x14015ee01\njmp     short loc_14015EE0B                                            ; +0x106, 0x14015ee06\nxor     dil, dil                                                       ; +0x108, 0x14015ee08\ninc     ebx                                                            ; +0x10b, 0x14015ee0b\nmov     rdx, [rsp+98h+var_48]                                          ; +0x10d, 0x14015ee0d\ncmp     ebx, 64h ; 'd'                                                 ; +0x112, 0x14015ee12\njg      short loc_14015EE61                                            ; +0x115, 0x14015ee15\ncmp     rdx, 0Fh                                                       ; +0x117, 0x14015ee17\njbe     short loc_14015EE4B                                            ; +0x11b, 0x14015ee1b\ninc     rdx                                                            ; +0x11d, 0x14015ee1d\nmov     rcx, [rsp+98h+Block]                                           ; +0x120, 0x14015ee20\nmov     rax, rcx                                                       ; +0x125, 0x14015ee25\ncmp     rdx, 1000h                                                     ; +0x128, 0x14015ee28\njb      short loc_14015EE46                                            ; +0x12f, 0x14015ee2f\nadd     rdx, 27h ; '''                                                 ; +0x131, 0x14015ee31\nmov     rcx, [rcx-8]; Block                                            ; +0x135, 0x14015ee35\nsub     rax, rcx                                                       ; +0x139, 0x14015ee39\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x13c, 0x14015ee3c\ncmp     rax, 1Fh                                                       ; +0x140, 0x14015ee40\nja      short loc_14015EE90                                            ; +0x144, 0x14015ee44\ncall    j_j_free                                                       ; +0x146, 0x14015ee46\ntest    dil, dil                                                       ; +0x14b, 0x14015ee4b\njnz     loc_14015ED46                                                  ; +0x14e, 0x14015ee4e\ninc     esi                                                            ; +0x154, 0x14015ee54\ncmp     esi, 2                                                         ; +0x156, 0x14015ee56\njl      loc_14015ED40                                                  ; +0x159, 0x14015ee59\njmp     short loc_14015EE9C                                            ; +0x15f, 0x14015ee5f\ncmp     rdx, 0Fh                                                       ; +0x161, 0x14015ee61\njbe     short loc_14015EE9C                                            ; +0x165, 0x14015ee65\ninc     rdx                                                            ; +0x167, 0x14015ee67\nmov     rcx, [rsp+98h+Block]; Block                                    ; +0x16a, 0x14015ee6a\nmov     rax, rcx                                                       ; +0x16f, 0x14015ee6f\ncmp     rdx, 1000h                                                     ; +0x172, 0x14015ee72\njb      short loc_14015EE97                                            ; +0x179, 0x14015ee79\nadd     rdx, 27h ; '''                                                 ; +0x17b, 0x14015ee7b\nmov     rcx, [rcx-8]                                                   ; +0x17f, 0x14015ee7f\nsub     rax, rcx                                                       ; +0x183, 0x14015ee83\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x186, 0x14015ee86\ncmp     rax, 1Fh                                                       ; +0x18a, 0x14015ee8a\njbe     short loc_14015EE97                                            ; +0x18e, 0x14015ee8e\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x190, 0x14015ee90\ndb 0CCh                                                                ; +0x196, 0x14015ee96\ncall    j_j_free                                                       ; +0x197, 0x14015ee97\nmov     rcx, [rsp+98h+var_40]                                          ; +0x19c, 0x14015ee9c\nxor     rcx, rsp; StackCookie                                          ; +0x1a1, 0x14015eea1\ncall    __security_check_cookie                                        ; +0x1a4, 0x14015eea4\nmov     rbx, [rsp+98h+arg_18]                                          ; +0x1a9, 0x14015eea9\nadd     rsp, 60h                                                       ; +0x1b1, 0x14015eeb1\npop     r15                                                            ; +0x1b5, 0x14015eeb5\npop     r14                                                            ; +0x1b7, 0x14015eeb7\npop     r13                                                            ; +0x1b9, 0x14015eeb9\npop     r12                                                            ; +0x1bb, 0x14015eebb\npop     rdi                                                            ; +0x1bd, 0x14015eebd\npop     rsi                                                            ; +0x1be, 0x14015eebe\npop     rbp                                                            ; +0x1bf, 0x14015eebf\nretn                                                                   ; +0x1c0, 0x14015eec0", "xrefs": ["InfoLayer::onRefreshComments @ 0x1402bce2a", "InfoLayer::toggleSmallCommentMode @ 0x1402bf2a6", "<???> @ 0x1406caae8"], "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"}