{"type": "func", "start": 4300580256, "end": 4300580566, "name": "GameLevelManager::markLevelAsReported", "pseudocode": "// \n// GameLevelManager::markLevelAsReported from 0x10055a5a0 to 0x10055a6d6 (310 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::reportLevel @ 0x10055a20a\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\nvoid __fastcall GameLevelManager::markLevelAsReported(GameLevelManager *a1, int a2)\n{\n  double v2; // xmm0_8\n  cocos2d::CCDictionary *m_reportedLevels; // rbx\n  cocos2d::CCString *m_trueString; // r14\n  cocos2d::CCString *v5; // rax\n  const char *CString; // r12\n  size_t v7; // rax\n  std::string::size_type v8; // r15\n  char *data; // r13\n  cocos2d::CCDictionary *v10; // r14\n  size_t v11; // rbx\n  char v12; // [rsp+0h] [rbp-50h]\n  cocos2d::CCString *v13; // [rsp+8h] [rbp-48h]\n  std::string __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n\n  if ( cocos2d::CCDictionary::count(a1->m_reportedLevels) >= 0xA )\n  {\n    cocos2d::CCDictionary::getFirstKey(__dst, (__int64)a1->m_reportedLevels);\n    cocos2d::CCDictionary::removeObjectForKey_1((__int64)a1->m_reportedLevels, (char *)__dst);\n    if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )\n      operator delete(__dst[0].__r_.__value_.__l.__data_);\n  }\n  m_reportedLevels = a1->m_reportedLevels;\n  m_trueString = a1->m_trueString;\n  v5 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v12);\n  CString = cocos2d::CCString::getCString(v5);\n  v7 = strlen(CString);\n  if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v2);\n  v8 = v7;\n  if ( v7 >= 0x17 )\n  {\n    v13 = m_trueString;\n    v10 = m_reportedLevels;\n    v11 = 26;\n    if ( (v7 | 7) != 0x17 )\n      v11 = (v7 | 7) + 1;\n    data = (char *)operator new(v11);\n    __dst[0].__r_.__value_.__r.__words[2] = (std::string::size_type)data;\n    __dst[0].__r_.__value_.__r.__words[0] = v11 + 1;\n    m_reportedLevels = v10;\n    m_trueString = v13;\n    __dst[0].__r_.__value_.__l.__size_ = v8;\n    goto LABEL_11;\n  }\n  __dst[0].__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v7);\n  data = __dst[0].__r_.__value_.__s.__data_;\n  if ( v7 )\nLABEL_11:\n    memmove(data, CString, v8);\n  data[v8] = 0;\n  cocos2d::CCDictionary::setObject_1((__int64)m_reportedLevels, m_trueString, (char *)__dst);\n  if ( (*(_BYTE *)&__dst[0].__r_.__value_.__s.0 & 1) != 0 )\n    operator delete(__dst[0].__r_.__value_.__l.__data_);\n}", "assembly": "; \n; GameLevelManager::markLevelAsReported from 0x10055a5a0 to 0x10055a6d6 (310 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::reportLevel @ 0x10055a20a\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, 0x10055a5a0\nmov     rbp, rsp                                                       ; +0x1, 0x10055a5a1\npush    r15                                                            ; +0x4, 0x10055a5a4\npush    r14                                                            ; +0x6, 0x10055a5a6\npush    r13                                                            ; +0x8, 0x10055a5a8\npush    r12                                                            ; +0xa, 0x10055a5aa\npush    rbx                                                            ; +0xc, 0x10055a5ac\nsub     rsp, 28h                                                       ; +0xd, 0x10055a5ad\nmov     r15d, esi                                                      ; +0x11, 0x10055a5b1\nmov     r14, rdi                                                       ; +0x14, 0x10055a5b4\nmov     rdi, [rdi+1A8h]                                                ; +0x17, 0x10055a5b7\ncall    cocos2d__CCDictionary__count                                   ; +0x1e, 0x10055a5be\ncmp     eax, 0Ah                                                       ; +0x23, 0x10055a5c3\njb      short loc_10055A5F9                                            ; +0x26, 0x10055a5c6\nmov     rsi, [r14+1A8h]                                                ; +0x28, 0x10055a5c8\nlea     rbx, [rbp+__dst]                                               ; +0x2f, 0x10055a5cf\nmov     rdi, rbx; this                                                 ; +0x33, 0x10055a5d3\ncall    cocos2d__CCDictionary__getFirstKey                             ; +0x36, 0x10055a5d6\nmov     rdi, [r14+1A8h]                                                ; +0x3b, 0x10055a5db\nmov     rsi, rbx                                                       ; +0x42, 0x10055a5e2\ncall    cocos2d__CCDictionary__removeObjectForKey_1                    ; +0x45, 0x10055a5e5\ntest    byte ptr [rbp+__dst], 1                                        ; +0x4a, 0x10055a5ea\njz      short loc_10055A5F9                                            ; +0x4e, 0x10055a5ee\nmov     rdi, [rbp+__p]; __p                                            ; +0x50, 0x10055a5f0\ncall    __ZdlPv; operator delete(void *)                               ; +0x54, 0x10055a5f4\nmov     rbx, [r14+1A8h]                                                ; +0x59, 0x10055a5f9\nmov     r14, [r14+3A8h]                                                ; +0x60, 0x10055a600\nlea     rdi, aI; \"%i\"                                                  ; +0x67, 0x10055a607\nmov     esi, r15d                                                      ; +0x6e, 0x10055a60e\nxor     eax, eax                                                       ; +0x71, 0x10055a611\ncall    sub_1007AB580                                                  ; +0x73, 0x10055a613\nmov     rdi, rax                                                       ; +0x78, 0x10055a618\ncall    cocos2d__CCString__getCString                                  ; +0x7b, 0x10055a61b\nmov     r12, rax                                                       ; +0x80, 0x10055a620\nmov     rdi, rax; __s                                                  ; +0x83, 0x10055a623\ncall    _strlen                                                        ; +0x86, 0x10055a626\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x8b, 0x10055a62b\njnb     loc_10055A6D1                                                  ; +0x8f, 0x10055a62f\nmov     r15, rax                                                       ; +0x95, 0x10055a635\ncmp     rax, 17h                                                       ; +0x98, 0x10055a638\njnb     short loc_10055A650                                            ; +0x9c, 0x10055a63c\nlea     eax, [r15+r15]                                                 ; +0x9e, 0x10055a63e\nmov     byte ptr [rbp+__dst], al                                       ; +0xa2, 0x10055a642\nlea     r13, [rbp+__dst+1]                                             ; +0xa5, 0x10055a645\ntest    r15, r15                                                       ; +0xa9, 0x10055a649\njnz     short loc_10055A690                                            ; +0xac, 0x10055a64c\njmp     short loc_10055A69E                                            ; +0xae, 0x10055a64e\nmov     rax, r15                                                       ; +0xb0, 0x10055a650\nor      rax, 7                                                         ; +0xb3, 0x10055a653\nlea     rcx, [rax+1]                                                   ; +0xb7, 0x10055a657\ncmp     rax, 17h                                                       ; +0xbb, 0x10055a65b\nmov     [rbp+var_48], r14                                              ; +0xbf, 0x10055a65f\nmov     r14, rbx                                                       ; +0xc3, 0x10055a663\nmov     ebx, 1Ah                                                       ; +0xc6, 0x10055a666\ncmovnz  rbx, rcx                                                       ; +0xcb, 0x10055a66b\nmov     rdi, rbx; __sz                                                 ; +0xcf, 0x10055a66f\ncall    __Znwm; operator new(ulong)                                    ; +0xd2, 0x10055a672\nmov     r13, rax                                                       ; +0xd7, 0x10055a677\nmov     [rbp+__p], rax                                                 ; +0xda, 0x10055a67a\ninc     rbx                                                            ; +0xde, 0x10055a67e\nmov     [rbp+__dst], rbx                                               ; +0xe1, 0x10055a681\nmov     rbx, r14                                                       ; +0xe5, 0x10055a685\nmov     r14, [rbp+var_48]                                              ; +0xe8, 0x10055a688\nmov     [rbp+var_38], r15                                              ; +0xec, 0x10055a68c\nmov     rdi, r13; __dst                                                ; +0xf0, 0x10055a690\nmov     rsi, r12; __src                                                ; +0xf3, 0x10055a693\nmov     rdx, r15; __len                                                ; +0xf6, 0x10055a696\ncall    _memmove                                                       ; +0xf9, 0x10055a699\nmov     byte ptr [r13+r15+0], 0                                        ; +0xfe, 0x10055a69e\nlea     rdx, [rbp+__dst]                                               ; +0x104, 0x10055a6a4\nmov     rdi, rbx                                                       ; +0x108, 0x10055a6a8\nmov     rsi, r14                                                       ; +0x10b, 0x10055a6ab\ncall    cocos2d__CCDictionary__setObject_1                             ; +0x10e, 0x10055a6ae\ntest    byte ptr [rbp+__dst], 1                                        ; +0x113, 0x10055a6b3\njz      short loc_10055A6C2                                            ; +0x117, 0x10055a6b7\nmov     rdi, [rbp+__p]; __p                                            ; +0x119, 0x10055a6b9\ncall    __ZdlPv; operator delete(void *)                               ; +0x11d, 0x10055a6bd\nadd     rsp, 28h                                                       ; +0x122, 0x10055a6c2\npop     rbx                                                            ; +0x126, 0x10055a6c6\npop     r12                                                            ; +0x127, 0x10055a6c7\npop     r13                                                            ; +0x129, 0x10055a6c9\npop     r14                                                            ; +0x12b, 0x10055a6cb\npop     r15                                                            ; +0x12d, 0x10055a6cd\npop     rbp                                                            ; +0x12f, 0x10055a6cf\nretn                                                                   ; +0x130, 0x10055a6d0\ncall    sub_100006BF0                                                  ; +0x131, 0x10055a6d1", "xrefs": ["GameLevelManager::reportLevel @ 0x10055a20a"], "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"}