{"type": "func", "start": 4300472240, "end": 4300472836, "name": "GameLevelManager::storeUserName", "pseudocode": "// \n// GameLevelManager::storeUserName from 0x10053ffb0 to 0x100540204 (596 bytes)\n// \n// 13 xrefs:\n// > GameLevelManager::onGetUserListCompleted @ 0x100529b1d\n// > GameLevelManager::onGetFriendRequestsCompleted @ 0x10052a31a\n// > GameLevelManager::onGetUserMessagesCompleted @ 0x10052ab3a\n// > sub_100536210 @ 0x100536c35\n// > sub_10053AEC0 @ 0x10053b282\n// > GameLevelManager::storeUserNames @ 0x10053fb3c\n// > GameLevelManager::createAndGetScores @ 0x100544827\n// > GameLevelManager::updateUsernames @ 0x10054e5a2\n// > GameLevelManager::storeUserInfo @ 0x1005677ee\n// > sub_10056AAF0 @ 0x10056b002\n// > sub_100573E40 @ 0x1005743e5\n// > sub_100573E40 @ 0x100574759\n// > ProfilePage::init @ 0x10089de03\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:57 +0000\n// \n\nvoid __fastcall GameLevelManager::storeUserName(__int64 a1, int a2, int a3, const std::string *a4)\n{\n  unsigned int v5; // eax\n  char *v6; // rax\n  const char *data; // r12\n  size_t v8; // rax\n  _DWORD *v9; // r15\n  char *v10; // r14\n  size_t v11; // r13\n  __int64 v12; // rbx\n  __int64 v13; // rax\n  const char *CString; // r13\n  size_t v15; // rax\n  size_t v16; // r15\n  char *v17; // r14\n  size_t v18; // r12\n  unsigned int v19; // ebx\n  __int64 v20; // r14\n  __int64 v21; // rax\n  __int64 v22; // r14\n  __int64 v23; // rax\n  char v24; // [rsp+0h] [rbp-70h]\n  __int64 v25; // [rsp+0h] [rbp-70h]\n  char v26; // [rsp+0h] [rbp-70h]\n  _QWORD v27[2]; // [rsp+10h] [rbp-60h] BYREF\n  void *__p; // [rsp+20h] [rbp-50h]\n  _DWORD *__dst[2]; // [rsp+28h] [rbp-48h] BYREF\n  void *v30; // [rsp+38h] [rbp-38h]\n  int v31; // [rsp+40h] [rbp-30h]\n  int v32[11]; // [rsp+44h] [rbp-2Ch] BYREF\n\n  v32[0] = a3;\n  if ( a3 > 0 )\n  {\n    v5 = (unsigned int)a4->__r_.__value_.__l.0;\n    if ( (v5 & 1) != 0 )\n    {\n      if ( a4->__r_.__value_.__l.__size_ < 2 )\n        goto LABEL_7;\n    }\n    else if ( v5 >> 1 < 2uLL )\n    {\n      goto LABEL_7;\n    }\n    __dst[0] = v32;\n    v6 = sub_1000E8600((float *)(a1 + 1000), v32, (__int64)&unk_100A0CEB7, __dst);\n    std::string::operator=((std::string *)v6 + 1, a4);\n  }\nLABEL_7:\n  if ( a2 <= 0 )\n    return;\n  if ( (*(_BYTE *)&a4->__r_.__value_.__s.0 & 1) != 0 )\n    data = a4->__r_.__value_.__l.__data_;\n  else\n    data = a4->__r_.__value_.__s.__data_;\n  v8 = strlen(data);\n  if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v9 = (_DWORD *)v8;\n  v24 = *(_QWORD *)(a1 + 976);\n  v31 = a2;\n  if ( v8 >= 0x17 )\n  {\n    v11 = 26;\n    if ( (v8 | 7) != 0x17 )\n      v11 = (v8 | 7) + 1;\n    v10 = (char *)operator new(v11);\n    v30 = v10;\n    __dst[0] = (_DWORD *)(v11 + 1);\n    __dst[1] = v9;\n    goto LABEL_18;\n  }\n  LOBYTE(__dst[0]) = 2 * v8;\n  v10 = (char *)__dst + 1;\n  if ( v8 )\nLABEL_18:\n    memmove(v10, data, (size_t)v9);\n  *((_BYTE *)v9 + (_QWORD)v10) = 0;\n  v12 = sub_10088E600(__dst);\n  v13 = sub_10088E820(\"%i\", v24);\n  CString = (const char *)cocos2d::CCString::getCString(v13);\n  v15 = strlen(CString);\n  if ( v15 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v16 = v15;\n  if ( v15 >= 0x17 )\n  {\n    v18 = 26;\n    if ( (v15 | 7) != 0x17 )\n      v18 = (v15 | 7) + 1;\n    v17 = (char *)operator new(v18);\n    __p = v17;\n    v27[0] = v18 | 1;\n    v27[1] = v16;\n    goto LABEL_26;\n  }\n  LOBYTE(v27[0]) = 2 * v15;\n  v17 = (char *)v27 + 1;\n  if ( v15 )\nLABEL_26:\n    memmove(v17, CString, v16);\n  v17[v16] = 0;\n  cocos2d::CCDictionary::setObject(v25, v12, (char *)v27);\n  v19 = v31;\n  if ( (v27[0] & 1) != 0 )\n  {\n    operator delete(__p);\n    if ( ((__int64)__dst[0] & 1) == 0 )\n    {\nLABEL_29:\n      if ( v32[0] <= 0 )\n        return;\n      goto LABEL_30;\n    }\n  }\n  else if ( ((__int64)__dst[0] & 1) == 0 )\n  {\n    goto LABEL_29;\n  }\n  operator delete(v30);\n  if ( v32[0] > 0 )\n  {\nLABEL_30:\n    v20 = *(_QWORD *)(a1 + 992);\n    v21 = sub_10088E820(\"%i\", v25);\n    cocos2d::CCDictionary::setObject_1(v20, v21, v19);\n    v22 = *(_QWORD *)(a1 + 984);\n    v23 = sub_10088E820(\"%i\", v26);\n    cocos2d::CCDictionary::setObject_1(v22, v23, v32[0]);\n  }\n}", "assembly": "; \n; GameLevelManager::storeUserName from 0x10053ffb0 to 0x100540204 (596 bytes)\n; \n; 13 xrefs:\n; > GameLevelManager::onGetUserListCompleted @ 0x100529b1d\n; > GameLevelManager::onGetFriendRequestsCompleted @ 0x10052a31a\n; > GameLevelManager::onGetUserMessagesCompleted @ 0x10052ab3a\n; > sub_100536210 @ 0x100536c35\n; > sub_10053AEC0 @ 0x10053b282\n; > GameLevelManager::storeUserNames @ 0x10053fb3c\n; > GameLevelManager::createAndGetScores @ 0x100544827\n; > GameLevelManager::updateUsernames @ 0x10054e5a2\n; > GameLevelManager::storeUserInfo @ 0x1005677ee\n; > sub_10056AAF0 @ 0x10056b002\n; > sub_100573E40 @ 0x1005743e5\n; > sub_100573E40 @ 0x100574759\n; > ProfilePage::init @ 0x10089de03\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:57 +0000\n; \npush    rbp                                                            ; +0x0, 0x10053ffb0\nmov     rbp, rsp                                                       ; +0x1, 0x10053ffb1\npush    r15                                                            ; +0x4, 0x10053ffb4\npush    r14                                                            ; +0x6, 0x10053ffb6\npush    r13                                                            ; +0x8, 0x10053ffb8\npush    r12                                                            ; +0xa, 0x10053ffba\npush    rbx                                                            ; +0xc, 0x10053ffbc\nsub     rsp, 48h                                                       ; +0xd, 0x10053ffbd\nmov     r12, rcx                                                       ; +0x11, 0x10053ffc1\nmov     ebx, esi                                                       ; +0x14, 0x10053ffc4\nmov     r14, rdi                                                       ; +0x16, 0x10053ffc6\nmov     [rbp+var_2C], edx                                              ; +0x19, 0x10053ffc9\ntest    edx, edx                                                       ; +0x1c, 0x10053ffcc\njle     short loc_10054001D                                            ; +0x1e, 0x10053ffce\nmovzx   eax, byte ptr [r12]                                            ; +0x20, 0x10053ffd0\ntest    al, 1                                                          ; +0x25, 0x10053ffd5\njnz     short loc_10053FFE3                                            ; +0x27, 0x10053ffd7\nshr     eax, 1                                                         ; +0x29, 0x10053ffd9\ncmp     rax, 2                                                         ; +0x2b, 0x10053ffdb\njnb     short loc_10053FFEE                                            ; +0x2f, 0x10053ffdf\njmp     short loc_10054001D                                            ; +0x31, 0x10053ffe1\nmov     rax, [r12+8]                                                   ; +0x33, 0x10053ffe3\ncmp     rax, 2                                                         ; +0x38, 0x10053ffe8\njb      short loc_10054001D                                            ; +0x3c, 0x10053ffec\nlea     rdi, [r14+3E8h]                                                ; +0x3e, 0x10053ffee\nlea     rsi, [rbp+var_2C]                                              ; +0x45, 0x10053fff5\nmov     [rbp+__dst], rsi                                               ; +0x49, 0x10053fff9\nlea     rdx, unk_100A0CEB7                                             ; +0x4d, 0x10053fffd\nlea     rcx, [rbp+__dst]                                               ; +0x54, 0x100540004\nlea     r8, [rbp+var_60]                                               ; +0x58, 0x100540008\ncall    sub_1000E8600                                                  ; +0x5c, 0x10054000c\nlea     rdi, [rax+18h]; this                                           ; +0x61, 0x100540011\nmov     rsi, r12; __str                                                ; +0x65, 0x100540015\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x68, 0x100540018\ntest    ebx, ebx                                                       ; +0x6d, 0x10054001d\njle     loc_1005401CA                                                  ; +0x6f, 0x10054001f\ntest    byte ptr [r12], 1                                              ; +0x75, 0x100540025\njnz     short loc_100540031                                            ; +0x7a, 0x10054002a\ninc     r12                                                            ; +0x7c, 0x10054002c\njmp     short loc_100540036                                            ; +0x7f, 0x10054002f\nmov     r12, [r12+10h]                                                 ; +0x81, 0x100540031\nmov     r13, [r14+3D0h]                                                ; +0x86, 0x100540036\nmov     rdi, r12; __s                                                  ; +0x8d, 0x10054003d\ncall    _strlen                                                        ; +0x90, 0x100540040\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x95, 0x100540045\njnb     loc_1005401FA                                                  ; +0x99, 0x100540049\nmov     r15, rax                                                       ; +0x9f, 0x10054004f\ncmp     rax, 17h                                                       ; +0xa2, 0x100540052\nmov     [rbp+var_68], r14                                              ; +0xa6, 0x100540056\nmov     [rbp+var_70], r13                                              ; +0xaa, 0x10054005a\nmov     [rbp+var_30], ebx                                              ; +0xae, 0x10054005e\njnb     short loc_100540075                                            ; +0xb1, 0x100540061\nlea     eax, [r15+r15]                                                 ; +0xb3, 0x100540063\nmov     byte ptr [rbp+__dst], al                                       ; +0xb7, 0x100540067\nlea     r14, [rbp+__dst+1]                                             ; +0xba, 0x10054006a\ntest    r15, r15                                                       ; +0xbe, 0x10054006e\njnz     short loc_1005400A8                                            ; +0xc1, 0x100540071\njmp     short loc_1005400B6                                            ; +0xc3, 0x100540073\nmov     rax, r15                                                       ; +0xc5, 0x100540075\nor      rax, 7                                                         ; +0xc8, 0x100540078\nlea     rcx, [rax+1]                                                   ; +0xcc, 0x10054007c\ncmp     rax, 17h                                                       ; +0xd0, 0x100540080\nmov     r13d, 1Ah                                                      ; +0xd4, 0x100540084\ncmovnz  r13, rcx                                                       ; +0xda, 0x10054008a\nmov     rdi, r13; __sz                                                 ; +0xde, 0x10054008e\ncall    __Znwm; operator new(ulong)                                    ; +0xe1, 0x100540091\nmov     r14, rax                                                       ; +0xe6, 0x100540096\nmov     [rbp+var_38], rax                                              ; +0xe9, 0x100540099\ninc     r13                                                            ; +0xed, 0x10054009d\nmov     [rbp+__dst], r13                                               ; +0xf0, 0x1005400a0\nmov     [rbp+var_40], r15                                              ; +0xf4, 0x1005400a4\nmov     rdi, r14; __dst                                                ; +0xf8, 0x1005400a8\nmov     rsi, r12; __src                                                ; +0xfb, 0x1005400ab\nmov     rdx, r15; __len                                                ; +0xfe, 0x1005400ae\ncall    _memmove                                                       ; +0x101, 0x1005400b1\nmov     byte ptr [r14+r15], 0                                          ; +0x106, 0x1005400b6\nlea     rdi, [rbp+__dst]                                               ; +0x10b, 0x1005400bb\ncall    sub_10088E600                                                  ; +0x10f, 0x1005400bf\nmov     rbx, rax                                                       ; +0x114, 0x1005400c4\nlea     rdi, aI_14; \"%i\"                                               ; +0x117, 0x1005400c7\nmov     esi, [rbp+var_30]                                              ; +0x11e, 0x1005400ce\nxor     eax, eax                                                       ; +0x121, 0x1005400d1\ncall    sub_10088E820                                                  ; +0x123, 0x1005400d3\nmov     rdi, rax                                                       ; +0x128, 0x1005400d8\ncall    cocos2d__CCString__getCString                                  ; +0x12b, 0x1005400db\nmov     r13, rax                                                       ; +0x130, 0x1005400e0\nmov     rdi, rax; __s                                                  ; +0x133, 0x1005400e3\ncall    _strlen                                                        ; +0x136, 0x1005400e6\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x13b, 0x1005400eb\njnb     loc_1005401FF                                                  ; +0x13f, 0x1005400ef\nmov     r15, rax                                                       ; +0x145, 0x1005400f5\ncmp     rax, 17h                                                       ; +0x148, 0x1005400f8\njnb     short loc_100540110                                            ; +0x14c, 0x1005400fc\nlea     eax, [r15+r15]                                                 ; +0x14e, 0x1005400fe\nmov     byte ptr [rbp+var_60], al                                      ; +0x152, 0x100540102\nlea     r14, [rbp+var_60+1]                                            ; +0x155, 0x100540105\ntest    r15, r15                                                       ; +0x159, 0x100540109\njnz     short loc_100540144                                            ; +0x15c, 0x10054010c\njmp     short loc_100540152                                            ; +0x15e, 0x10054010e\nmov     rax, r15                                                       ; +0x160, 0x100540110\nor      rax, 7                                                         ; +0x163, 0x100540113\nlea     rcx, [rax+1]                                                   ; +0x167, 0x100540117\ncmp     rax, 17h                                                       ; +0x16b, 0x10054011b\nmov     r12d, 1Ah                                                      ; +0x16f, 0x10054011f\ncmovnz  r12, rcx                                                       ; +0x175, 0x100540125\nmov     rdi, r12; __sz                                                 ; +0x179, 0x100540129\ncall    __Znwm; operator new(ulong)                                    ; +0x17c, 0x10054012c\nmov     r14, rax                                                       ; +0x181, 0x100540131\nmov     [rbp+__p], rax                                                 ; +0x184, 0x100540134\nor      r12, 1                                                         ; +0x188, 0x100540138\nmov     [rbp+var_60], r12                                              ; +0x18c, 0x10054013c\nmov     [rbp+var_58], r15                                              ; +0x190, 0x100540140\nmov     rdi, r14; __dst                                                ; +0x194, 0x100540144\nmov     rsi, r13; __src                                                ; +0x197, 0x100540147\nmov     rdx, r15; __len                                                ; +0x19a, 0x10054014a\ncall    _memmove                                                       ; +0x19d, 0x10054014d\nmov     byte ptr [r14+r15], 0                                          ; +0x1a2, 0x100540152\nlea     rdx, [rbp+var_60]                                              ; +0x1a7, 0x100540157\nmov     rdi, [rbp+var_70]                                              ; +0x1ab, 0x10054015b\nmov     rsi, rbx                                                       ; +0x1af, 0x10054015f\ncall    cocos2d__CCDictionary__setObject                               ; +0x1b2, 0x100540162\ntest    byte ptr [rbp+var_60], 1                                       ; +0x1b7, 0x100540167\nmov     r12, [rbp+var_68]                                              ; +0x1bb, 0x10054016b\nmov     ebx, [rbp+var_30]                                              ; +0x1bf, 0x10054016f\njnz     short loc_1005401D9                                            ; +0x1c2, 0x100540172\ntest    byte ptr [rbp+__dst], 1                                        ; +0x1c4, 0x100540174\njnz     short loc_1005401E8                                            ; +0x1c8, 0x100540178\nmov     esi, [rbp+var_2C]                                              ; +0x1ca, 0x10054017a\ntest    esi, esi                                                       ; +0x1cd, 0x10054017d\njle     short loc_1005401CA                                            ; +0x1cf, 0x10054017f\nmov     r14, [r12+3E0h]                                                ; +0x1d1, 0x100540181\nlea     r15, aI_14; \"%i\"                                               ; +0x1d9, 0x100540189\nmov     rdi, r15; __format                                             ; +0x1e0, 0x100540190\nxor     eax, eax                                                       ; +0x1e3, 0x100540193\ncall    sub_10088E820                                                  ; +0x1e5, 0x100540195\nmov     edx, ebx                                                       ; +0x1ea, 0x10054019a\nmov     rdi, r14                                                       ; +0x1ec, 0x10054019c\nmov     rsi, rax                                                       ; +0x1ef, 0x10054019f\ncall    cocos2d__CCDictionary__setObject_1                             ; +0x1f2, 0x1005401a2\nmov     r14, [r12+3D8h]                                                ; +0x1f7, 0x1005401a7\nmov     rdi, r15; __format                                             ; +0x1ff, 0x1005401af\nmov     esi, ebx                                                       ; +0x202, 0x1005401b2\nxor     eax, eax                                                       ; +0x204, 0x1005401b4\ncall    sub_10088E820                                                  ; +0x206, 0x1005401b6\nmovsxd  rdx, [rbp+var_2C]                                              ; +0x20b, 0x1005401bb\nmov     rdi, r14                                                       ; +0x20f, 0x1005401bf\nmov     rsi, rax                                                       ; +0x212, 0x1005401c2\ncall    cocos2d__CCDictionary__setObject_1                             ; +0x215, 0x1005401c5\nadd     rsp, 48h                                                       ; +0x21a, 0x1005401ca\npop     rbx                                                            ; +0x21e, 0x1005401ce\npop     r12                                                            ; +0x21f, 0x1005401cf\npop     r13                                                            ; +0x221, 0x1005401d1\npop     r14                                                            ; +0x223, 0x1005401d3\npop     r15                                                            ; +0x225, 0x1005401d5\npop     rbp                                                            ; +0x227, 0x1005401d7\nretn                                                                   ; +0x228, 0x1005401d8\nmov     rdi, [rbp+__p]; __p                                            ; +0x229, 0x1005401d9\ncall    __ZdlPv; operator delete(void *)                               ; +0x22d, 0x1005401dd\ntest    byte ptr [rbp+__dst], 1                                        ; +0x232, 0x1005401e2\njz      short loc_10054017A                                            ; +0x236, 0x1005401e6\nmov     rdi, [rbp+var_38]; __p                                         ; +0x238, 0x1005401e8\ncall    __ZdlPv; operator delete(void *)                               ; +0x23c, 0x1005401ec\nmov     esi, [rbp+var_2C]                                              ; +0x241, 0x1005401f1\ntest    esi, esi                                                       ; +0x244, 0x1005401f4\njg      short loc_100540181                                            ; +0x246, 0x1005401f6\njmp     short loc_1005401CA                                            ; +0x248, 0x1005401f8\ncall    sub_100003630                                                  ; +0x24a, 0x1005401fa\ncall    sub_100003630                                                  ; +0x24f, 0x1005401ff", "xrefs": ["GameLevelManager::onGetUserListCompleted @ 0x100529b1d", "GameLevelManager::onGetFriendRequestsCompleted @ 0x10052a31a", "GameLevelManager::onGetUserMessagesCompleted @ 0x10052ab3a", "sub_100536210 @ 0x100536c35", "sub_10053AEC0 @ 0x10053b282", "GameLevelManager::storeUserNames @ 0x10053fb3c", "GameLevelManager::createAndGetScores @ 0x100544827", "GameLevelManager::updateUsernames @ 0x10054e5a2", "GameLevelManager::storeUserInfo @ 0x1005677ee", "sub_10056AAF0 @ 0x10056b002", "sub_100573E40 @ 0x1005743e5", "sub_100573E40 @ 0x100574759", "ProfilePage::init @ 0x10089de03"], "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"}