{"type": "func", "start": 4298773164, "end": 4298773412, "name": "GJAccountManager::linkToAccount", "pseudocode": "// \n// GJAccountManager::linkToAccount from 0x1003a12ac to 0x1003a13a4 (248 bytes)\n// \n// 1 xrefs:\n// > AccountLoginLayer::loginAccountFinished @ 0x100083f3c\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 GJAccountManager::linkToAccount(__int64 a1, const std::string *a2, std::string *__str, int a4, int a5)\n{\n  GameManager *v9; // x21\n  GameManager *v10; // x21\n  float v11; // s0\n  void (__fastcall ***v12)(_QWORD); // x0\n  GameManager *v13; // x0\n  std::string __p; // [xsp+0h] [xbp-50h] BYREF\n\n  std::string::operator=((std::string *)(a1 + 368), __str);\n  std::string::operator=((std::string *)(a1 + 328), a2);\n  *(_DWORD *)(a1 + 352) = a4;\n  v9 = GameManager::sharedState();\n  if ( *(char *)(a1 + 351) < 0 )\n    sub_1000097D0(&__p, *(void **)(a1 + 328), *(_QWORD *)(a1 + 336));\n  else\n    __p = *(std::string *)(a1 + 328);\n  std::string::operator=((std::string *)&v9->m_playerName, &__p);\n  if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__p.__r_.__value_.__l.__data_);\n  v10 = GameManager::sharedState();\n  v10->m_playerUserID.value = a5;\n  v11 = vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0;\n  v10->m_playerUserID.seed = (int)v11;\n  v10->m_playerUserID.random = (int)v11 + a5;\n  v12 = *(void (__fastcall ****)(_QWORD))(a1 + 408);\n  if ( v12 )\n    (**v12)(v12);\n  v13 = GameManager::sharedState();\n  GameManager::accountStatusChanged(v13);\n}", "assembly": "; \n; GJAccountManager::linkToAccount from 0x1003a12ac to 0x1003a13a4 (248 bytes)\n; \n; 1 xrefs:\n; > AccountLoginLayer::loginAccountFinished @ 0x100083f3c\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, #0x60                                          ; +0x0, 0x1003a12ac\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x4, 0x1003a12b0\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x1003a12b4\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x1003a12b8\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x1003a12bc\nADD             X29, SP, #0x50                                         ; +0x14, 0x1003a12c0\nMOV             X19, X4                                                ; +0x18, 0x1003a12c4\nMOV             X21, X3                                                ; +0x1c, 0x1003a12c8\nMOV             X23, X1                                                ; +0x20, 0x1003a12cc\nMOV             X20, X0                                                ; +0x24, 0x1003a12d0\nADD             X0, X0, #0x170; this                                   ; +0x28, 0x1003a12d4\nMOV             X1, X2; __str                                          ; +0x2c, 0x1003a12d8\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x30, 0x1003a12dc\nADD             X22, X20, #0x148                                       ; +0x34, 0x1003a12e0\nMOV             X0, X22; this                                          ; +0x38, 0x1003a12e4\nMOV             X1, X23; __str                                         ; +0x3c, 0x1003a12e8\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x40, 0x1003a12ec\nSTR             W21, [X20,#0x160]                                      ; +0x44, 0x1003a12f0\nBL              GameManager__sharedState                               ; +0x48, 0x1003a12f4\nMOV             X21, X0                                                ; +0x4c, 0x1003a12f8\nLDRSB           W8, [X20,#0x15F]                                       ; +0x50, 0x1003a12fc\nTBNZ            W8, #0x1F, loc_1003A1318                               ; +0x54, 0x1003a1300\nLDR             Q0, [X22]                                              ; +0x58, 0x1003a1304\nSTR             Q0, [SP,#0x50+__p]                                     ; +0x5c, 0x1003a1308\nLDR             X8, [X22,#0x10]                                        ; +0x60, 0x1003a130c\nSTR             X8, [SP,#0x50+var_40]                                  ; +0x64, 0x1003a1310\nB               loc_1003A1324                                          ; +0x68, 0x1003a1314\nLDP             X1, X2, [X20,#0x148]; __src                            ; +0x6c, 0x1003a1318\nMOV             X0, SP; __dst                                          ; +0x70, 0x1003a131c\nBL              sub_1000097D0                                          ; +0x74, 0x1003a1320\nADD             X0, X21, #0x250; this                                  ; +0x78, 0x1003a1324\nMOV             X1, SP; __str                                          ; +0x7c, 0x1003a1328\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x80, 0x1003a132c\nLDRSB           W8, [SP,#0x50+var_40+7]                                ; +0x84, 0x1003a1330\nTBZ             W8, #0x1F, loc_1003A1340                               ; +0x88, 0x1003a1334\nLDR             X0, [SP,#0x50+__p]; __p                                ; +0x8c, 0x1003a1338\nBL              __ZdlPv; operator delete(void *)                       ; +0x90, 0x1003a133c\nBL              GameManager__sharedState                               ; +0x94, 0x1003a1340\nMOV             X21, X0                                                ; +0x98, 0x1003a1344\nSTR             W19, [X0,#0x274]                                       ; +0x9c, 0x1003a1348\nBL              _rand                                                  ; +0xa0, 0x1003a134c\nSCVTF           S0, W0, #0x1F                                          ; +0xa4, 0x1003a1350\nMOV             W8, #0x447A0000                                        ; +0xa8, 0x1003a1354\nFMOV            S1, W8                                                 ; +0xac, 0x1003a1358\nFMUL            S0, S0, S1                                             ; +0xb0, 0x1003a135c\nFCVTZS          W8, S0                                                 ; +0xb4, 0x1003a1360\nSTR             W8, [X21,#0x270]                                       ; +0xb8, 0x1003a1364\nADD             W8, W8, W19                                            ; +0xbc, 0x1003a1368\nSTR             W8, [X21,#0x26C]                                       ; +0xc0, 0x1003a136c\nLDR             X0, [X20,#0x198]                                       ; +0xc4, 0x1003a1370\nCBZ             X0, loc_1003A1384                                      ; +0xc8, 0x1003a1374\nLDR             X8, [X0]                                               ; +0xcc, 0x1003a1378\nLDR             X8, [X8]                                               ; +0xd0, 0x1003a137c\nBLR             X8                                                     ; +0xd4, 0x1003a1380\nBL              GameManager__sharedState                               ; +0xd8, 0x1003a1384\nBL              GameManager__accountStatusChanged                      ; +0xdc, 0x1003a1388\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0xe0, 0x1003a138c\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0xe4, 0x1003a1390\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0xe8, 0x1003a1394\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0xec, 0x1003a1398\nADD             SP, SP, #0x60 ; '`'                                    ; +0xf0, 0x1003a139c\nRET                                                                    ; +0xf4, 0x1003a13a0", "xrefs": ["AccountLoginLayer::loginAccountFinished @ 0x100083f3c"], "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"}