{"type": "func", "start": 5370140320, "end": 5370140578, "name": "GameLevelManager::levelIDFromCommentKey", "pseudocode": "// \n// GameLevelManager::levelIDFromCommentKey from 0x14015d6a0 to 0x14015d7a2 (258 bytes)\n// \n// 4 xrefs:\n// > GameLevelManager::onGetLevelCommentsCompleted @ 0x14015c385\n// > GameLevelManager::onGetAccountCommentsCompleted @ 0x14015caf5\n// > GameLevelManager::onDeleteCommentCompleted @ 0x14015f6f4\n// > <???> @ 0x1406caaac\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=1\nint GameLevelManager::levelIDFromCommentKey(GameLevelManager *a1, const char *a2)\n{\n  size_t v2; // r8\n  cocos2d::CCArray *v3; // rbx\n  void *v4; // rcx\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __m128i si128; // [rsp+30h] [rbp-28h]\n\n  *(_OWORD *)Block = 0;\n  si128 = 0;\n  v2 = -1;\n  do\n    ++v2;\n  while ( a2[v2] );\n  sub_14003A930(Block, a2, v2);\n  v3 = sub_140140F70((__int64 *)Block, \"_\");\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v4 = Block[0];\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v4 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v4 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v4);\n  }\n  si128 = _mm_load_si128((const __m128i *)&xmmword_140623F30);\n  LOBYTE(Block[0]) = 0;\n  if ( cocos2d::CCArray::count(v3) < 3 )\n    return 0;\n  v5 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v3, 1u);\n  CString = cocos2d::CCString::getCString(v5);\n  return atoi(CString);\n}", "assembly": "; \n; GameLevelManager::levelIDFromCommentKey from 0x14015d6a0 to 0x14015d7a2 (258 bytes)\n; \n; 4 xrefs:\n; > GameLevelManager::onGetLevelCommentsCompleted @ 0x14015c385\n; > GameLevelManager::onGetAccountCommentsCompleted @ 0x14015caf5\n; > GameLevelManager::onDeleteCommentCompleted @ 0x14015f6f4\n; > <???> @ 0x1406caaac\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\npush    rbx                                                            ; +0x0, 0x14015d6a0\nsub     rsp, 50h                                                       ; +0x2, 0x14015d6a2\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x14015d6a6\nxor     rax, rsp                                                       ; +0xd, 0x14015d6ad\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x14015d6b0\nxorps   xmm0, xmm0                                                     ; +0x15, 0x14015d6b5\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x18, 0x14015d6b8\nxorps   xmm1, xmm1                                                     ; +0x1d, 0x14015d6bd\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x20, 0x14015d6c0\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x26, 0x14015d6c6\nnop     dword ptr [rax]                                                ; +0x2d, 0x14015d6cd\ninc     r8                                                             ; +0x30, 0x14015d6d0\ncmp     byte ptr [rdx+r8], 0                                           ; +0x33, 0x14015d6d3\njnz     short loc_14015D6D0                                            ; +0x38, 0x14015d6d8\nlea     rcx, [rsp+58h+Block]                                           ; +0x3a, 0x14015d6da\ncall    sub_14003A930                                                  ; +0x3f, 0x14015d6df\nnop                                                                    ; +0x44, 0x14015d6e4\nlea     rdx, asc_140537224; \"_\"                                        ; +0x45, 0x14015d6e5\nlea     rcx, [rsp+58h+Block]                                           ; +0x4c, 0x14015d6ec\ncall    sub_140140F70                                                  ; +0x51, 0x14015d6f1\nmov     rbx, rax                                                       ; +0x56, 0x14015d6f6\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x59, 0x14015d6f9\ncmp     rdx, 0Fh                                                       ; +0x5e, 0x14015d6fe\njbe     short loc_14015D739                                            ; +0x62, 0x14015d702\ninc     rdx                                                            ; +0x64, 0x14015d704\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x67, 0x14015d707\nmov     rax, rcx                                                       ; +0x6c, 0x14015d70c\ncmp     rdx, 1000h                                                     ; +0x6f, 0x14015d70f\njb      short loc_14015D734                                            ; +0x76, 0x14015d716\nadd     rdx, 27h ; '''                                                 ; +0x78, 0x14015d718\nmov     rcx, [rcx-8]                                                   ; +0x7c, 0x14015d71c\nsub     rax, rcx                                                       ; +0x80, 0x14015d720\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x83, 0x14015d723\ncmp     rax, 1Fh                                                       ; +0x87, 0x14015d727\njbe     short loc_14015D734                                            ; +0x8b, 0x14015d72b\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x8d, 0x14015d72d\nalign 4                                                                ; +0x93, 0x14015d733\ncall    j_j_free                                                       ; +0x94, 0x14015d734\nmovdqa  xmm0, cs:xmmword_140623F30                                     ; +0x99, 0x14015d739\nmovdqu  [rsp+58h+var_28], xmm0                                         ; +0xa1, 0x14015d741\nmov     byte ptr [rsp+58h+Block], 0                                    ; +0xa7, 0x14015d747\nmov     rcx, rbx                                                       ; +0xac, 0x14015d74c\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xaf, 0x14015d74f\ncmp     eax, 3                                                         ; +0xb5, 0x14015d755\njb      short loc_14015D78D                                            ; +0xb8, 0x14015d758\nmov     edx, 1                                                         ; +0xba, 0x14015d75a\nmov     rcx, rbx                                                       ; +0xbf, 0x14015d75f\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xc2, 0x14015d762\nmov     rcx, rax                                                       ; +0xc8, 0x14015d768\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xcb, 0x14015d76b\nmov     rcx, rax; String                                               ; +0xd1, 0x14015d771\ncall    cs:atoi                                                        ; +0xd4, 0x14015d774\nmov     rcx, [rsp+58h+var_18]                                          ; +0xda, 0x14015d77a\nxor     rcx, rsp; StackCookie                                          ; +0xdf, 0x14015d77f\ncall    __security_check_cookie                                        ; +0xe2, 0x14015d782\nadd     rsp, 50h                                                       ; +0xe7, 0x14015d787\npop     rbx                                                            ; +0xeb, 0x14015d78b\nretn                                                                   ; +0xec, 0x14015d78c\nxor     eax, eax                                                       ; +0xed, 0x14015d78d\nmov     rcx, [rsp+58h+var_18]                                          ; +0xef, 0x14015d78f\nxor     rcx, rsp; StackCookie                                          ; +0xf4, 0x14015d794\ncall    __security_check_cookie                                        ; +0xf7, 0x14015d797\nadd     rsp, 50h                                                       ; +0xfc, 0x14015d79c\npop     rbx                                                            ; +0x100, 0x14015d7a0\nretn                                                                   ; +0x101, 0x14015d7a1", "xrefs": ["GameLevelManager::onGetLevelCommentsCompleted @ 0x14015c385", "GameLevelManager::onGetAccountCommentsCompleted @ 0x14015caf5", "GameLevelManager::onDeleteCommentCompleted @ 0x14015f6f4", "<???> @ 0x1406caaac"], "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"}