{"type": "func", "start": 5370820768, "end": 5370821281, "name": "GJAccountManager::linkToAccount", "pseudocode": "// \n// GJAccountManager::linkToAccount from 0x1402038a0 to 0x140203aa1 (513 bytes)\n// \n// 2 xrefs:\n// > AccountLoginLayer::loginAccountFinished @ 0x14007c80d\n// > <???> @ 0x1406ccb64\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\n// Hidden C++ exception states: #wind=7\nvoid __fastcall GJAccountManager::linkToAccount(__int64 a1, void **a2, void **a3, int a4, int a5)\n{\n  void **v9; // rcx\n  void *v10; // rdx\n  void *v11; // rdx\n  void **v12; // rbx\n  __int64 v13; // rax\n  void *v14; // rdx\n  _DWORD *v15; // rbp\n  float v16; // xmm0_4\n  void (__fastcall ***v17)(_QWORD); // rcx\n  __int64 v18; // rax\n  MenuLayer *v19; // rcx\n  void *v20; // [rsp+20h] [rbp-78h]\n  void *v21; // [rsp+20h] [rbp-78h]\n  void *v22; // [rsp+20h] [rbp-78h]\n  _BYTE v23[32]; // [rsp+38h] [rbp-60h] BYREF\n  void **v24; // [rsp+58h] [rbp-40h]\n  void **v25; // [rsp+60h] [rbp-38h]\n\n  v24 = a2;\n  v25 = a3;\n  v9 = (void **)(a1 + 376);\n  if ( v9 != a3 )\n  {\n    v10 = a3;\n    if ( (unsigned __int64)a3[3] > 0xF )\n      v10 = *a3;\n    sub_14003CCE0(v9, v10, (size_t)a3[2]);\n  }\n  if ( (void **)(a1 + 328) != a2 )\n  {\n    v11 = a2;\n    if ( (unsigned __int64)a2[3] > 0xF )\n      v11 = *a2;\n    sub_14003CCE0((void **)(a1 + 328), v11, (size_t)a2[2]);\n  }\n  *(_DWORD *)(a1 + 360) = a4;\n  v12 = (void **)sub_14003BDB0((__int64)v23, a1 + 328);\n  v13 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v20 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v20);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v13 = qword_1406C2ED8;\n  }\n  if ( (void **)(v13 + 616) != v12 )\n  {\n    v14 = v12;\n    if ( (unsigned __int64)v12[3] > 0xF )\n      v14 = *v12;\n    sub_14003CCE0((void **)(v13 + 616), v14, (size_t)v12[2]);\n  }\n  sub_14003A830((__int64)v12);\n  v15 = (_DWORD *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v21 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v21);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v15 = (_DWORD *)qword_1406C2ED8;\n  }\n  v15[165] = a5;\n  v16 = (float)((float)rand() / 32767.0) * 1000.0;\n  v15[164] = (int)v16;\n  v15[163] = a5 + (int)v16;\n  v17 = *(void (__fastcall ****)(_QWORD))(a1 + 424);\n  if ( v17 )\n    (**v17)(v17);\n  v18 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v22 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v22);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v18 = qword_1406C2ED8;\n  }\n  v19 = *(MenuLayer **)(v18 + 552);\n  if ( v19 )\n    MenuLayer::updateUserProfileButton(v19);\n  sub_14003A830((__int64)a2);\n  sub_14003A830((__int64)a3);\n}", "assembly": "; \n; GJAccountManager::linkToAccount from 0x1402038a0 to 0x140203aa1 (513 bytes)\n; \n; 2 xrefs:\n; > AccountLoginLayer::loginAccountFinished @ 0x14007c80d\n; > <???> @ 0x1406ccb64\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    rbx                                                            ; +0x0, 0x1402038a0\npush    rbp                                                            ; +0x2, 0x1402038a2\npush    rsi                                                            ; +0x3, 0x1402038a3\npush    rdi                                                            ; +0x4, 0x1402038a4\npush    r14                                                            ; +0x5, 0x1402038a5\nsub     rsp, 70h                                                       ; +0x7, 0x1402038a7\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x1402038ab\nxor     rax, rsp                                                       ; +0x12, 0x1402038b2\nmov     [rsp+98h+var_30], rax                                          ; +0x15, 0x1402038b5\nmov     ebp, r9d                                                       ; +0x1a, 0x1402038ba\nmov     rsi, r8                                                        ; +0x1d, 0x1402038bd\nmov     rdi, rdx                                                       ; +0x20, 0x1402038c0\nmov     r14, rcx                                                       ; +0x23, 0x1402038c3\nmov     [rsp+98h+var_40], rdx                                          ; +0x26, 0x1402038c6\nmov     [rsp+98h+var_38], r8                                           ; +0x2b, 0x1402038cb\nadd     rcx, 178h; void *                                              ; +0x30, 0x1402038d0\ncmp     rcx, r8                                                        ; +0x37, 0x1402038d7\njz      short loc_1402038F2                                            ; +0x3a, 0x1402038da\nmov     rdx, r8                                                        ; +0x3c, 0x1402038dc\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x3f, 0x1402038df\njbe     short loc_1402038E9                                            ; +0x44, 0x1402038e4\nmov     rdx, [r8]; Src                                                 ; +0x46, 0x1402038e6\nmov     r8, [r8+10h]; Size                                             ; +0x49, 0x1402038e9\ncall    sub_14003CCE0                                                  ; +0x4d, 0x1402038ed\nlea     rbx, [r14+148h]                                                ; +0x52, 0x1402038f2\ncmp     rbx, rdi                                                       ; +0x59, 0x1402038f9\njz      short loc_140203917                                            ; +0x5c, 0x1402038fc\nmov     rdx, rdi                                                       ; +0x5e, 0x1402038fe\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x61, 0x140203901\njbe     short loc_14020390B                                            ; +0x66, 0x140203906\nmov     rdx, [rdi]; Src                                                ; +0x68, 0x140203908\nmov     r8, [rdi+10h]; Size                                            ; +0x6b, 0x14020390b\nmov     rcx, rbx; void *                                               ; +0x6f, 0x14020390f\ncall    sub_14003CCE0                                                  ; +0x72, 0x140203912\nmov     [r14+168h], ebp                                                ; +0x77, 0x140203917\nlea     rax, [rsp+98h+var_60]                                          ; +0x7e, 0x14020391e\nmov     [rsp+98h+var_70], rax                                          ; +0x83, 0x140203923\nmov     rdx, rbx                                                       ; +0x88, 0x140203928\nlea     rcx, [rsp+98h+var_60]                                          ; +0x8b, 0x14020392b\ncall    sub_14003BDB0                                                  ; +0x90, 0x140203930\nmov     rbx, rax                                                       ; +0x95, 0x140203935\nmov     [rsp+98h+var_68], rax                                          ; +0x98, 0x140203938\nmov     rax, cs:qword_1406C2ED8                                        ; +0x9d, 0x14020393d\ntest    rax, rax                                                       ; +0xa4, 0x140203944\njnz     short loc_140203978                                            ; +0xa7, 0x140203947\nmov     ecx, 668h; Size                                                ; +0xa9, 0x140203949\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xae, 0x14020394e\nmov     [rsp+98h+var_78], rax                                          ; +0xb3, 0x140203953\nmov     rcx, rax                                                       ; +0xb8, 0x140203958\ncall    sub_14017AB00                                                  ; +0xbb, 0x14020395b\nnop                                                                    ; +0xc0, 0x140203960\nmov     cs:qword_1406C2ED8, rax                                        ; +0xc1, 0x140203961\nmov     rdx, [rax]                                                     ; +0xc8, 0x140203968\nmov     rcx, rax                                                       ; +0xcb, 0x14020396b\ncall    qword ptr [rdx+48h]                                            ; +0xce, 0x14020396e\nmov     rax, cs:qword_1406C2ED8                                        ; +0xd1, 0x140203971\nlea     rcx, [rax+268h]; void *                                        ; +0xd8, 0x140203978\ncmp     rcx, rbx                                                       ; +0xdf, 0x14020397f\njz      short loc_14020399B                                            ; +0xe2, 0x140203982\nmov     rdx, rbx                                                       ; +0xe4, 0x140203984\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0xe7, 0x140203987\njbe     short loc_140203991                                            ; +0xec, 0x14020398c\nmov     rdx, [rbx]; Src                                                ; +0xee, 0x14020398e\nmov     r8, [rbx+10h]; Size                                            ; +0xf1, 0x140203991\ncall    sub_14003CCE0                                                  ; +0xf5, 0x140203995\nnop                                                                    ; +0xfa, 0x14020399a\nmov     rcx, rbx                                                       ; +0xfb, 0x14020399b\ncall    sub_14003A830                                                  ; +0xfe, 0x14020399e\nmov     rbp, cs:qword_1406C2ED8                                        ; +0x103, 0x1402039a3\ntest    rbp, rbp                                                       ; +0x10a, 0x1402039aa\njnz     short loc_1402039DE                                            ; +0x10d, 0x1402039ad\nmov     ecx, 668h; Size                                                ; +0x10f, 0x1402039af\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x114, 0x1402039b4\nmov     [rsp+98h+var_78], rax                                          ; +0x119, 0x1402039b9\nmov     rcx, rax                                                       ; +0x11e, 0x1402039be\ncall    sub_14017AB00                                                  ; +0x121, 0x1402039c1\nnop                                                                    ; +0x126, 0x1402039c6\nmov     cs:qword_1406C2ED8, rax                                        ; +0x127, 0x1402039c7\nmov     rdx, [rax]                                                     ; +0x12e, 0x1402039ce\nmov     rcx, rax                                                       ; +0x131, 0x1402039d1\ncall    qword ptr [rdx+48h]                                            ; +0x134, 0x1402039d4\nmov     rbp, cs:qword_1406C2ED8                                        ; +0x137, 0x1402039d7\nmov     ebx, [rsp+98h+arg_20]                                          ; +0x13e, 0x1402039de\nmov     [rbp+294h], ebx                                                ; +0x145, 0x1402039e5\ncall    cs:rand                                                        ; +0x14b, 0x1402039eb\nmovd    xmm0, eax                                                      ; +0x151, 0x1402039f1\ncvtdq2ps xmm0, xmm0                                                    ; +0x155, 0x1402039f5\ndivss   xmm0, cs:dword_140623644                                       ; +0x158, 0x1402039f8\nmulss   xmm0, cs:dword_14062350C                                       ; +0x160, 0x140203a00\ncvttss2si eax, xmm0                                                    ; +0x168, 0x140203a08\nmov     [rbp+290h], eax                                                ; +0x16c, 0x140203a0c\nadd     eax, ebx                                                       ; +0x172, 0x140203a12\nmov     [rbp+28Ch], eax                                                ; +0x174, 0x140203a14\nmov     rcx, [r14+1A8h]                                                ; +0x17a, 0x140203a1a\ntest    rcx, rcx                                                       ; +0x181, 0x140203a21\njz      short loc_140203A2B                                            ; +0x184, 0x140203a24\nmov     rax, [rcx]                                                     ; +0x186, 0x140203a26\ncall    qword ptr [rax]                                                ; +0x189, 0x140203a29\nmov     rax, cs:qword_1406C2ED8                                        ; +0x18b, 0x140203a2b\ntest    rax, rax                                                       ; +0x192, 0x140203a32\njnz     short loc_140203A66                                            ; +0x195, 0x140203a35\nmov     ecx, 668h; Size                                                ; +0x197, 0x140203a37\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x19c, 0x140203a3c\nmov     [rsp+98h+var_78], rax                                          ; +0x1a1, 0x140203a41\nmov     rcx, rax                                                       ; +0x1a6, 0x140203a46\ncall    sub_14017AB00                                                  ; +0x1a9, 0x140203a49\nnop                                                                    ; +0x1ae, 0x140203a4e\nmov     cs:qword_1406C2ED8, rax                                        ; +0x1af, 0x140203a4f\nmov     rdx, [rax]                                                     ; +0x1b6, 0x140203a56\nmov     rcx, rax                                                       ; +0x1b9, 0x140203a59\ncall    qword ptr [rdx+48h]                                            ; +0x1bc, 0x140203a5c\nmov     rax, cs:qword_1406C2ED8                                        ; +0x1bf, 0x140203a5f\nmov     rcx, [rax+228h]                                                ; +0x1c6, 0x140203a66\ntest    rcx, rcx                                                       ; +0x1cd, 0x140203a6d\njz      short loc_140203A78                                            ; +0x1d0, 0x140203a70\ncall    MenuLayer__updateUserProfileButton                             ; +0x1d2, 0x140203a72\nnop                                                                    ; +0x1d7, 0x140203a77\nmov     rcx, rdi                                                       ; +0x1d8, 0x140203a78\ncall    sub_14003A830                                                  ; +0x1db, 0x140203a7b\nnop                                                                    ; +0x1e0, 0x140203a80\nmov     rcx, rsi                                                       ; +0x1e1, 0x140203a81\ncall    sub_14003A830                                                  ; +0x1e4, 0x140203a84\nmov     rcx, [rsp+98h+var_30]                                          ; +0x1e9, 0x140203a89\nxor     rcx, rsp; StackCookie                                          ; +0x1ee, 0x140203a8e\ncall    __security_check_cookie                                        ; +0x1f1, 0x140203a91\nadd     rsp, 70h                                                       ; +0x1f6, 0x140203a96\npop     r14                                                            ; +0x1fa, 0x140203a9a\npop     rdi                                                            ; +0x1fc, 0x140203a9c\npop     rsi                                                            ; +0x1fd, 0x140203a9d\npop     rbp                                                            ; +0x1fe, 0x140203a9e\npop     rbx                                                            ; +0x1ff, 0x140203a9f\nretn                                                                   ; +0x200, 0x140203aa0", "xrefs": ["AccountLoginLayer::loginAccountFinished @ 0x14007c80d", "<???> @ 0x1406ccb64"], "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"}