{"type": "func", "start": 4300569664, "end": 4300569894, "name": "GameLevelManager::typeFromLikeKey", "pseudocode": "// \n// GameLevelManager::typeFromLikeKey from 0x100557c40 to 0x100557d26 (230 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::onLikeItemCompleted @ 0x10052272b\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\nLikeItemType __fastcall GameLevelManager::typeFromLikeKey(GameLevelManager *a1, const char *a2)\n{\n  double v2; // xmm0_8\n  size_t v3; // rax\n  size_t v4; // rbx\n  char *v5; // r15\n  size_t v6; // r12\n  __int64 v7; // rbx\n  unsigned int v8; // ecx\n  LikeItemType result; // eax\n  cocos2d::CCString *v10; // rax\n  const char *CString; // rax\n  _QWORD __dst[2]; // [rsp+8h] [rbp-38h] BYREF\n  void *__p; // [rsp+18h] [rbp-28h]\n\n  v3 = strlen(a2);\n  if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v2);\n  v4 = v3;\n  if ( v3 >= 0x17 )\n  {\n    v6 = 26;\n    if ( (v3 | 7) != 0x17 )\n      v6 = (v3 | 7) + 1;\n    v5 = (char *)operator new(v6);\n    __p = v5;\n    __dst[0] = v6 + 1;\n    __dst[1] = v4;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v3;\n  v5 = (char *)__dst + 1;\n  if ( v3 )\nLABEL_8:\n    memcpy(v5, a2, v4);\n  v5[v4] = 0;\n  v7 = sub_10052DD30((unsigned __int8 *)__dst, \"_\", v2);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  v8 = sub_100720070(v7);\n  result = 0;\n  if ( v8 >= 5 )\n  {\n    v10 = (cocos2d::CCString *)sub_1007200C0(v7, 1);\n    CString = cocos2d::CCString::getCString(v10);\n    return atoi(CString);\n  }\n  return result;\n}", "assembly": "; \n; GameLevelManager::typeFromLikeKey from 0x100557c40 to 0x100557d26 (230 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::onLikeItemCompleted @ 0x10052272b\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    rbp                                                            ; +0x0, 0x100557c40\nmov     rbp, rsp                                                       ; +0x1, 0x100557c41\npush    r15                                                            ; +0x4, 0x100557c44\npush    r14                                                            ; +0x6, 0x100557c46\npush    r12                                                            ; +0x8, 0x100557c48\npush    rbx                                                            ; +0xa, 0x100557c4a\nsub     rsp, 20h                                                       ; +0xb, 0x100557c4b\nmov     r14, rsi                                                       ; +0xf, 0x100557c4f\nmov     rdi, rsi; __s                                                  ; +0x12, 0x100557c52\ncall    _strlen                                                        ; +0x15, 0x100557c55\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x1a, 0x100557c5a\njnb     loc_100557D21                                                  ; +0x1e, 0x100557c5e\nmov     rbx, rax                                                       ; +0x24, 0x100557c64\ncmp     rax, 17h                                                       ; +0x27, 0x100557c67\njnb     short loc_100557C7E                                            ; +0x2b, 0x100557c6b\nlea     eax, [rbx+rbx]                                                 ; +0x2d, 0x100557c6d\nmov     byte ptr [rbp+__dst], al                                       ; +0x30, 0x100557c70\nlea     r15, [rbp+__dst+1]                                             ; +0x33, 0x100557c73\ntest    rbx, rbx                                                       ; +0x37, 0x100557c77\njnz     short loc_100557CB1                                            ; +0x3a, 0x100557c7a\njmp     short loc_100557CBF                                            ; +0x3c, 0x100557c7c\nmov     rax, rbx                                                       ; +0x3e, 0x100557c7e\nor      rax, 7                                                         ; +0x41, 0x100557c81\nlea     rcx, [rax+1]                                                   ; +0x45, 0x100557c85\ncmp     rax, 17h                                                       ; +0x49, 0x100557c89\nmov     r12d, 1Ah                                                      ; +0x4d, 0x100557c8d\ncmovnz  r12, rcx                                                       ; +0x53, 0x100557c93\nmov     rdi, r12; __sz                                                 ; +0x57, 0x100557c97\ncall    __Znwm; operator new(ulong)                                    ; +0x5a, 0x100557c9a\nmov     r15, rax                                                       ; +0x5f, 0x100557c9f\nmov     [rbp+__p], rax                                                 ; +0x62, 0x100557ca2\ninc     r12                                                            ; +0x66, 0x100557ca6\nmov     [rbp+__dst], r12                                               ; +0x69, 0x100557ca9\nmov     [rbp+var_30], rbx                                              ; +0x6d, 0x100557cad\nmov     rdi, r15; __dst                                                ; +0x71, 0x100557cb1\nmov     rsi, r14; __src                                                ; +0x74, 0x100557cb4\nmov     rdx, rbx; __n                                                  ; +0x77, 0x100557cb7\ncall    _memcpy                                                        ; +0x7a, 0x100557cba\nmov     byte ptr [r15+rbx], 0                                          ; +0x7f, 0x100557cbf\nlea     rsi, asc_10086913E; \"_\"                                        ; +0x84, 0x100557cc4\nlea     rdi, [rbp+__dst]                                               ; +0x8b, 0x100557ccb\ncall    sub_10052DD30                                                  ; +0x8f, 0x100557ccf\nmov     rbx, rax                                                       ; +0x94, 0x100557cd4\ntest    byte ptr [rbp+__dst], 1                                        ; +0x97, 0x100557cd7\njz      short loc_100557CE6                                            ; +0x9b, 0x100557cdb\nmov     rdi, [rbp+__p]; __p                                            ; +0x9d, 0x100557cdd\ncall    __ZdlPv; operator delete(void *)                               ; +0xa1, 0x100557ce1\nmov     rdi, rbx                                                       ; +0xa6, 0x100557ce6\ncall    sub_100720070                                                  ; +0xa9, 0x100557ce9\nmov     ecx, eax                                                       ; +0xae, 0x100557cee\nxor     eax, eax                                                       ; +0xb0, 0x100557cf0\ncmp     ecx, 5                                                         ; +0xb2, 0x100557cf2\njb      short loc_100557D14                                            ; +0xb5, 0x100557cf5\nmov     rdi, rbx                                                       ; +0xb7, 0x100557cf7\nmov     esi, 1                                                         ; +0xba, 0x100557cfa\ncall    sub_1007200C0                                                  ; +0xbf, 0x100557cff\nmov     rdi, rax                                                       ; +0xc4, 0x100557d04\ncall    cocos2d__CCString__getCString                                  ; +0xc7, 0x100557d07\nmov     rdi, rax; char *                                               ; +0xcc, 0x100557d0c\ncall    _atoi                                                          ; +0xcf, 0x100557d0f\nadd     rsp, 20h                                                       ; +0xd4, 0x100557d14\npop     rbx                                                            ; +0xd8, 0x100557d18\npop     r12                                                            ; +0xd9, 0x100557d19\npop     r14                                                            ; +0xdb, 0x100557d1b\npop     r15                                                            ; +0xdd, 0x100557d1d\npop     rbp                                                            ; +0xdf, 0x100557d1f\nretn                                                                   ; +0xe0, 0x100557d20\ncall    sub_100006BF0                                                  ; +0xe1, 0x100557d21", "xrefs": ["GameLevelManager::onLikeItemCompleted @ 0x10052272b"], "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"}