{"type": "func", "start": 5372072432, "end": 5372072688, "name": "MenuLayer::updateUserProfileButton", "pseudocode": "// \n// MenuLayer::updateUserProfileButton from 0x1403351f0 to 0x1403352f0 (256 bytes)\n// \n// 4 xrefs:\n// > AccountHelpLayer::FLAlert_Clicked @ 0x1400801b3\n// > GJAccountManager::linkToAccount @ 0x140203a72\n// > MenuLayer::init @ 0x140334e5d\n// > <???> @ 0x1406d5114\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=1\nvoid MenuLayer::updateUserProfileButton(MenuLayer *a1)\n{\n  GJAccountManager *v2; // rax\n  int v3; // ebx\n  cocos2d::CCSprite *m_viewProfileSprite; // rcx\n  GJAccountManager *v5; // rax\n  const char *v6; // rdx\n  _QWORD v7[4]; // [rsp+28h] [rbp-30h] BYREF\n\n  v2 = GJAccountManager::sharedState();\n  v3 = v2->m_accountID - v2->m_unkInt1;\n  a1->m_profileButton->setVisible(a1->m_profileButton, v3 > 0);\n  a1->m_profileLabel->setVisible(a1->m_profileLabel, v3 > 0);\n  m_viewProfileSprite = a1->m_viewProfileSprite;\n  if ( m_viewProfileSprite )\n    m_viewProfileSprite->setVisible(m_viewProfileSprite, v3 > 0);\n  if ( v3 > 0 )\n  {\n    v5 = GJAccountManager::sharedState();\n    sub_14003BDB0((__int64)v7, (__int64)&v5->m_username);\n    v6 = (const char *)v7;\n    if ( v7[3] > 0xFu )\n      v6 = (const char *)v7[0];\n    a1->m_profileLabel->setString(&a1->m_profileLabel->cocos2d::CCLabelProtocol, v6);\n    sub_14003A830((__int64)v7);\n    cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_profileLabel, 70.0, 0.69999999, 0.0);\n  }\n}", "assembly": "; \n; MenuLayer::updateUserProfileButton from 0x1403351f0 to 0x1403352f0 (256 bytes)\n; \n; 4 xrefs:\n; > AccountHelpLayer::FLAlert_Clicked @ 0x1400801b3\n; > GJAccountManager::linkToAccount @ 0x140203a72\n; > MenuLayer::init @ 0x140334e5d\n; > <???> @ 0x1406d5114\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403351f0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1403351f5\npush    rdi                                                            ; +0xa, 0x1403351fa\nsub     rsp, 50h                                                       ; +0xb, 0x1403351fb\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1403351ff\nxor     rax, rsp                                                       ; +0x16, 0x140335206\nmov     [rsp+58h+var_10], rax                                          ; +0x19, 0x140335209\nmov     rsi, rcx                                                       ; +0x1e, 0x14033520e\ncall    GJAccountManager__sharedState                                  ; +0x21, 0x140335211\nmov     ebx, [rax+168h]                                                ; +0x26, 0x140335216\nsub     ebx, [rax+16Ch]                                                ; +0x2c, 0x14033521c\ntest    ebx, ebx                                                       ; +0x32, 0x140335222\nsetnle  dil                                                            ; +0x34, 0x140335224\nmov     rcx, [rsi+1C8h]                                                ; +0x38, 0x140335228\nmov     rax, [rcx]                                                     ; +0x3f, 0x14033522f\nmovzx   edx, dil                                                       ; +0x42, 0x140335232\ncall    qword ptr [rax+140h]                                           ; +0x46, 0x140335236\nmov     rcx, [rsi+1C0h]                                                ; +0x4c, 0x14033523c\nmov     rax, [rcx]                                                     ; +0x53, 0x140335243\nmovzx   edx, dil                                                       ; +0x56, 0x140335246\ncall    qword ptr [rax+140h]                                           ; +0x5a, 0x14033524a\nmov     rcx, [rsi+1B8h]                                                ; +0x60, 0x140335250\ntest    rcx, rcx                                                       ; +0x67, 0x140335257\njz      short loc_140335269                                            ; +0x6a, 0x14033525a\nmov     rax, [rcx]                                                     ; +0x6c, 0x14033525c\nmovzx   edx, dil                                                       ; +0x6f, 0x14033525f\ncall    qword ptr [rax+140h]                                           ; +0x73, 0x140335263\ntest    ebx, ebx                                                       ; +0x79, 0x140335269\njle     short loc_1403352D3                                            ; +0x7b, 0x14033526b\ncall    GJAccountManager__sharedState                                  ; +0x7d, 0x14033526d\nlea     rdx, [rax+148h]                                                ; +0x82, 0x140335272\nlea     rcx, [rsp+58h+var_30]                                          ; +0x89, 0x140335279\ncall    sub_14003BDB0                                                  ; +0x8e, 0x14033527e\nnop                                                                    ; +0x93, 0x140335283\nlea     rdx, [rsp+58h+var_30]                                          ; +0x94, 0x140335284\ncmp     [rsp+58h+var_18], 0Fh                                          ; +0x99, 0x140335289\ncmova   rdx, [rsp+58h+var_30]                                          ; +0x9f, 0x14033528f\nmov     rcx, [rsi+1C0h]                                                ; +0xa5, 0x140335295\nadd     rcx, 168h                                                      ; +0xac, 0x14033529c\nmov     rax, [rcx]                                                     ; +0xb3, 0x1403352a3\ncall    qword ptr [rax]                                                ; +0xb6, 0x1403352a6\nnop                                                                    ; +0xb8, 0x1403352a8\nlea     rcx, [rsp+58h+var_30]                                          ; +0xb9, 0x1403352a9\ncall    sub_14003A830                                                  ; +0xbe, 0x1403352ae\nxorps   xmm3, xmm3                                                     ; +0xc3, 0x1403352b3\nmovss   xmm2, cs:dword_140622B74                                       ; +0xc6, 0x1403352b6\nmovss   xmm1, cs:dword_140623244                                       ; +0xce, 0x1403352be\nmov     rcx, [rsi+1C0h]                                                ; +0xd6, 0x1403352c6\ncall    cs:?limitLabelWidth@CCLabelBMFont@cocos2d@@QEAAXMMM@Z; cocos2d::CCLabelBMFont::limitLabelWidth(float,float,float) ; +0xdd, 0x1403352cd\nmov     rcx, [rsp+58h+var_10]                                          ; +0xe3, 0x1403352d3\nxor     rcx, rsp; StackCookie                                          ; +0xe8, 0x1403352d8\ncall    __security_check_cookie                                        ; +0xeb, 0x1403352db\nmov     rbx, [rsp+58h+arg_8]                                           ; +0xf0, 0x1403352e0\nmov     rsi, [rsp+58h+arg_10]                                          ; +0xf5, 0x1403352e5\nadd     rsp, 50h                                                       ; +0xfa, 0x1403352ea\npop     rdi                                                            ; +0xfe, 0x1403352ee\nretn                                                                   ; +0xff, 0x1403352ef", "xrefs": ["AccountHelpLayer::FLAlert_Clicked @ 0x1400801b3", "GJAccountManager::linkToAccount @ 0x140203a72", "MenuLayer::init @ 0x140334e5d", "<???> @ 0x1406d5114"], "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"}