{"type": "func", "start": 8701496, "end": 8701984, "name": "AccountLayer::syncAccountFinished", "pseudocode": "// \n// AccountLayer::syncAccountFinished from 0x84c638 to 0x84c820 (488 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'AccountLayer::syncAccountFinished @ 0x84c828\n// > <???> @ 0x6cd98\n// > <???> @ 0x118ddb8\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 AccountLayer::syncAccountFinished(AccountLayer *a1)\n{\n  TextArea *m_textArea; // x19\n  char *v3; // x0\n  FLAlertLayer *v4; // x20\n  char *v5; // x0\n  unsigned int *v6; // x1\n  int v7; // w2\n  unsigned int *v8; // x1\n  int v9; // w2\n  _DWORD *v10; // [xsp+50h] [xbp+50h] BYREF\n\n  AccountLayer::hideLoadingUI(a1);\n  m_textArea = a1->m_textArea;\n  sub_D153B8((int)&v10, \"Sync successful\");\n  TextArea::setString((__int64)m_textArea, (const void **)&v10);\n  v3 = (char *)(v10 - 6);\n  if ( v10 - 6 != (_DWORD *)&qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v6 = v10 - 2;\n      do\n        v7 = __ldaxr(v6);\n      while ( __stlxr(v7 - 1, v6) );\n    }\n    else\n    {\n      v7 = *(v10 - 2);\n      *(v10 - 2) = v7 - 1;\n    }\n    if ( v7 <= 0 )\n      operator delete(v3);\n  }\n  TextArea::colorAllCharactersTo(a1->m_textArea, (cocos2d::ccColor3B)65280);\n  sub_D153B8((int)&v10, \"<cg>Saved data</c> has been <cy>downloaded</c>.\");\n  v4 = FLAlertLayer::create(0, (__int64)\"Load Data\", (__int64)&v10);\n  v5 = (char *)(v10 - 6);\n  if ( v10 - 6 != (_DWORD *)&qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v8 = v10 - 2;\n      do\n        v9 = __ldaxr(v8);\n      while ( __stlxr(v9 - 1, v8) );\n    }\n    else\n    {\n      v9 = *(v10 - 2);\n      *(v10 - 2) = v9 - 1;\n    }\n    if ( v9 <= 0 )\n      operator delete(v5);\n  }\n  v4->show(v4);\n}", "assembly": "; \n; AccountLayer::syncAccountFinished from 0x84c638 to 0x84c820 (488 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'AccountLayer::syncAccountFinished @ 0x84c828\n; > <???> @ 0x6cd98\n; > <???> @ 0x118ddb8\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\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x84c638\nMOV             X29, SP                                                ; +0x4, 0x84c63c\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x8, 0x84c640\nADRP            X21, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x84c644\nSTR             X23, [SP,#0x60+var_30]                                 ; +0x10, 0x84c648\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x14, 0x84c64c\nMOV             X23, X0                                                ; +0x18, 0x84c650\nADD             X20, X29, #0x60+var_10                                 ; +0x1c, 0x84c654\nLDR             X1, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x84c658\nADD             X22, X29, #0x60+var_20                                 ; +0x24, 0x84c65c\nLDR             X1, [X1]                                               ; +0x28, 0x84c660\nSTR             X1, [X29,#0x60+var_8]                                  ; +0x2c, 0x84c664\nBL              _ZN12AccountLayer13hideLoadingUIEv; AccountLayer::hideLoadingUI(void) ; +0x30, 0x84c668\nLDR             X19, [X23,#0x288]                                      ; +0x34, 0x84c66c\nADRP            X1, #aSyncSuccessful@PAGE; \"Sync successful\"           ; +0x38, 0x84c670\nMOV             X0, X20; int                                           ; +0x3c, 0x84c674\nADD             X1, X1, #aSyncSuccessful@PAGEOFF; \"Sync successful\"    ; +0x40, 0x84c678\nMOV             X2, X22                                                ; +0x44, 0x84c67c\nBL              sub_D153B8                                             ; +0x48, 0x84c680\nMOV             X0, X19                                                ; +0x4c, 0x84c684\nMOV             X1, X20                                                ; +0x50, 0x84c688\nBL              _ZN8TextArea9setStringESs; TextArea::setString(std::string) ; +0x54, 0x84c68c\nADRP            X19, #off_122EFE8@PAGE                                 ; +0x58, 0x84c690\nLDR             X1, [X29,#0x60+var_10]                                 ; +0x5c, 0x84c694\nSUB             X0, X1, #0x18; p                                       ; +0x60, 0x84c698\nLDR             X2, [X19,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x64, 0x84c69c\nCMP             X0, X2                                                 ; +0x68, 0x84c6a0\nB.NE            loc_84C740                                             ; +0x6c, 0x84c6a4\nADRP            X1, #qword_EEC1F8@PAGE                                 ; +0x70, 0x84c6a8\nLDR             X0, [X23,#0x288]                                       ; +0x74, 0x84c6ac\nLDR             X1, [X1,#qword_EEC1F8@PAGEOFF]                         ; +0x78, 0x84c6b0\nBL              _ZN8TextArea20colorAllCharactersToEN7cocos2d10_ccColor3BE; TextArea::colorAllCharactersTo(cocos2d::_ccColor3B) ; +0x7c, 0x84c6b4\nADRP            X1, #aCgSavedDataCHa@PAGE; \"<cg>Saved data</c> has been <cy>downloa\"... ; +0x80, 0x84c6b8\nMOV             X0, X20; int                                           ; +0x84, 0x84c6bc\nADD             X1, X1, #aCgSavedDataCHa@PAGEOFF; \"<cg>Saved data</c> has been <cy>downloa\"... ; +0x88, 0x84c6c0\nMOV             X2, X22                                                ; +0x8c, 0x84c6c4\nBL              sub_D153B8                                             ; +0x90, 0x84c6c8\nLDR             S0, =0x43960000                                        ; +0x94, 0x84c6cc\nADRP            X1, #aLoadData@PAGE; \"Load Data\"                       ; +0x98, 0x84c6d0\nADRP            X3, #aOk@PAGE; \"OK\"                                    ; +0x9c, 0x84c6d4\nMOV             X0, #0                                                 ; +0xa0, 0x84c6d8\nADD             X1, X1, #aLoadData@PAGEOFF; \"Load Data\"                ; +0xa4, 0x84c6dc\nMOV             X2, X20                                                ; +0xa8, 0x84c6e0\nADD             X3, X3, #aOk@PAGEOFF; \"OK\"                             ; +0xac, 0x84c6e4\nMOV             X4, #0                                                 ; +0xb0, 0x84c6e8\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0xb4, 0x84c6ec\nLDR             X1, [X29,#0x60+var_10]                                 ; +0xb8, 0x84c6f0\nMOV             X20, X0                                                ; +0xbc, 0x84c6f4\nLDR             X19, [X19,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0xc0, 0x84c6f8\nSUB             X0, X1, #0x18; p                                       ; +0xc4, 0x84c6fc\nCMP             X0, X19                                                ; +0xc8, 0x84c700\nB.NE            loc_84C774                                             ; +0xcc, 0x84c704\nLDR             X1, [X20]                                              ; +0xd0, 0x84c708\nMOV             X0, X20                                                ; +0xd4, 0x84c70c\nLDR             X1, [X1,#0x508]                                        ; +0xd8, 0x84c710\nBLR             X1                                                     ; +0xdc, 0x84c714\nLDR             X0, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xe0, 0x84c718\nLDR             X1, [X29,#0x60+var_8]                                  ; +0xe4, 0x84c71c\nLDR             X0, [X0]                                               ; +0xe8, 0x84c720\nCMP             X1, X0                                                 ; +0xec, 0x84c724\nB.NE            loc_84C7C8                                             ; +0xf0, 0x84c728\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xf4, 0x84c72c\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0xf8, 0x84c730\nLDR             X23, [SP,#0x60+var_30]                                 ; +0xfc, 0x84c734\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0x100, 0x84c738\nRET                                                                    ; +0x104, 0x84c73c\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x108, 0x84c740\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x10c, 0x84c744\nCBZ             X2, loc_84C7B8                                         ; +0x110, 0x84c748\nSUB             X1, X1, #8                                             ; +0x114, 0x84c74c\nLDAXR           W2, [X1]                                               ; +0x118, 0x84c750\nSUB             W3, W2, #1                                             ; +0x11c, 0x84c754\nSTLXR           W4, W3, [X1]                                           ; +0x120, 0x84c758\nCBNZ            W4, loc_84C750                                         ; +0x124, 0x84c75c\nCMP             W2, WZR                                                ; +0x128, 0x84c760\nB.GT            loc_84C6A8                                             ; +0x12c, 0x84c764\nADD             X1, X29, #0x60+var_18                                  ; +0x130, 0x84c768\nBL              j__ZdlPv; operator delete(void *)                      ; +0x134, 0x84c76c\nB               loc_84C6A8                                             ; +0x138, 0x84c770\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x13c, 0x84c774\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x140, 0x84c778\nCBZ             X2, loc_84C7A8                                         ; +0x144, 0x84c77c\nSUB             X1, X1, #8                                             ; +0x148, 0x84c780\nLDAXR           W2, [X1]                                               ; +0x14c, 0x84c784\nSUB             W3, W2, #1                                             ; +0x150, 0x84c788\nSTLXR           W4, W3, [X1]                                           ; +0x154, 0x84c78c\nCBNZ            W4, loc_84C784                                         ; +0x158, 0x84c790\nCMP             W2, WZR                                                ; +0x15c, 0x84c794\nB.GT            loc_84C708                                             ; +0x160, 0x84c798\nADD             X1, X29, #0x60+var_18                                  ; +0x164, 0x84c79c\nBL              j__ZdlPv; operator delete(void *)                      ; +0x168, 0x84c7a0\nB               loc_84C708                                             ; +0x16c, 0x84c7a4\nLDUR            W2, [X1,#-8]                                           ; +0x170, 0x84c7a8\nSUB             W3, W2, #1                                             ; +0x174, 0x84c7ac\nSTUR            W3, [X1,#-8]                                           ; +0x178, 0x84c7b0\nB               loc_84C794                                             ; +0x17c, 0x84c7b4\nLDUR            W2, [X1,#-8]                                           ; +0x180, 0x84c7b8\nSUB             W3, W2, #1                                             ; +0x184, 0x84c7bc\nSTUR            W3, [X1,#-8]                                           ; +0x188, 0x84c7c0\nB               loc_84C760                                             ; +0x18c, 0x84c7c4\nBL              .__stack_chk_fail                                      ; +0x190, 0x84c7c8\nMOV             X20, X0                                                ; +0x194, 0x84c7cc\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x198, 0x84c7d0\nLDR             X19, [X19,#0xFE8]                                      ; +0x19c, 0x84c7d4\nSUB             X0, X0, #0x18                                          ; +0x1a0, 0x84c7d8\nCMP             X0, X19                                                ; +0x1a4, 0x84c7dc\nB.EQ            loc_84C7EC                                             ; +0x1a8, 0x84c7e0\nADD             X1, X29, #0x60+var_18                                  ; +0x1ac, 0x84c7e4\nBL              sub_4DC260                                             ; +0x1b0, 0x84c7e8\nMOV             X0, X20                                                ; +0x1b4, 0x84c7ec\nBL              _Unwind_Resume                                         ; +0x1b8, 0x84c7f0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x1bc, 0x84c7f4\nMOV             X19, X0                                                ; +0x1c0, 0x84c7f8\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x1c4, 0x84c7fc\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x1c8, 0x84c800\nSUB             X0, X0, #0x18                                          ; +0x1cc, 0x84c804\nCMP             X0, X1                                                 ; +0x1d0, 0x84c808\nB.EQ            loc_84C818                                             ; +0x1d4, 0x84c80c\nADD             X1, X29, #0x60+var_18                                  ; +0x1d8, 0x84c810\nBL              sub_4DC260                                             ; +0x1dc, 0x84c814\nMOV             X0, X19                                                ; +0x1e0, 0x84c818\nBL              _Unwind_Resume                                         ; +0x1e4, 0x84c81c", "xrefs": ["`non-virtual thunk to'AccountLayer::syncAccountFinished @ 0x84c828", "<???> @ 0x6cd98", "<???> @ 0x118ddb8"], "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"}