{"type": "func", "start": 4300499808, "end": 4300500028, "name": "GameLevelManager::hasRatedDemon", "pseudocode": "// \n// GameLevelManager::hasRatedDemon from 0x100546b60 to 0x100546c3c (220 bytes)\n// \n// 2 xrefs:\n// > LevelInfoLayer::updateSideButtons @ 0x1002c1d94\n// > GameLevelManager::rateDemon @ 0x100547976\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\nbool __fastcall GameLevelManager::hasRatedDemon(GameLevelManager *a1, int a2)\n{\n  double v2; // xmm0_8\n  cocos2d::CCDictionary *m_ratedDemons; // rbx\n  cocos2d::CCString *v4; // rax\n  const char *CString; // r15\n  size_t v6; // rax\n  size_t v7; // r14\n  char *v8; // r12\n  size_t v9; // r13\n  __int64 v10; // rbx\n  _QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  m_ratedDemons = a1->m_ratedDemons;\n  v4 = (cocos2d::CCString *)sub_1007AB580(\"%i\", __dst[0]);\n  CString = cocos2d::CCString::getCString(v4);\n  v6 = strlen(CString);\n  if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v2);\n  v7 = v6;\n  if ( v6 >= 0x17 )\n  {\n    v9 = 26;\n    if ( (v6 | 7) != 0x17 )\n      v9 = (v6 | 7) + 1;\n    v8 = (char *)operator new(v9);\n    __p = v8;\n    __dst[0] = v9 + 1;\n    __dst[1] = v7;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v6;\n  v8 = (char *)__dst + 1;\n  if ( v6 )\nLABEL_8:\n    memmove(v8, CString, v7);\n  v8[v7] = 0;\n  v10 = cocos2d::CCDictionary::objectForKey_1((__int64)m_ratedDemons, (char *)__dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  return v10 != 0;\n}", "assembly": "; \n; GameLevelManager::hasRatedDemon from 0x100546b60 to 0x100546c3c (220 bytes)\n; \n; 2 xrefs:\n; > LevelInfoLayer::updateSideButtons @ 0x1002c1d94\n; > GameLevelManager::rateDemon @ 0x100547976\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, 0x100546b60\nmov     rbp, rsp                                                       ; +0x1, 0x100546b61\npush    r15                                                            ; +0x4, 0x100546b64\npush    r14                                                            ; +0x6, 0x100546b66\npush    r13                                                            ; +0x8, 0x100546b68\npush    r12                                                            ; +0xa, 0x100546b6a\npush    rbx                                                            ; +0xc, 0x100546b6c\nsub     rsp, 18h                                                       ; +0xd, 0x100546b6d\nmov     rbx, [rdi+1A0h]                                                ; +0x11, 0x100546b71\nlea     rdi, aI; \"%i\"                                                  ; +0x18, 0x100546b78\nxor     eax, eax                                                       ; +0x1f, 0x100546b7f\ncall    sub_1007AB580                                                  ; +0x21, 0x100546b81\nmov     rdi, rax                                                       ; +0x26, 0x100546b86\ncall    cocos2d__CCString__getCString                                  ; +0x29, 0x100546b89\nmov     r15, rax                                                       ; +0x2e, 0x100546b8e\nmov     rdi, rax; __s                                                  ; +0x31, 0x100546b91\ncall    _strlen                                                        ; +0x34, 0x100546b94\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x39, 0x100546b99\njnb     loc_100546C37                                                  ; +0x3d, 0x100546b9d\nmov     r14, rax                                                       ; +0x43, 0x100546ba3\ncmp     rax, 17h                                                       ; +0x46, 0x100546ba6\njnb     short loc_100546BBE                                            ; +0x4a, 0x100546baa\nlea     eax, [r14+r14]                                                 ; +0x4c, 0x100546bac\nmov     byte ptr [rbp+__dst], al                                       ; +0x50, 0x100546bb0\nlea     r12, [rbp+__dst+1]                                             ; +0x53, 0x100546bb3\ntest    r14, r14                                                       ; +0x57, 0x100546bb7\njnz     short loc_100546BF1                                            ; +0x5a, 0x100546bba\njmp     short loc_100546BFF                                            ; +0x5c, 0x100546bbc\nmov     rax, r14                                                       ; +0x5e, 0x100546bbe\nor      rax, 7                                                         ; +0x61, 0x100546bc1\nlea     rcx, [rax+1]                                                   ; +0x65, 0x100546bc5\ncmp     rax, 17h                                                       ; +0x69, 0x100546bc9\nmov     r13d, 1Ah                                                      ; +0x6d, 0x100546bcd\ncmovnz  r13, rcx                                                       ; +0x73, 0x100546bd3\nmov     rdi, r13; __sz                                                 ; +0x77, 0x100546bd7\ncall    __Znwm; operator new(ulong)                                    ; +0x7a, 0x100546bda\nmov     r12, rax                                                       ; +0x7f, 0x100546bdf\nmov     [rbp+__p], rax                                                 ; +0x82, 0x100546be2\ninc     r13                                                            ; +0x86, 0x100546be6\nmov     [rbp+__dst], r13                                               ; +0x89, 0x100546be9\nmov     [rbp+var_38], r14                                              ; +0x8d, 0x100546bed\nmov     rdi, r12; __dst                                                ; +0x91, 0x100546bf1\nmov     rsi, r15; __src                                                ; +0x94, 0x100546bf4\nmov     rdx, r14; __len                                                ; +0x97, 0x100546bf7\ncall    _memmove                                                       ; +0x9a, 0x100546bfa\nmov     byte ptr [r12+r14], 0                                          ; +0x9f, 0x100546bff\nlea     rsi, [rbp+__dst]                                               ; +0xa4, 0x100546c04\nmov     rdi, rbx                                                       ; +0xa8, 0x100546c08\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0xab, 0x100546c0b\nmov     rbx, rax                                                       ; +0xb0, 0x100546c10\ntest    byte ptr [rbp+__dst], 1                                        ; +0xb3, 0x100546c13\njz      short loc_100546C22                                            ; +0xb7, 0x100546c17\nmov     rdi, [rbp+__p]; __p                                            ; +0xb9, 0x100546c19\ncall    __ZdlPv; operator delete(void *)                               ; +0xbd, 0x100546c1d\ntest    rbx, rbx                                                       ; +0xc2, 0x100546c22\nsetnz   al                                                             ; +0xc5, 0x100546c25\nadd     rsp, 18h                                                       ; +0xc8, 0x100546c28\npop     rbx                                                            ; +0xcc, 0x100546c2c\npop     r12                                                            ; +0xcd, 0x100546c2d\npop     r13                                                            ; +0xcf, 0x100546c2f\npop     r14                                                            ; +0xd1, 0x100546c31\npop     r15                                                            ; +0xd3, 0x100546c33\npop     rbp                                                            ; +0xd5, 0x100546c35\nretn                                                                   ; +0xd6, 0x100546c36\ncall    sub_100006BF0                                                  ; +0xd7, 0x100546c37", "xrefs": ["LevelInfoLayer::updateSideButtons @ 0x1002c1d94", "GameLevelManager::rateDemon @ 0x100547976"], "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"}