{"type": "func", "start": 4300447584, "end": 4300447822, "name": "GameLevelManager::updateUsernames", "pseudocode": "// \n// GameLevelManager::updateUsernames from 0x100539f60 to 0x10053a04e (238 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::dataLoaded @ 0x10053c8f3\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::updateUsernames(GameLevelManager *a1)\n{\n  __int128 v1; // xmm0\n  cocos2d::CCDictionary *m_onlineLevels; // rax\n  cocos2d::CCDictElement *m_pElements; // r13\n  cocos2d::CCObject *m_pObject; // rax\n  int v5; // r15d\n  int v6; // r12d\n  unsigned int *p_m_uAutoReleaseCount; // rax\n  __int128 v8; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  m_onlineLevels = a1->m_onlineLevels;\n  if ( m_onlineLevels )\n  {\n    m_pElements = m_onlineLevels->m_pElements;\n    while ( m_pElements )\n    {\n      m_pObject = m_pElements->m_pObject;\n      m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;\n      v5 = m_pObject[10].m_uID - m_pObject[10].m_nLuaID;\n      v6 = m_pObject[10].m_uReference - m_pObject[10].m_uAutoReleaseCount;\n      if ( (m_pObject[7].m_uAutoReleaseCount & 1) != 0 )\n      {\n        sub_100006B70(\n          &v8,\n          *(const void **)&m_pObject[7].m_unknown2,\n          *(_QWORD *)&m_pObject[7].m_uIndexInArray,\n          *(double *)&v1);\n      }\n      else\n      {\n        p_m_uAutoReleaseCount = &m_pObject[7].m_uAutoReleaseCount;\n        __p = *((void **)p_m_uAutoReleaseCount + 2);\n        v1 = *(_OWORD *)p_m_uAutoReleaseCount;\n        v8 = *(_OWORD *)p_m_uAutoReleaseCount;\n      }\n      GameLevelManager::storeUserName((__int64)a1, v5, v6, (__int64)&v8, *(double *)&v1);\n      if ( (v8 & 1) != 0 )\n        operator delete(__p);\n    }\n  }\n}", "assembly": "; \n; GameLevelManager::updateUsernames from 0x100539f60 to 0x10053a04e (238 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::dataLoaded @ 0x10053c8f3\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, 0x100539f60\nmov     rbp, rsp                                                       ; +0x1, 0x100539f61\npush    r15                                                            ; +0x4, 0x100539f64\npush    r14                                                            ; +0x6, 0x100539f66\npush    r13                                                            ; +0x8, 0x100539f68\npush    r12                                                            ; +0xa, 0x100539f6a\npush    rbx                                                            ; +0xc, 0x100539f6c\nsub     rsp, 18h                                                       ; +0xd, 0x100539f6d\nmov     rax, [rdi+168h]                                                ; +0x11, 0x100539f71\ntest    rax, rax                                                       ; +0x18, 0x100539f78\njz      loc_10053A03F                                                  ; +0x1b, 0x100539f7b\nmov     r13, [rax+38h]                                                 ; +0x21, 0x100539f81\ntest    r13, r13                                                       ; +0x25, 0x100539f85\njz      loc_10053A03F                                                  ; +0x28, 0x100539f88\nmov     rbx, rdi                                                       ; +0x2e, 0x100539f8e\nlea     r14, [rbp+var_40]                                              ; +0x31, 0x100539f91\njmp     short loc_100539FA9                                            ; +0x35, 0x100539f95\nalign 20h                                                              ; +0x37, 0x100539f97\ntest    r13, r13                                                       ; +0x40, 0x100539fa0\njz      loc_10053A03F                                                  ; +0x43, 0x100539fa3\nmov     rax, [r13+108h]                                                ; +0x49, 0x100539fa9\nmov     r13, [r13+120h]                                                ; +0x50, 0x100539fb0\nmov     r15d, [rax+238h]                                               ; +0x57, 0x100539fb7\nmov     r12d, [rax+244h]                                               ; +0x5e, 0x100539fbe\nsub     r15d, [rax+23Ch]                                               ; +0x65, 0x100539fc5\nsub     r12d, [rax+248h]                                               ; +0x6c, 0x100539fcc\ntest    byte ptr [rax+1A0h], 1                                         ; +0x73, 0x100539fd3\njnz     short loc_10053A000                                            ; +0x7a, 0x100539fda\nadd     rax, 1A0h                                                      ; +0x7c, 0x100539fdc\nmov     rcx, [rax+10h]                                                 ; +0x82, 0x100539fe2\nmov     [rbp+__p], rcx                                                 ; +0x86, 0x100539fe6\nmovups  xmm0, xmmword ptr [rax]                                        ; +0x8a, 0x100539fea\nmovaps  [rbp+var_40], xmm0                                             ; +0x8d, 0x100539fed\njmp     short loc_10053A016                                            ; +0x91, 0x100539ff1\nalign 20h                                                              ; +0x93, 0x100539ff3\nmov     rdx, [rax+1A8h]                                                ; +0xa0, 0x10053a000\nmov     rsi, [rax+1B0h]                                                ; +0xa7, 0x10053a007\nmov     rdi, r14                                                       ; +0xae, 0x10053a00e\ncall    sub_100006B70                                                  ; +0xb1, 0x10053a011\nmov     rdi, rbx                                                       ; +0xb6, 0x10053a016\nmov     esi, r15d                                                      ; +0xb9, 0x10053a019\nmov     edx, r12d                                                      ; +0xbc, 0x10053a01c\nmov     rcx, r14                                                       ; +0xbf, 0x10053a01f\ncall    GameLevelManager__storeUserName                                ; +0xc2, 0x10053a022\ntest    byte ptr [rbp+var_40], 1                                       ; +0xc7, 0x10053a027\njz      loc_100539FA0                                                  ; +0xcb, 0x10053a02b\nmov     rdi, [rbp+__p]; __p                                            ; +0xd1, 0x10053a031\ncall    __ZdlPv; operator delete(void *)                               ; +0xd5, 0x10053a035\njmp     loc_100539FA0                                                  ; +0xda, 0x10053a03a\nadd     rsp, 18h                                                       ; +0xdf, 0x10053a03f\npop     rbx                                                            ; +0xe3, 0x10053a043\npop     r12                                                            ; +0xe4, 0x10053a044\npop     r13                                                            ; +0xe6, 0x10053a046\npop     r14                                                            ; +0xe8, 0x10053a048\npop     r15                                                            ; +0xea, 0x10053a04a\npop     rbp                                                            ; +0xec, 0x10053a04c\nretn                                                                   ; +0xed, 0x10053a04d", "xrefs": ["GameLevelManager::dataLoaded @ 0x10053c8f3"], "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"}