{"type": "func", "start": 4295506196, "end": 4295506816, "name": "AccountLoginLayer::onSubmit", "pseudocode": "// \n// AccountLoginLayer::onSubmit from 0x100083914 to 0x100083b80 (620 bytes)\n// \n// 1 xrefs:\n// > AccountLoginLayer::init @ 0x1000833c0\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 AccountLoginLayer::onSubmit(AccountLoginLayer *a1, cocos2d::CCObject *a2)\n{\n  void **p_m_username; // x21\n  void **p_m_password; // x22\n  std::size_t size; // x8\n  cocos2d::CCLabelBMFont *m_passwordLabel; // x0\n  std::size_t v7; // x8\n  GJAccountManager *v8; // x20\n  int v9; // w20\n  void *v10[2]; // [xsp+0h] [xbp-90h] BYREF\n  char *v11; // [xsp+10h] [xbp-80h]\n  void *__dst[2]; // [xsp+20h] [xbp-70h] BYREF\n  char *v13; // [xsp+30h] [xbp-60h]\n  void *__p[2]; // [xsp+40h] [xbp-50h] BYREF\n  char *longStorage; // [xsp+50h] [xbp-40h]\n  __int128 v16; // [xsp+58h] [xbp-38h] BYREF\n  char *v17; // [xsp+68h] [xbp-28h]\n\n  AccountLoginLayer::resetLabels(a1);\n  ((void (__fastcall *)(CCTextInputNode *, _QWORD))a1->m_usernameInput->onClickTrackNode)(a1->m_usernameInput, 0);\n  ((void (__fastcall *)(CCTextInputNode *, _QWORD))a1->m_passwordInput->onClickTrackNode)(a1->m_passwordInput, 0);\n  CCTextInputNode::getString(&v16, a1->m_usernameInput);\n  p_m_username = (void **)&a1->m_username;\n  if ( a1->m_username.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    operator delete(*p_m_username);\n  *(_OWORD *)p_m_username = v16;\n  a1->m_username.m_data.m_long.longStorage = v17;\n  CCTextInputNode::getString(&v16, a1->m_passwordInput);\n  p_m_password = (void **)&a1->m_password;\n  if ( a1->m_password.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    operator delete(*p_m_password);\n  *(_OWORD *)p_m_password = v16;\n  a1->m_password.m_data.m_long.longStorage = v17;\n  size = a1->m_username.m_data.m_short.shortStorage.__elems_[22];\n  if ( (size & 0x8000000000000000LL) != 0 )\n    size = a1->m_username.m_data.m_long.size;\n  if ( size > 2 )\n  {\n    v7 = a1->m_password.m_data.m_short.shortStorage.__elems_[22];\n    if ( (v7 & 0x8000000000000000LL) != 0 )\n      v7 = a1->m_password.m_data.m_long.size;\n    if ( v7 <= 5 )\n    {\n      ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_passwordLabel->setString)(\n        a1->m_passwordLabel,\n        \"Too short. Minimum 6 characters\");\n      m_passwordLabel = a1->m_passwordLabel;\n      goto LABEL_13;\n    }\n    GJAccountManager::sharedState()->m_accountLoginDelegate = &a1->GJAccountLoginDelegate;\n    if ( a1->m_password.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    {\n      sub_1000097D0(__p, (void *)a1->m_password.m_data.m_long.capacitym1, a1->m_password.m_data.m_long.size);\n    }\n    else\n    {\n      *(_OWORD *)__p = *(_OWORD *)p_m_password;\n      longStorage = a1->m_password.m_data.m_long.longStorage;\n    }\n    GJAccountManager::getShaPassword(&v16, __p);\n    if ( a1->m_password.m_data.m_short.shortStorage.__elems_[22] < 0 )\n      operator delete(*p_m_password);\n    *(_OWORD *)p_m_password = v16;\n    a1->m_password.m_data.m_long.longStorage = v17;\n    HIBYTE(v17) = 0;\n    LOBYTE(v16) = 0;\n    if ( SHIBYTE(longStorage) < 0 )\n      operator delete(__p[0]);\n    v8 = GJAccountManager::sharedState();\n    if ( a1->m_username.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    {\n      sub_1000097D0(__dst, (void *)a1->m_username.m_data.m_long.capacitym1, a1->m_username.m_data.m_long.size);\n    }\n    else\n    {\n      *(_OWORD *)__dst = *(_OWORD *)p_m_username;\n      v13 = a1->m_username.m_data.m_long.longStorage;\n    }\n    if ( a1->m_password.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    {\n      sub_1000097D0(v10, (void *)a1->m_password.m_data.m_long.capacitym1, a1->m_password.m_data.m_long.size);\n    }\n    else\n    {\n      *(_OWORD *)v10 = *(_OWORD *)p_m_password;\n      v11 = a1->m_password.m_data.m_long.longStorage;\n    }\n    v9 = GJAccountManager::loginAccount(v8, __dst, v10);\n    if ( SHIBYTE(v11) < 0 )\n      operator delete(v10[0]);\n    if ( SHIBYTE(v13) < 0 )\n    {\n      operator delete(__dst[0]);\n      if ( v9 )\n        goto LABEL_32;\n    }\n    else if ( v9 )\n    {\nLABEL_32:\n      AccountLoginLayer::showLoadingUI(a1);\n      return;\n    }\n    ((void (__fastcall *)(AccountLoginLayer *, __int64))a1->loginAccountFailed)(a1, 0xFFFFFFFFLL);\n    return;\n  }\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_usernameLabel->setString)(\n    a1->m_usernameLabel,\n    \"Too short. Minimum 3 characters\");\n  m_passwordLabel = a1->m_usernameLabel;\nLABEL_13:\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))m_passwordLabel->setColor)(m_passwordLabel, &unk_1006365E5);\n}", "assembly": "; \n; AccountLoginLayer::onSubmit from 0x100083914 to 0x100083b80 (620 bytes)\n; \n; 1 xrefs:\n; > AccountLoginLayer::init @ 0x1000833c0\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, #0xA0                                          ; +0x0, 0x100083914\nSTP             X22, X21, [SP,#0x90+var_20]                            ; +0x4, 0x100083918\nSTP             X20, X19, [SP,#0x90+var_10]                            ; +0x8, 0x10008391c\nSTP             X29, X30, [SP,#0x90+var_s0]                            ; +0xc, 0x100083920\nADD             X29, SP, #0x90                                         ; +0x10, 0x100083924\nMOV             X19, X0                                                ; +0x14, 0x100083928\nBL              AccountLoginLayer__resetLabels                         ; +0x18, 0x10008392c\nLDR             X0, [X19,#0x290]                                       ; +0x1c, 0x100083930\nLDR             X8, [X0]                                               ; +0x20, 0x100083934\nLDR             X8, [X8,#0x478]                                        ; +0x24, 0x100083938\nMOV             W1, #0                                                 ; +0x28, 0x10008393c\nBLR             X8                                                     ; +0x2c, 0x100083940\nLDR             X0, [X19,#0x298]                                       ; +0x30, 0x100083944\nLDR             X8, [X0]                                               ; +0x34, 0x100083948\nLDR             X8, [X8,#0x478]                                        ; +0x38, 0x10008394c\nMOV             W1, #0                                                 ; +0x3c, 0x100083950\nBLR             X8                                                     ; +0x40, 0x100083954\nLDR             X0, [X19,#0x290]                                       ; +0x44, 0x100083958\nSUB             X8, X29, #-var_38                                      ; +0x48, 0x10008395c\nBL              CCTextInputNode__getString                             ; +0x4c, 0x100083960\nADD             X21, X19, #0x2B8                                       ; +0x50, 0x100083964\nLDRSB           W8, [X19,#0x2CF]                                       ; +0x54, 0x100083968\nTBZ             W8, #0x1F, loc_100083978                               ; +0x58, 0x10008396c\nLDR             X0, [X21]; __p                                         ; +0x5c, 0x100083970\nBL              __ZdlPv; operator delete(void *)                       ; +0x60, 0x100083974\nLDUR            Q0, [X29,#var_38]                                      ; +0x64, 0x100083978\nSTR             Q0, [X21]                                              ; +0x68, 0x10008397c\nLDUR            X8, [X29,#var_28]                                      ; +0x6c, 0x100083980\nSTR             X8, [X21,#0x10]                                        ; +0x70, 0x100083984\nLDR             X0, [X19,#0x298]                                       ; +0x74, 0x100083988\nSUB             X8, X29, #-var_38                                      ; +0x78, 0x10008398c\nBL              CCTextInputNode__getString                             ; +0x7c, 0x100083990\nADD             X22, X19, #0x2D0                                       ; +0x80, 0x100083994\nLDRSB           W8, [X19,#0x2E7]                                       ; +0x84, 0x100083998\nTBZ             W8, #0x1F, loc_1000839A8                               ; +0x88, 0x10008399c\nLDR             X0, [X22]; __p                                         ; +0x8c, 0x1000839a0\nBL              __ZdlPv; operator delete(void *)                       ; +0x90, 0x1000839a4\nLDUR            Q0, [X29,#var_38]                                      ; +0x94, 0x1000839a8\nSTR             Q0, [X22]                                              ; +0x98, 0x1000839ac\nLDUR            X8, [X29,#var_28]                                      ; +0x9c, 0x1000839b0\nSTR             X8, [X22,#0x10]                                        ; +0xa0, 0x1000839b4\nLDRSB           X8, [X19,#0x2CF]                                       ; +0xa4, 0x1000839b8\nTBZ             X8, #0x3F, loc_1000839C4 ; '?'                         ; +0xa8, 0x1000839bc\nLDR             X8, [X19,#0x2C0]                                       ; +0xac, 0x1000839c0\nCMP             X8, #2                                                 ; +0xb0, 0x1000839c4\nB.HI            loc_1000839EC                                          ; +0xb4, 0x1000839c8\nLDR             X0, [X19,#0x2A0]                                       ; +0xb8, 0x1000839cc\nLDR             X8, [X0]                                               ; +0xbc, 0x1000839d0\nLDR             X8, [X8,#0x390]                                        ; +0xc0, 0x1000839d4\nADRL            X1, aTooShortMinimu_0; \"Too short. Minimum 3 characters\" ; +0xc4, 0x1000839d8\nBLR             X8                                                     ; +0xcc, 0x1000839e0\nLDR             X0, [X19,#0x2A0]                                       ; +0xd0, 0x1000839e4\nB               loc_100083A1C                                          ; +0xd4, 0x1000839e8\nLDRSB           X8, [X19,#0x2E7]                                       ; +0xd8, 0x1000839ec\nTBZ             X8, #0x3F, loc_1000839F8 ; '?'                         ; +0xdc, 0x1000839f0\nLDR             X8, [X19,#0x2D8]                                       ; +0xe0, 0x1000839f4\nCMP             X8, #5                                                 ; +0xe4, 0x1000839f8\nB.HI            loc_100083A44                                          ; +0xe8, 0x1000839fc\nLDR             X0, [X19,#0x2A8]                                       ; +0xec, 0x100083a00\nLDR             X8, [X0]                                               ; +0xf0, 0x100083a04\nLDR             X8, [X8,#0x390]                                        ; +0xf4, 0x100083a08\nADRL            X1, aTooShortMinimu; \"Too short. Minimum 6 characters\" ; +0xf8, 0x100083a0c\nBLR             X8                                                     ; +0x100, 0x100083a14\nLDR             X0, [X19,#0x2A8]                                       ; +0x104, 0x100083a18\nLDR             X8, [X0]                                               ; +0x108, 0x100083a1c\nLDR             X8, [X8,#0x420]                                        ; +0x10c, 0x100083a20\nADRL            X1, unk_1006365E5                                      ; +0x110, 0x100083a24\nBLR             X8                                                     ; +0x118, 0x100083a2c\nLDP             X29, X30, [SP,#0x90+var_s0]                            ; +0x11c, 0x100083a30\nLDP             X20, X19, [SP,#0x90+var_10]                            ; +0x120, 0x100083a34\nLDP             X22, X21, [SP,#0x90+var_20]                            ; +0x124, 0x100083a38\nADD             SP, SP, #0xA0                                          ; +0x128, 0x100083a3c\nRET                                                                    ; +0x12c, 0x100083a40\nBL              GJAccountManager__sharedState                          ; +0x130, 0x100083a44\nADD             X8, X19, #0x280                                        ; +0x134, 0x100083a48\nSTR             X8, [X0,#0x190]                                        ; +0x138, 0x100083a4c\nLDRSB           W8, [X19,#0x2E7]                                       ; +0x13c, 0x100083a50\nTBNZ            W8, #0x1F, loc_100083A6C                               ; +0x140, 0x100083a54\nLDR             Q0, [X22]                                              ; +0x144, 0x100083a58\nSTR             Q0, [SP,#0x90+__p]                                     ; +0x148, 0x100083a5c\nLDR             X8, [X22,#0x10]                                        ; +0x14c, 0x100083a60\nSTR             X8, [SP,#0x90+var_40]                                  ; +0x150, 0x100083a64\nB               loc_100083A7C                                          ; +0x154, 0x100083a68\nLDR             X1, [X19,#0x2D0]; __src                                ; +0x158, 0x100083a6c\nLDR             X2, [X19,#0x2D8]                                       ; +0x15c, 0x100083a70\nADD             X0, SP, #0x90+__p; __dst                               ; +0x160, 0x100083a74\nBL              sub_1000097D0                                          ; +0x164, 0x100083a78\nSUB             X8, X29, #-var_38                                      ; +0x168, 0x100083a7c\nADD             X0, SP, #0x90+__p                                      ; +0x16c, 0x100083a80\nBL              GJAccountManager__getShaPassword                       ; +0x170, 0x100083a84\nLDRSB           W8, [X19,#0x2E7]                                       ; +0x174, 0x100083a88\nTBZ             W8, #0x1F, loc_100083A98                               ; +0x178, 0x100083a8c\nLDR             X0, [X22]; __p                                         ; +0x17c, 0x100083a90\nBL              __ZdlPv; operator delete(void *)                       ; +0x180, 0x100083a94\nLDUR            Q0, [X29,#var_38]                                      ; +0x184, 0x100083a98\nSTR             Q0, [X22]                                              ; +0x188, 0x100083a9c\nLDUR            X8, [X29,#var_28]                                      ; +0x18c, 0x100083aa0\nSTR             X8, [X22,#0x10]                                        ; +0x190, 0x100083aa4\nSTURB           WZR, [X29,#var_28+7]                                   ; +0x194, 0x100083aa8\nSTURB           WZR, [X29,#var_38]                                     ; +0x198, 0x100083aac\nLDRSB           W8, [SP,#0x90+var_40+7]                                ; +0x19c, 0x100083ab0\nTBZ             W8, #0x1F, loc_100083AC0                               ; +0x1a0, 0x100083ab4\nLDR             X0, [SP,#0x90+__p]; __p                                ; +0x1a4, 0x100083ab8\nBL              __ZdlPv; operator delete(void *)                       ; +0x1a8, 0x100083abc\nBL              GJAccountManager__sharedState                          ; +0x1ac, 0x100083ac0\nMOV             X20, X0                                                ; +0x1b0, 0x100083ac4\nLDRSB           W8, [X19,#0x2CF]                                       ; +0x1b4, 0x100083ac8\nTBNZ            W8, #0x1F, loc_100083AE4                               ; +0x1b8, 0x100083acc\nLDR             Q0, [X21]                                              ; +0x1bc, 0x100083ad0\nSTR             Q0, [SP,#0x90+__dst]                                   ; +0x1c0, 0x100083ad4\nLDR             X8, [X21,#0x10]                                        ; +0x1c4, 0x100083ad8\nSTR             X8, [SP,#0x90+var_60]                                  ; +0x1c8, 0x100083adc\nB               loc_100083AF4                                          ; +0x1cc, 0x100083ae0\nLDR             X1, [X19,#0x2B8]; __src                                ; +0x1d0, 0x100083ae4\nLDR             X2, [X19,#0x2C0]                                       ; +0x1d4, 0x100083ae8\nADD             X0, SP, #0x90+__dst; __dst                             ; +0x1d8, 0x100083aec\nBL              sub_1000097D0                                          ; +0x1dc, 0x100083af0\nLDRSB           W8, [X19,#0x2E7]                                       ; +0x1e0, 0x100083af4\nTBNZ            W8, #0x1F, loc_100083B10                               ; +0x1e4, 0x100083af8\nLDR             Q0, [X22]                                              ; +0x1e8, 0x100083afc\nSTR             Q0, [SP,#0x90+var_90]                                  ; +0x1ec, 0x100083b00\nLDR             X8, [X22,#0x10]                                        ; +0x1f0, 0x100083b04\nSTR             X8, [SP,#0x90+var_80]                                  ; +0x1f4, 0x100083b08\nB               loc_100083B20                                          ; +0x1f8, 0x100083b0c\nLDR             X1, [X19,#0x2D0]; __src                                ; +0x1fc, 0x100083b10\nLDR             X2, [X19,#0x2D8]                                       ; +0x200, 0x100083b14\nMOV             X0, SP; __dst                                          ; +0x204, 0x100083b18\nBL              sub_1000097D0                                          ; +0x208, 0x100083b1c\nADD             X1, SP, #0x90+__dst                                    ; +0x20c, 0x100083b20\nMOV             X2, SP                                                 ; +0x210, 0x100083b24\nMOV             X0, X20                                                ; +0x214, 0x100083b28\nBL              GJAccountManager__loginAccount                         ; +0x218, 0x100083b2c\nMOV             X20, X0                                                ; +0x21c, 0x100083b30\nLDRSB           W8, [SP,#0x90+var_80+7]                                ; +0x220, 0x100083b34\nTBZ             W8, #0x1F, loc_100083B44                               ; +0x224, 0x100083b38\nLDR             X0, [SP,#0x90+var_90]; __p                             ; +0x228, 0x100083b3c\nBL              __ZdlPv; operator delete(void *)                       ; +0x22c, 0x100083b40\nLDRSB           W8, [SP,#0x90+var_60+7]                                ; +0x230, 0x100083b44\nTBNZ            W8, #0x1F, loc_100083B5C                               ; +0x234, 0x100083b48\nCBZ             W20, loc_100083B68                                     ; +0x238, 0x100083b4c\nMOV             X0, X19                                                ; +0x23c, 0x100083b50\nBL              AccountLoginLayer__showLoadingUI                       ; +0x240, 0x100083b54\nB               loc_100083A30                                          ; +0x244, 0x100083b58\nLDR             X0, [SP,#0x90+__dst]; __p                              ; +0x248, 0x100083b5c\nBL              __ZdlPv; operator delete(void *)                       ; +0x24c, 0x100083b60\nCBNZ            W20, loc_100083B50                                     ; +0x250, 0x100083b64\nLDR             X8, [X19]                                              ; +0x254, 0x100083b68\nLDR             X8, [X8,#0x538]                                        ; +0x258, 0x100083b6c\nMOV             X0, X19                                                ; +0x25c, 0x100083b70\nMOV             W1, #0xFFFFFFFF                                        ; +0x260, 0x100083b74\nBLR             X8                                                     ; +0x264, 0x100083b78\nB               loc_100083A30                                          ; +0x268, 0x100083b7c", "xrefs": ["AccountLoginLayer::init @ 0x1000833c0"], "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"}