{"type": "func", "start": 4295631696, "end": 4295631994, "name": "GJAccountManager::linkToAccount", "pseudocode": "// \n// GJAccountManager::linkToAccount from 0x1000a2350 to 0x1000a247a (298 bytes)\n// \n// 1 xrefs:\n// > AccountLoginLayer::loginAccountFinished @ 0x10049256a\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:20:14 +0000\n// \n\n__int64 __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  _OWORD *v9; // r12\n  __int64 v10; // rdi\n  __int64 v11; // rdx\n  __int64 v12; // rax\n  __int64 v13; // r15\n  std::string::pointer data; // rdi\n  __int64 v15; // rdx\n  __int64 v16; // rax\n  __int64 v17; // r15\n  double v18; // xmm0_8\n  __int64 v19; // rax\n  __int64 v20; // rdx\n  void (__fastcall ***v21)(_QWORD); // rdi\n  double v22; // xmm0_8\n  __int64 v23; // rax\n  std::string __str; // [rsp+0h] [rbp-40h] BYREF\n\n  std::string::operator=((std::string *)(a1 + 368), a3);\n  v9 = (_OWORD *)(a1 + 328);\n  std::string::operator=((std::string *)(a1 + 328), a2);\n  *(_DWORD *)(a1 + 352) = a4;\n  v10 = GameLevelManager::sharedState(a6);\n  sub_10054AC80(v10);\n  GameManager::sharedState(v10, a2, v11);\n  v13 = v12;\n  if ( (*(_BYTE *)(a1 + 328) & 1) != 0 )\n  {\n    sub_10001AD30(&__str, *(const void **)(a1 + 344), *(_QWORD *)(a1 + 336));\n  }\n  else\n  {\n    __str.__r_.__value_.__r.__words[2] = *(_QWORD *)(a1 + 344);\n    *(_OWORD *)&__str.__r_.__value_.__l.0 = *v9;\n  }\n  data = (std::string::pointer)(v13 + 632);\n  std::string::operator=((std::string *)(v13 + 632), &__str);\n  if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )\n  {\n    data = __str.__r_.__value_.__l.__data_;\n    operator delete(__str.__r_.__value_.__l.__data_);\n  }\n  GameManager::sharedState(data, &__str, v15);\n  v17 = v16;\n  *(_DWORD *)(v16 + 668) = a5;\n  HIDWORD(v18) = 0;\n  *(float *)&v18 = (float)((float)rand() * 4.6566129e-10) * 1000.0;\n  *(_DWORD *)(v17 + 664) = (int)*(float *)&v18;\n  *(_DWORD *)(v17 + 660) = a5 + (int)*(float *)&v18;\n  v19 = GameLevelManager::sharedState(v18);\n  GameLevelManager::syncFollowListIfNeeded(v19);\n  v21 = *(void (__fastcall ****)(_QWORD))(a1 + 408);\n  if ( v21 )\n    (**v21)(v21);\n  *(_QWORD *)&v22 = GameManager::sharedState(v21, &__str, v20).u64[0];\n  return GameManager::accountStatusChanged(v23, v22);\n}", "assembly": "; \n; GJAccountManager::linkToAccount from 0x1000a2350 to 0x1000a247a (298 bytes)\n; \n; 1 xrefs:\n; > AccountLoginLayer::loginAccountFinished @ 0x10049256a\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:20:14 +0000\n; \npush    rbp                                                            ; +0x0, 0x1000a2350\nmov     rbp, rsp                                                       ; +0x1, 0x1000a2351\npush    r15                                                            ; +0x4, 0x1000a2354\npush    r14                                                            ; +0x6, 0x1000a2356\npush    r13                                                            ; +0x8, 0x1000a2358\npush    r12                                                            ; +0xa, 0x1000a235a\npush    rbx                                                            ; +0xc, 0x1000a235c\nsub     rsp, 18h                                                       ; +0xd, 0x1000a235d\nmov     r14d, r8d                                                      ; +0x11, 0x1000a2361\nmov     r15d, ecx                                                      ; +0x14, 0x1000a2364\nmov     r13, rsi                                                       ; +0x17, 0x1000a2367\nmov     rbx, rdi                                                       ; +0x1a, 0x1000a236a\nadd     rdi, 170h; this                                                ; +0x1d, 0x1000a236d\nmov     rsi, rdx; __str                                                ; +0x24, 0x1000a2374\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x27, 0x1000a2377\nlea     r12, [rbx+148h]                                                ; +0x2c, 0x1000a237c\nmov     rdi, r12; this                                                 ; +0x33, 0x1000a2383\nmov     rsi, r13; __str                                                ; +0x36, 0x1000a2386\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x39, 0x1000a2389\nmov     [rbx+160h], r15d                                               ; +0x3e, 0x1000a238e\ncall    GameLevelManager__sharedState                                  ; +0x45, 0x1000a2395\nmov     rdi, rax                                                       ; +0x4a, 0x1000a239a\ncall    sub_10054AC80                                                  ; +0x4d, 0x1000a239d\ncall    GameManager__sharedState                                       ; +0x52, 0x1000a23a2\nmov     r15, rax                                                       ; +0x57, 0x1000a23a7\ntest    byte ptr [rbx+148h], 1                                         ; +0x5a, 0x1000a23aa\njnz     short loc_1000A23C7                                            ; +0x61, 0x1000a23b1\nmov     rax, [r12+10h]                                                 ; +0x63, 0x1000a23b3\nmov     qword ptr [rbp+__str.__r_.__value_+10h], rax                   ; +0x68, 0x1000a23b8\nmovups  xmm0, xmmword ptr [r12]                                        ; +0x6c, 0x1000a23bc\nmovaps  xmmword ptr [rbp+__str.__r_.__value_], xmm0                    ; +0x71, 0x1000a23c1\njmp     short loc_1000A23DE                                            ; +0x75, 0x1000a23c5\nmov     rdx, [rbx+150h]                                                ; +0x77, 0x1000a23c7\nmov     rsi, [rbx+158h]                                                ; +0x7e, 0x1000a23ce\nlea     rdi, [rbp+__str]                                               ; +0x85, 0x1000a23d5\ncall    sub_10001AD30                                                  ; +0x89, 0x1000a23d9\nadd     r15, 278h                                                      ; +0x8e, 0x1000a23de\nlea     rsi, [rbp+__str]; __str                                        ; +0x95, 0x1000a23e5\nmov     rdi, r15; this                                                 ; +0x99, 0x1000a23e9\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x9c, 0x1000a23ec\ntest    byte ptr [rbp+__str.__r_.__value_], 1                          ; +0xa1, 0x1000a23f1\njz      short loc_1000A2400                                            ; +0xa5, 0x1000a23f5\nmov     rdi, qword ptr [rbp+__str.__r_.__value_+10h]; __p              ; +0xa7, 0x1000a23f7\ncall    __ZdlPv; operator delete(void *)                               ; +0xab, 0x1000a23fb\ncall    GameManager__sharedState                                       ; +0xb0, 0x1000a2400\nmov     r15, rax                                                       ; +0xb5, 0x1000a2405\nmov     [rax+29Ch], r14d                                               ; +0xb8, 0x1000a2408\ncall    _rand                                                          ; +0xbf, 0x1000a240f\nxorps   xmm0, xmm0                                                     ; +0xc4, 0x1000a2414\ncvtsi2ss xmm0, eax                                                     ; +0xc7, 0x1000a2417\nmulss   xmm0, cs:dword_100A03A50                                       ; +0xcb, 0x1000a241b\nmulss   xmm0, cs:dword_100A03738                                       ; +0xd3, 0x1000a2423\ncvttss2si eax, xmm0                                                    ; +0xdb, 0x1000a242b\nmov     [r15+298h], eax                                                ; +0xdf, 0x1000a242f\nadd     eax, r14d                                                      ; +0xe6, 0x1000a2436\nmov     [r15+294h], eax                                                ; +0xe9, 0x1000a2439\ncall    GameLevelManager__sharedState                                  ; +0xf0, 0x1000a2440\nmov     rdi, rax                                                       ; +0xf5, 0x1000a2445\ncall    GameLevelManager__syncFollowListIfNeeded                       ; +0xf8, 0x1000a2448\nmov     rdi, [rbx+198h]                                                ; +0xfd, 0x1000a244d\ntest    rdi, rdi                                                       ; +0x104, 0x1000a2454\njz      short loc_1000A245E                                            ; +0x107, 0x1000a2457\nmov     rax, [rdi]                                                     ; +0x109, 0x1000a2459\ncall    qword ptr [rax]                                                ; +0x10c, 0x1000a245c\ncall    GameManager__sharedState                                       ; +0x10e, 0x1000a245e\nmov     rdi, rax                                                       ; +0x113, 0x1000a2463\ncall    GameManager__accountStatusChanged                              ; +0x116, 0x1000a2466\nadd     rsp, 18h                                                       ; +0x11b, 0x1000a246b\npop     rbx                                                            ; +0x11f, 0x1000a246f\npop     r12                                                            ; +0x120, 0x1000a2470\npop     r13                                                            ; +0x122, 0x1000a2472\npop     r14                                                            ; +0x124, 0x1000a2474\npop     r15                                                            ; +0x126, 0x1000a2476\npop     rbp                                                            ; +0x128, 0x1000a2478\nretn                                                                   ; +0x129, 0x1000a2479", "xrefs": ["AccountLoginLayer::loginAccountFinished @ 0x10049256a"], "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"}