{"type": "func", "start": 4300371248, "end": 4300371570, "name": "GameLevelManager::onReportLevelCompleted", "pseudocode": "// \n// GameLevelManager::onReportLevelCompleted from 0x100527530 to 0x100527672 (322 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::handleIt @ 0x10051e44a\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:31:46 +0000\n// \n\nvoid __fastcall GameLevelManager::onReportLevelCompleted(__int64 a1, unsigned __int8 *a2, __int64 a3)\n{\n  const char *v4; // rdx\n  const void *v5; // rdi\n  unsigned __int64 v6; // rcx\n  char *v7; // rbx\n  size_t v8; // rdx\n  __int64 v9; // r14\n  __int64 v10; // rax\n  const char *CString; // r12\n  size_t v12; // rax\n  size_t v13; // r15\n  size_t v14; // r13\n  _QWORD __s2[2]; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  if ( (*(_BYTE *)a3 & 1) != 0 )\n    v4 = *(const char **)(a3 + 16);\n  else\n    v4 = (const char *)(a3 + 1);\n  atoi(v4);\n  *(_WORD *)((char *)__s2 + 1) = 12589;\n  BYTE3(__s2[0]) = 0;\n  v5 = a2 + 1;\n  v6 = *a2 >> 1;\n  if ( (*a2 & 1) != 0 )\n    v5 = *((const void **)a2 + 2);\n  v7 = (char *)__s2 + 1;\n  if ( (*a2 & 1) != 0 )\n    v6 = *((_QWORD *)a2 + 1);\n  v8 = 2;\n  if ( v6 < 2 )\n    v8 = v6;\n  if ( !((v6 != 2) | (memcmp(v5, (char *)__s2 + 1, v8) != 0)) )\n  {\n    v9 = *(_QWORD *)(a1 + 824);\n    v10 = sub_10088E820(\"%i\", __s2[0]);\n    CString = (const char *)cocos2d::CCString::getCString(v10);\n    v12 = strlen(CString);\n    if ( v12 >= 0xFFFFFFFFFFFFFFF8LL )\n      sub_100003630();\n    v13 = v12;\n    if ( v12 >= 0x17 )\n    {\n      v14 = 26;\n      if ( (v12 | 7) != 0x17 )\n        v14 = (v12 | 7) + 1;\n      v7 = (char *)operator new(v14);\n      __p = v7;\n      __s2[0] = v14 + 1;\n      __s2[1] = v13;\n    }\n    else\n    {\n      LOBYTE(__s2[0]) = 2 * v12;\n      if ( !v12 )\n      {\nLABEL_19:\n        v7[v13] = 0;\n        cocos2d::CCDictionary::removeObjectForKey(v9, (char *)__s2);\n        if ( (__s2[0] & 1) != 0 )\n          operator delete(__p);\n        return;\n      }\n    }\n    memmove(v7, CString, v13);\n    goto LABEL_19;\n  }\n}", "assembly": "; \n; GameLevelManager::onReportLevelCompleted from 0x100527530 to 0x100527672 (322 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::handleIt @ 0x10051e44a\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:31:46 +0000\n; \npush    rbp                                                            ; +0x0, 0x100527530\nmov     rbp, rsp                                                       ; +0x1, 0x100527531\npush    r15                                                            ; +0x4, 0x100527534\npush    r14                                                            ; +0x6, 0x100527536\npush    r13                                                            ; +0x8, 0x100527538\npush    r12                                                            ; +0xa, 0x10052753a\npush    rbx                                                            ; +0xc, 0x10052753c\nsub     rsp, 18h                                                       ; +0xd, 0x10052753d\nmov     r12, rsi                                                       ; +0x11, 0x100527541\nmov     r14, rdi                                                       ; +0x14, 0x100527544\ntest    byte ptr [rdx], 1                                              ; +0x17, 0x100527547\njnz     short loc_100527551                                            ; +0x1a, 0x10052754a\ninc     rdx                                                            ; +0x1c, 0x10052754c\njmp     short loc_100527555                                            ; +0x1f, 0x10052754f\nmov     rdx, [rdx+10h]                                                 ; +0x21, 0x100527551\nmov     rdi, rdx; char *                                               ; +0x25, 0x100527555\ncall    _atoi                                                          ; +0x28, 0x100527558\nmov     r15d, eax                                                      ; +0x2d, 0x10052755d\nmov     word ptr [rbp+__s2+1], 312Dh                                   ; +0x30, 0x100527560\nmov     byte ptr [rbp+__s2+3], 0                                       ; +0x36, 0x100527566\nmovzx   eax, byte ptr [r12]                                            ; +0x3a, 0x10052756a\nlea     rdi, [r12+1]                                                   ; +0x3f, 0x10052756f\nmov     ecx, eax                                                       ; +0x44, 0x100527574\nshr     ecx, 1                                                         ; +0x46, 0x100527576\ntest    al, 1                                                          ; +0x48, 0x100527578\ncmovnz  rdi, [r12+10h]; __s1                                           ; +0x4a, 0x10052757a\nlea     rbx, [rbp+__s2+1]                                              ; +0x50, 0x100527580\ncmovnz  rcx, [r12+8]                                                   ; +0x54, 0x100527584\ncmp     rcx, 2                                                         ; +0x5a, 0x10052758a\nmov     edx, 2                                                         ; +0x5e, 0x10052758e\ncmovb   rdx, rcx; __n                                                  ; +0x63, 0x100527593\nsetnz   r12b                                                           ; +0x67, 0x100527597\nmov     rsi, rbx; __s2                                                 ; +0x6b, 0x10052759b\ncall    _memcmp                                                        ; +0x6e, 0x10052759e\ntest    eax, eax                                                       ; +0x73, 0x1005275a3\nsetnz   al                                                             ; +0x75, 0x1005275a5\nor      al, r12b                                                       ; +0x78, 0x1005275a8\njnz     loc_10052765E                                                  ; +0x7b, 0x1005275ab\nmov     r14, [r14+338h]                                                ; +0x81, 0x1005275b1\nlea     rdi, aI_14; \"%i\"                                               ; +0x88, 0x1005275b8\nmov     esi, r15d                                                      ; +0x8f, 0x1005275bf\nxor     eax, eax                                                       ; +0x92, 0x1005275c2\ncall    sub_10088E820                                                  ; +0x94, 0x1005275c4\nmov     rdi, rax                                                       ; +0x99, 0x1005275c9\ncall    cocos2d__CCString__getCString                                  ; +0x9c, 0x1005275cc\nmov     r12, rax                                                       ; +0xa1, 0x1005275d1\nmov     rdi, rax; __s                                                  ; +0xa4, 0x1005275d4\ncall    _strlen                                                        ; +0xa7, 0x1005275d7\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xac, 0x1005275dc\njnb     loc_10052766D                                                  ; +0xb0, 0x1005275e0\nmov     r15, rax                                                       ; +0xb6, 0x1005275e6\ncmp     rax, 17h                                                       ; +0xb9, 0x1005275e9\njnb     short loc_1005275FD                                            ; +0xbd, 0x1005275ed\nlea     eax, [r15+r15]                                                 ; +0xbf, 0x1005275ef\nmov     byte ptr [rbp+__s2], al                                        ; +0xc3, 0x1005275f3\ntest    r15, r15                                                       ; +0xc6, 0x1005275f6\njnz     short loc_100527630                                            ; +0xc9, 0x1005275f9\njmp     short loc_10052763E                                            ; +0xcb, 0x1005275fb\nmov     rax, r15                                                       ; +0xcd, 0x1005275fd\nor      rax, 7                                                         ; +0xd0, 0x100527600\nlea     rcx, [rax+1]                                                   ; +0xd4, 0x100527604\ncmp     rax, 17h                                                       ; +0xd8, 0x100527608\nmov     r13d, 1Ah                                                      ; +0xdc, 0x10052760c\ncmovnz  r13, rcx                                                       ; +0xe2, 0x100527612\nmov     rdi, r13; __sz                                                 ; +0xe6, 0x100527616\ncall    __Znwm; operator new(ulong)                                    ; +0xe9, 0x100527619\nmov     rbx, rax                                                       ; +0xee, 0x10052761e\nmov     [rbp+__p], rax                                                 ; +0xf1, 0x100527621\ninc     r13                                                            ; +0xf5, 0x100527625\nmov     [rbp+__s2], r13                                                ; +0xf8, 0x100527628\nmov     [rbp+var_38], r15                                              ; +0xfc, 0x10052762c\nmov     rdi, rbx; __dst                                                ; +0x100, 0x100527630\nmov     rsi, r12; __src                                                ; +0x103, 0x100527633\nmov     rdx, r15; __len                                                ; +0x106, 0x100527636\ncall    _memmove                                                       ; +0x109, 0x100527639\nmov     byte ptr [rbx+r15], 0                                          ; +0x10e, 0x10052763e\nlea     rsi, [rbp+__s2]                                                ; +0x113, 0x100527643\nmov     rdi, r14                                                       ; +0x117, 0x100527647\ncall    cocos2d__CCDictionary__removeObjectForKey                      ; +0x11a, 0x10052764a\ntest    byte ptr [rbp+__s2], 1                                         ; +0x11f, 0x10052764f\njz      short loc_10052765E                                            ; +0x123, 0x100527653\nmov     rdi, [rbp+__p]; __p                                            ; +0x125, 0x100527655\ncall    __ZdlPv; operator delete(void *)                               ; +0x129, 0x100527659\nadd     rsp, 18h                                                       ; +0x12e, 0x10052765e\npop     rbx                                                            ; +0x132, 0x100527662\npop     r12                                                            ; +0x133, 0x100527663\npop     r13                                                            ; +0x135, 0x100527665\npop     r14                                                            ; +0x137, 0x100527667\npop     r15                                                            ; +0x139, 0x100527669\npop     rbp                                                            ; +0x13b, 0x10052766b\nretn                                                                   ; +0x13c, 0x10052766c\ncall    sub_100003630                                                  ; +0x13d, 0x10052766d", "xrefs": ["GameLevelManager::handleIt @ 0x10051e44a"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}