{"type": "func", "start": 4295571304, "end": 4295571608, "name": "GameLevelManager::tryGetUsername", "pseudocode": "// \n// GameLevelManager::tryGetUsername from 0x100093768 to 0x100093898 (304 bytes)\n// \n// 10 xrefs:\n// > GJGameLevel::create @ 0x100094404\n// > CommentCell::loadFromComment @ 0x100105d94\n// > ProfilePage::init @ 0x100196c8c\n// > ProfilePage::onInfo @ 0x10019a6d4\n// > ProfilePage::onCopyName @ 0x10019abfc\n// > ShareCommentLayer::init @ 0x1001d4878\n// > FriendRequestPopup::init @ 0x1002d8e00\n// > FriendRequestPopup::onBlock @ 0x1002d9c00\n// > GJWriteMessagePopup::init @ 0x1002dbeb8\n// > LevelBrowserLayer::getSearchTitle @ 0x100418780\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 __usercall GameLevelManager::tryGetUsername(__int64 a1@<X0>, int a2@<W1>, __int64 a3@<X8>)\n{\n  intptr_t v5; // x21\n  cocos2d::CCString *v6; // x0\n  int v7; // w22\n  GameLevelManager *v8; // x0\n  unsigned __int64 v9; // x8\n  GameLevelManager *v10; // x0\n  cocos2d::CCObject *v11; // x0\n  unsigned __int64 v12; // x8\n  char v13; // w10\n  unsigned __int64 v14; // x9\n  unsigned __int64 v15; // x11\n  GameStatsManager *v16; // x0\n  unsigned __int64 v17; // x8\n  __int128 v18; // [xsp+8h] [xbp-38h] BYREF\n  unsigned __int64 v19; // [xsp+18h] [xbp-28h]\n\n  if ( a2 )\n  {\n    v5 = a2;\n    v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(cocos2d::CCDictionary **)(a1 + 544), a2);\n    v7 = cocos2d::CCString::intValue(v6);\n    v8 = GameLevelManager::sharedState();\n    GameLevelManager::userNameForUserID((__int64)v8, v7, (_QWORD *)a3);\n    v9 = *(unsigned __int8 *)(a3 + 23);\n    if ( (v9 & 0x80u) != 0LL )\n      v9 = *(_QWORD *)(a3 + 8);\n    if ( v9 <= 1 )\n    {\n      v10 = GameLevelManager::sharedState();\n      v11 = cocos2d::CCDictionary::objectForKey(v10->m_storedUserInfo, v5);\n      if ( v11 )\n        std::string::operator=((std::string *)a3, (const std::string *)&v11[5].m_unknown2);\n    }\n    v12 = *(unsigned __int8 *)(a3 + 23);\n    v13 = v12;\n    v14 = *(_QWORD *)(a3 + 8);\n    if ( (v12 & 0x80u) == 0LL )\n      v15 = *(unsigned __int8 *)(a3 + 23);\n    else\n      v15 = *(_QWORD *)(a3 + 8);\n    if ( v15 <= 1 )\n    {\n      v16 = GameStatsManager::sharedState();\n      GameStatsManager::usernameForAccountID(v16, a2, &v18);\n      if ( *(char *)(a3 + 23) < 0 )\n        operator delete(*(void **)a3);\n      *(_OWORD *)a3 = v18;\n      v17 = v19;\n      *(_QWORD *)(a3 + 16) = v19;\n      v12 = HIBYTE(v17);\n      v14 = *(_QWORD *)(a3 + 8);\n      v13 = v12;\n    }\n    if ( v13 < 0 )\n      v12 = v14;\n    if ( !v12 )\n      std::string::assign((std::string *)a3, \"-\");\n  }\n  else\n  {\n    sub_100009900((_QWORD *)a3, \"-\");\n  }\n}", "assembly": "; \n; GameLevelManager::tryGetUsername from 0x100093768 to 0x100093898 (304 bytes)\n; \n; 10 xrefs:\n; > GJGameLevel::create @ 0x100094404\n; > CommentCell::loadFromComment @ 0x100105d94\n; > ProfilePage::init @ 0x100196c8c\n; > ProfilePage::onInfo @ 0x10019a6d4\n; > ProfilePage::onCopyName @ 0x10019abfc\n; > ShareCommentLayer::init @ 0x1001d4878\n; > FriendRequestPopup::init @ 0x1002d8e00\n; > FriendRequestPopup::onBlock @ 0x1002d9c00\n; > GJWriteMessagePopup::init @ 0x1002dbeb8\n; > LevelBrowserLayer::getSearchTitle @ 0x100418780\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x100093768\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x10009376c\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x100093770\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x100093774\nADD             X29, SP, #0x40                                         ; +0x10, 0x100093778\nMOV             X19, X8                                                ; +0x14, 0x10009377c\nCBZ             W1, loc_100093878                                      ; +0x18, 0x100093780\nMOV             X20, X1                                                ; +0x1c, 0x100093784\nLDR             X0, [X0,#0x220]                                        ; +0x20, 0x100093788\nSXTW            X21, W20                                               ; +0x24, 0x10009378c\nMOV             X1, X21                                                ; +0x28, 0x100093790\nBL              cocos2d__CCDictionary__valueForKey                     ; +0x2c, 0x100093794\nBL              cocos2d__CCString__intValue                            ; +0x30, 0x100093798\nMOV             X22, X0                                                ; +0x34, 0x10009379c\nBL              GameLevelManager__sharedState                          ; +0x38, 0x1000937a0\nMOV             X8, X19                                                ; +0x3c, 0x1000937a4\nMOV             X1, X22                                                ; +0x40, 0x1000937a8\nBL              GameLevelManager__userNameForUserID                    ; +0x44, 0x1000937ac\nLDRB            W8, [X19,#0x17]                                        ; +0x48, 0x1000937b0\nSXTB            W9, W8                                                 ; +0x4c, 0x1000937b4\nLDR             X10, [X19,#8]                                          ; +0x50, 0x1000937b8\nCMP             W9, #0                                                 ; +0x54, 0x1000937bc\nCSEL            X8, X10, X8, LT                                        ; +0x58, 0x1000937c0\nCMP             X8, #1                                                 ; +0x5c, 0x1000937c4\nB.HI            loc_1000937EC                                          ; +0x60, 0x1000937c8\nBL              GameLevelManager__sharedState                          ; +0x64, 0x1000937cc\nLDR             X0, [X0,#0x268]                                        ; +0x68, 0x1000937d0\nMOV             X1, X21                                                ; +0x6c, 0x1000937d4\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x70, 0x1000937d8\nCBZ             X0, loc_1000937EC                                      ; +0x74, 0x1000937dc\nADD             X1, X0, #0x140; __str                                  ; +0x78, 0x1000937e0\nMOV             X0, X19; this                                          ; +0x7c, 0x1000937e4\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x80, 0x1000937e8\nLDRB            W8, [X19,#0x17]                                        ; +0x84, 0x1000937ec\nSXTB            W10, W8                                                ; +0x88, 0x1000937f0\nLDR             X9, [X19,#8]                                           ; +0x8c, 0x1000937f4\nCMP             W10, #0                                                ; +0x90, 0x1000937f8\nCSEL            X11, X9, X8, LT                                        ; +0x94, 0x1000937fc\nCMP             X11, #1                                                ; +0x98, 0x100093800\nB.HI            loc_100093844                                          ; +0x9c, 0x100093804\nBL              GameStatsManager__sharedState                          ; +0xa0, 0x100093808\nADD             X8, SP, #0x40+var_38                                   ; +0xa4, 0x10009380c\nMOV             X1, X20                                                ; +0xa8, 0x100093810\nBL              GameStatsManager__usernameForAccountID                 ; +0xac, 0x100093814\nLDRSB           W8, [X19,#0x17]                                        ; +0xb0, 0x100093818\nTBZ             W8, #0x1F, loc_100093828                               ; +0xb4, 0x10009381c\nLDR             X0, [X19]; __p                                         ; +0xb8, 0x100093820\nBL              __ZdlPv; operator delete(void *)                       ; +0xbc, 0x100093824\nLDUR            Q0, [SP,#0x40+var_38]                                  ; +0xc0, 0x100093828\nSTR             Q0, [X19]                                              ; +0xc4, 0x10009382c\nLDR             X8, [SP,#0x40+var_28]                                  ; +0xc8, 0x100093830\nSTR             X8, [X19,#0x10]                                        ; +0xcc, 0x100093834\nLSR             X8, X8, #0x38 ; '8'                                    ; +0xd0, 0x100093838\nLDR             X9, [X19,#8]                                           ; +0xd4, 0x10009383c\nMOV             X10, X8                                                ; +0xd8, 0x100093840\nSXTB            W10, W10                                               ; +0xdc, 0x100093844\nCMP             W10, #0                                                ; +0xe0, 0x100093848\nCSEL            X8, X9, X8, LT                                         ; +0xe4, 0x10009384c\nCBNZ            X8, loc_100093864                                      ; +0xe8, 0x100093850\nADRL            X1, asc_1006B3A59; \"-\"                                 ; +0xec, 0x100093854\nMOV             X0, X19; this                                          ; +0xf4, 0x10009385c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xf8, 0x100093860\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0xfc, 0x100093864\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x100, 0x100093868\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x104, 0x10009386c\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x108, 0x100093870\nRET                                                                    ; +0x10c, 0x100093874\nADRL            X1, asc_1006B3A59; \"-\"                                 ; +0x110, 0x100093878\nMOV             X0, X19; int                                           ; +0x118, 0x100093880\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x11c, 0x100093884\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x120, 0x100093888\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x124, 0x10009388c\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x128, 0x100093890\nB               sub_100009900                                          ; +0x12c, 0x100093894", "xrefs": ["GJGameLevel::create @ 0x100094404", "CommentCell::loadFromComment @ 0x100105d94", "ProfilePage::init @ 0x100196c8c", "ProfilePage::onInfo @ 0x10019a6d4", "ProfilePage::onCopyName @ 0x10019abfc", "ShareCommentLayer::init @ 0x1001d4878", "FriendRequestPopup::init @ 0x1002d8e00", "FriendRequestPopup::onBlock @ 0x1002d9c00", "GJWriteMessagePopup::init @ 0x1002dbeb8", "LevelBrowserLayer::getSearchTitle @ 0x100418780"], "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"}