{"type": "func", "start": 4295833680, "end": 4295833951, "name": "GJAccountManager::linkToAccount", "pseudocode": "// \n// GJAccountManager::linkToAccount from 0x1000d3850 to 0x1000d395f (271 bytes)\n// \n// 1 xrefs:\n// > AccountLoginLayer::loginAccountFinished @ 0x10049a24a\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(\n        __int64 a1,\n        const std::string *a2,\n        const std::string *a3,\n        int a4,\n        int a5,\n        double a6)\n{\n  GameManager *v8; // r15\n  GameManager *v9; // r15\n  float v10; // xmm0_4\n  void (__fastcall ***v11)(_QWORD); // rdi\n  GameManager *v12; // rax\n  std::string __str; // [rsp+0h] [rbp-40h] BYREF\n\n  std::string::operator=((std::string *)(a1 + 368), a3);\n  std::string::operator=((std::string *)(a1 + 328), a2);\n  *(_DWORD *)(a1 + 352) = a4;\n  v8 = GameManager::sharedState();\n  if ( (*(_BYTE *)(a1 + 328) & 1) != 0 )\n    sub_100006B70(&__str, *(const void **)(a1 + 344), *(_QWORD *)(a1 + 336), a6);\n  else\n    __str = *(std::string *)(a1 + 328);\n  std::string::operator=((std::string *)&v8->m_playerName, &__str);\n  if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )\n    operator delete(__str.__r_.__value_.__l.__data_);\n  v9 = GameManager::sharedState();\n  v9->m_playerUserID.value = a5;\n  v10 = (float)((float)rand() * 4.6566129e-10) * 1000.0;\n  v9->m_playerUserID.seed = (int)v10;\n  v9->m_playerUserID.random = a5 + (int)v10;\n  v11 = *(void (__fastcall ****)(_QWORD))(a1 + 408);\n  if ( v11 )\n    (**v11)(v11);\n  v12 = GameManager::sharedState();\n  GameManager::accountStatusChanged(v12);\n}", "assembly": "; \n; GJAccountManager::linkToAccount from 0x1000d3850 to 0x1000d395f (271 bytes)\n; \n; 1 xrefs:\n; > AccountLoginLayer::loginAccountFinished @ 0x10049a24a\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, 0x1000d3850\nmov     rbp, rsp                                                       ; +0x1, 0x1000d3851\npush    r15                                                            ; +0x4, 0x1000d3854\npush    r14                                                            ; +0x6, 0x1000d3856\npush    r13                                                            ; +0x8, 0x1000d3858\npush    r12                                                            ; +0xa, 0x1000d385a\npush    rbx                                                            ; +0xc, 0x1000d385c\nsub     rsp, 18h                                                       ; +0xd, 0x1000d385d\nmov     ebx, r8d                                                       ; +0x11, 0x1000d3861\nmov     r15d, ecx                                                      ; +0x14, 0x1000d3864\nmov     r13, rsi                                                       ; +0x17, 0x1000d3867\nmov     r14, rdi                                                       ; +0x1a, 0x1000d386a\nadd     rdi, 170h; this                                                ; +0x1d, 0x1000d386d\nmov     rsi, rdx; __str                                                ; +0x24, 0x1000d3874\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x27, 0x1000d3877\nlea     r12, [r14+148h]                                                ; +0x2c, 0x1000d387c\nmov     rdi, r12; this                                                 ; +0x33, 0x1000d3883\nmov     rsi, r13; __str                                                ; +0x36, 0x1000d3886\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x39, 0x1000d3889\nmov     [r14+160h], r15d                                               ; +0x3e, 0x1000d388e\ncall    GameManager__sharedState                                       ; +0x45, 0x1000d3895\nmov     r15, rax                                                       ; +0x4a, 0x1000d389a\ntest    byte ptr [r14+148h], 1                                         ; +0x4d, 0x1000d389d\njnz     short loc_1000D38BB                                            ; +0x55, 0x1000d38a5\nmov     rax, [r12+10h]                                                 ; +0x57, 0x1000d38a7\nmov     qword ptr [rbp+__str.__r_.__value_+10h], rax                   ; +0x5c, 0x1000d38ac\nmovups  xmm0, xmmword ptr [r12]                                        ; +0x60, 0x1000d38b0\nmovaps  xmmword ptr [rbp+__str.__r_.__value_], xmm0                    ; +0x65, 0x1000d38b5\njmp     short loc_1000D38D2                                            ; +0x69, 0x1000d38b9\nmov     rdx, [r14+150h]                                                ; +0x6b, 0x1000d38bb\nmov     rsi, [r14+158h]                                                ; +0x72, 0x1000d38c2\nlea     rdi, [rbp+__str]                                               ; +0x79, 0x1000d38c9\ncall    sub_100006B70                                                  ; +0x7d, 0x1000d38cd\nadd     r15, 250h                                                      ; +0x82, 0x1000d38d2\nlea     rsi, [rbp+__str]; __str                                        ; +0x89, 0x1000d38d9\nmov     rdi, r15; this                                                 ; +0x8d, 0x1000d38dd\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x90, 0x1000d38e0\ntest    byte ptr [rbp+__str.__r_.__value_], 1                          ; +0x95, 0x1000d38e5\njz      short loc_1000D38F4                                            ; +0x99, 0x1000d38e9\nmov     rdi, qword ptr [rbp+__str.__r_.__value_+10h]; __p              ; +0x9b, 0x1000d38eb\ncall    __ZdlPv; operator delete(void *)                               ; +0x9f, 0x1000d38ef\ncall    GameManager__sharedState                                       ; +0xa4, 0x1000d38f4\nmov     r15, rax                                                       ; +0xa9, 0x1000d38f9\nmov     [rax+274h], ebx                                                ; +0xac, 0x1000d38fc\ncall    _rand                                                          ; +0xb2, 0x1000d3902\nxorps   xmm0, xmm0                                                     ; +0xb7, 0x1000d3907\ncvtsi2ss xmm0, eax                                                     ; +0xba, 0x1000d390a\nmulss   xmm0, cs:dword_100815710                                       ; +0xbe, 0x1000d390e\nmulss   xmm0, cs:dword_1008152B8                                       ; +0xc6, 0x1000d3916\ncvttss2si eax, xmm0                                                    ; +0xce, 0x1000d391e\nmov     [r15+270h], eax                                                ; +0xd2, 0x1000d3922\nadd     eax, ebx                                                       ; +0xd9, 0x1000d3929\nmov     [r15+26Ch], eax                                                ; +0xdb, 0x1000d392b\nmov     rdi, [r14+198h]                                                ; +0xe2, 0x1000d3932\ntest    rdi, rdi                                                       ; +0xe9, 0x1000d3939\njz      short loc_1000D3943                                            ; +0xec, 0x1000d393c\nmov     rax, [rdi]                                                     ; +0xee, 0x1000d393e\ncall    qword ptr [rax]                                                ; +0xf1, 0x1000d3941\ncall    GameManager__sharedState                                       ; +0xf3, 0x1000d3943\nmov     rdi, rax                                                       ; +0xf8, 0x1000d3948\ncall    GameManager__accountStatusChanged                              ; +0xfb, 0x1000d394b\nadd     rsp, 18h                                                       ; +0x100, 0x1000d3950\npop     rbx                                                            ; +0x104, 0x1000d3954\npop     r12                                                            ; +0x105, 0x1000d3955\npop     r13                                                            ; +0x107, 0x1000d3957\npop     r14                                                            ; +0x109, 0x1000d3959\npop     r15                                                            ; +0x10b, 0x1000d395b\npop     rbp                                                            ; +0x10d, 0x1000d395d\nretn                                                                   ; +0x10e, 0x1000d395e", "xrefs": ["AccountLoginLayer::loginAccountFinished @ 0x10049a24a"], "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"}