{"type": "func", "start": 8673172, "end": 8673912, "name": "GJAccountManager::registerAccount", "pseudocode": "// \n// GJAccountManager::registerAccount from 0x845794 to 0x845a78 (740 bytes)\n// \n// 2 xrefs:\n// > AccountRegisterLayer::onSubmit @ 0x84fb48\n// > <???> @ 0x96f78\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__int64 __fastcall GJAccountManager::registerAccount(GJAccountManager *a1, const char **a2, __int64 *a3, __int64 *a4)\n{\n  _BOOL4 isDLActive; // w1\n  __int64 result; // x0\n  __int64 v10; // x21\n  const char *v11; // x24\n  __int64 v12; // x23\n  cocos2d::CCString *v13; // x0\n  const char *CString; // x0\n  cocos2d::CCString *v15; // x0\n  char *v16; // x21\n  char *v17; // x0\n  char *v18; // x0\n  char *v19; // x0\n  unsigned int *v20; // x1\n  int v21; // w2\n  unsigned int *v22; // x1\n  int v23; // w2\n  unsigned int *v24; // x1\n  int v25; // w2\n  const char *v26; // [xsp+70h] [xbp+70h] BYREF\n  const char *v27; // [xsp+78h] [xbp+78h] BYREF\n  const char *v28; // [xsp+80h] [xbp+80h] BYREF\n\n  isDLActive = GJAccountManager::isDLActive(a1, \"reg_account\");\n  result = 0;\n  if ( !isDLActive )\n  {\n    GJAccountManager::addDLToActive(a1, \"reg_account\");\n    v10 = *a4;\n    v11 = *a2;\n    v12 = *a3;\n    v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                 (cocos2d::CCString *)\"%c%s%s%c%c%s\",\n                                 (const char *)off_50 + 7,\n                                 \"mfv\",\n                                 \"3899\",\n                                 103,\n                                 99,\n                                 \"9\");\n    CString = cocos2d::CCString::getCString(v13);\n    v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                 (cocos2d::CCString *)\"userName=%s&password=%s&email=%s&secret=%s\",\n                                 v11,\n                                 v12,\n                                 v10,\n                                 CString);\n    v16 = (char *)cocos2d::CCString::getCString(v15);\n    sub_D153B8((int)&v26, \"https://www.boomlings.com/database/accounts/registerGJAccount.php\");\n    sub_D153B8((int)&v27, v16);\n    sub_D153B8((int)&v28, \"RegisterAccount\");\n    GJAccountManager::ProcessHttpRequest(a1, &v26, &v27, &v28, 22);\n    v17 = (char *)(v28 - 24);\n    if ( v28 - 24 != (const char *)&qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v22 = (unsigned int *)(v28 - 8);\n        do\n          v23 = __ldaxr(v22);\n        while ( __stlxr(v23 - 1, v22) );\n      }\n      else\n      {\n        v23 = *((_DWORD *)v28 - 2);\n        *((_DWORD *)v28 - 2) = v23 - 1;\n      }\n      if ( v23 <= 0 )\n        operator delete(v17);\n    }\n    v18 = (char *)(v27 - 24);\n    if ( v27 - 24 != (const char *)&qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v24 = (unsigned int *)(v27 - 8);\n        do\n          v25 = __ldaxr(v24);\n        while ( __stlxr(v25 - 1, v24) );\n      }\n      else\n      {\n        v25 = *((_DWORD *)v27 - 2);\n        *((_DWORD *)v27 - 2) = v25 - 1;\n      }\n      if ( v25 <= 0 )\n        operator delete(v18);\n    }\n    v19 = (char *)(v26 - 24);\n    if ( v26 - 24 == (const char *)&qword_124B6B0 )\n      return 1;\n    if ( &pthread_create )\n    {\n      v20 = (unsigned int *)(v26 - 8);\n      do\n        v21 = __ldaxr(v20);\n      while ( __stlxr(v21 - 1, v20) );\n    }\n    else\n    {\n      v21 = *((_DWORD *)v26 - 2);\n      *((_DWORD *)v26 - 2) = v21 - 1;\n    }\n    if ( v21 > 0 )\n    {\n      return 1;\n    }\n    else\n    {\n      operator delete(v19);\n      return 1;\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJAccountManager::registerAccount from 0x845794 to 0x845a78 (740 bytes)\n; \n; 2 xrefs:\n; > AccountRegisterLayer::onSubmit @ 0x84fb48\n; > <???> @ 0x96f78\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_90]!                                ; +0x0, 0x845794\nMOV             X29, SP                                                ; +0x4, 0x845798\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0x8, 0x84579c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8457a0\nADRP            X20, #aRegAccount@PAGE; \"reg_account\"                  ; +0x10, 0x8457a4\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x14, 0x8457a8\nADD             X20, X20, #aRegAccount@PAGEOFF; \"reg_account\"          ; +0x18, 0x8457ac\nMOV             X23, X2                                                ; +0x1c, 0x8457b0\nLDR             X4, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x8457b4\nMOV             X24, X1                                                ; +0x24, 0x8457b8\nMOV             X1, X20; char *                                        ; +0x28, 0x8457bc\nSTR             X25, [SP,#0x90+var_50]                                 ; +0x2c, 0x8457c0\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x30, 0x8457c4\nLDR             X2, [X4]                                               ; +0x34, 0x8457c8\nMOV             X22, X0                                                ; +0x38, 0x8457cc\nMOV             X21, X3                                                ; +0x3c, 0x8457d0\nSTR             X2, [X29,#0x90+var_8]                                  ; +0x40, 0x8457d4\nBL              _ZN16GJAccountManager10isDLActiveEPKc; GJAccountManager::isDLActive(char const*) ; +0x44, 0x8457d8\nUXTB            W1, W0                                                 ; +0x48, 0x8457dc\nMOV             W0, #0                                                 ; +0x4c, 0x8457e0\nCBZ             W1, loc_845814                                         ; +0x50, 0x8457e4\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x54, 0x8457e8\nLDR             X2, [X29,#0x90+var_8]                                  ; +0x58, 0x8457ec\nLDR             X1, [X19]                                              ; +0x5c, 0x8457f0\nCMP             X2, X1                                                 ; +0x60, 0x8457f4\nB.NE            loc_8459F8                                             ; +0x64, 0x8457f8\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0x68, 0x8457fc\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0x6c, 0x845800\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0x70, 0x845804\nLDR             X25, [SP,#0x90+var_50]                                 ; +0x74, 0x845808\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0x78, 0x84580c\nRET                                                                    ; +0x7c, 0x845810\nMOV             X1, X20; char *                                        ; +0x80, 0x845814\nMOV             X0, X22; this                                          ; +0x84, 0x845818\nADD             X25, X29, #0x90+var_20                                 ; +0x88, 0x84581c\nADD             X20, X29, #0x90+var_18                                 ; +0x8c, 0x845820\nBL              _ZN16GJAccountManager13addDLToActiveEPKc; GJAccountManager::addDLToActive(char const*) ; +0x90, 0x845824\nLDR             X21, [X21]                                             ; +0x94, 0x845828\nADRP            X6, #(aReachPathOfLav_7+0x18)@PAGE; \"9\"                ; +0x98, 0x84582c\nADRP            X2, #aMfv@PAGE; \"mfv\"                                  ; +0x9c, 0x845830\nADRP            X3, #a3899@PAGE; \"3899\"                                ; +0xa0, 0x845834\nADRP            X0, #aCSSCCS@PAGE; \"%c%s%s%c%c%s\"                      ; +0xa4, 0x845838\nMOV             W5, #0x63 ; 'c'                                        ; +0xa8, 0x84583c\nADD             X6, X6, #(aReachPathOfLav_7+0x18)@PAGEOFF; \"9\"         ; +0xac, 0x845840\nMOV             W1, #(off_50+7); char *                                ; +0xb0, 0x845844\nADD             X2, X2, #aMfv@PAGEOFF; \"mfv\"                           ; +0xb4, 0x845848\nADD             X3, X3, #a3899@PAGEOFF; \"3899\"                         ; +0xb8, 0x84584c\nMOV             W4, #0x67 ; 'g'                                        ; +0xbc, 0x845850\nADD             X0, X0, #aCSSCCS@PAGEOFF; \"%c%s%s%c%c%s\"               ; +0xc0, 0x845854\nLDR             X24, [X24]                                             ; +0xc4, 0x845858\nLDR             X23, [X23]                                             ; +0xc8, 0x84585c\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xcc, 0x845860\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xd0, 0x845864\nMOV             X4, X0                                                 ; +0xd4, 0x845868\nADRP            X0, #aUsernameSPassw@PAGE; \"userName=%s&password=%s&email=%s&secret\"... ; +0xd8, 0x84586c\nMOV             X3, X21                                                ; +0xdc, 0x845870\nMOV             X1, X24; char *                                        ; +0xe0, 0x845874\nMOV             X2, X23                                                ; +0xe4, 0x845878\nADD             X0, X0, #aUsernameSPassw@PAGEOFF; \"userName=%s&password=%s&email=%s&secret\"... ; +0xe8, 0x84587c\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xec, 0x845880\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xf0, 0x845884\nMOV             X21, X0                                                ; +0xf4, 0x845888\nADRP            X1, #aHttpsWwwBoomli_66@PAGE; \"https://www.boomlings.com/database/acco\"... ; +0xf8, 0x84588c\nMOV             X0, X25; int                                           ; +0xfc, 0x845890\nADD             X1, X1, #aHttpsWwwBoomli_66@PAGEOFF; \"https://www.boomlings.com/database/acco\"... ; +0x100, 0x845894\nADD             X2, X29, #0x90+var_40                                  ; +0x104, 0x845898\nBL              sub_D153B8                                             ; +0x108, 0x84589c\nMOV             X0, X20; int                                           ; +0x10c, 0x8458a0\nMOV             X1, X21; char *                                        ; +0x110, 0x8458a4\nADD             X2, X29, #0x90+var_38                                  ; +0x114, 0x8458a8\nBL              sub_D153B8                                             ; +0x118, 0x8458ac\nADD             X21, X29, #0x90+var_10                                 ; +0x11c, 0x8458b0\nADRP            X1, #aRegisteraccoun@PAGE; \"RegisterAccount\"           ; +0x120, 0x8458b4\nMOV             X0, X21; int                                           ; +0x124, 0x8458b8\nADD             X1, X1, #aRegisteraccoun@PAGEOFF; \"RegisterAccount\"    ; +0x128, 0x8458bc\nADD             X2, X29, #0x90+var_30                                  ; +0x12c, 0x8458c0\nBL              sub_D153B8                                             ; +0x130, 0x8458c4\nMOV             X0, X22                                                ; +0x134, 0x8458c8\nMOV             X1, X25                                                ; +0x138, 0x8458cc\nMOV             X2, X20                                                ; +0x13c, 0x8458d0\nMOV             X3, X21                                                ; +0x140, 0x8458d4\nMOV             W4, #0x16                                              ; +0x144, 0x8458d8\nBL              _ZN16GJAccountManager18ProcessHttpRequestESsSsSs10GJHttpType; GJAccountManager::ProcessHttpRequest(std::string,std::string,std::string,GJHttpType) ; +0x148, 0x8458dc\nADRP            X20, #off_122EFE8@PAGE                                 ; +0x14c, 0x8458e0\nLDR             X1, [X29,#0x90+var_10]                                 ; +0x150, 0x8458e4\nSUB             X0, X1, #0x18; p                                       ; +0x154, 0x8458e8\nLDR             X2, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x158, 0x8458ec\nCMP             X0, X2                                                 ; +0x15c, 0x8458f0\nB.NE            loc_845960                                             ; +0x160, 0x8458f4\nLDR             X1, [X29,#0x90+var_18]                                 ; +0x164, 0x8458f8\nLDR             X2, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x168, 0x8458fc\nSUB             X0, X1, #0x18; p                                       ; +0x16c, 0x845900\nCMP             X0, X2                                                 ; +0x170, 0x845904\nB.NE            loc_845994                                             ; +0x174, 0x845908\nLDR             X1, [X29,#0x90+var_20]                                 ; +0x178, 0x84590c\nLDR             X20, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0x17c, 0x845910\nSUB             X0, X1, #0x18; p                                       ; +0x180, 0x845914\nCMP             X0, X20                                                ; +0x184, 0x845918\nB.NE            loc_845928                                             ; +0x188, 0x84591c\nMOV             W0, #1                                                 ; +0x18c, 0x845920\nB               loc_8457E8                                             ; +0x190, 0x845924\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x194, 0x845928\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x198, 0x84592c\nCBZ             X2, loc_8459C8                                         ; +0x19c, 0x845930\nSUB             X1, X1, #8                                             ; +0x1a0, 0x845934\nLDAXR           W2, [X1]                                               ; +0x1a4, 0x845938\nSUB             W3, W2, #1                                             ; +0x1a8, 0x84593c\nSTLXR           W4, W3, [X1]                                           ; +0x1ac, 0x845940\nCBNZ            W4, loc_845938                                         ; +0x1b0, 0x845944\nCMP             W2, WZR                                                ; +0x1b4, 0x845948\nB.GT            loc_845920                                             ; +0x1b8, 0x84594c\nMOV             X1, X21                                                ; +0x1bc, 0x845950\nBL              j__ZdlPv; operator delete(void *)                      ; +0x1c0, 0x845954\nMOV             W0, #1                                                 ; +0x1c4, 0x845958\nB               loc_8457E8                                             ; +0x1c8, 0x84595c\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x1cc, 0x845960\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x1d0, 0x845964\nCBZ             X2, loc_8459D8                                         ; +0x1d4, 0x845968\nSUB             X1, X1, #8                                             ; +0x1d8, 0x84596c\nLDAXR           W2, [X1]                                               ; +0x1dc, 0x845970\nSUB             W3, W2, #1                                             ; +0x1e0, 0x845974\nSTLXR           W4, W3, [X1]                                           ; +0x1e4, 0x845978\nCBNZ            W4, loc_845970                                         ; +0x1e8, 0x84597c\nCMP             W2, WZR                                                ; +0x1ec, 0x845980\nB.GT            loc_8458F8                                             ; +0x1f0, 0x845984\nADD             X1, X29, #0x90+var_28                                  ; +0x1f4, 0x845988\nBL              j__ZdlPv; operator delete(void *)                      ; +0x1f8, 0x84598c\nB               loc_8458F8                                             ; +0x1fc, 0x845990\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x200, 0x845994\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x204, 0x845998\nCBZ             X2, loc_8459E8                                         ; +0x208, 0x84599c\nSUB             X1, X1, #8                                             ; +0x20c, 0x8459a0\nLDAXR           W2, [X1]                                               ; +0x210, 0x8459a4\nSUB             W3, W2, #1                                             ; +0x214, 0x8459a8\nSTLXR           W4, W3, [X1]                                           ; +0x218, 0x8459ac\nCBNZ            W4, loc_8459A4                                         ; +0x21c, 0x8459b0\nCMP             W2, WZR                                                ; +0x220, 0x8459b4\nB.GT            loc_84590C                                             ; +0x224, 0x8459b8\nMOV             X1, X21                                                ; +0x228, 0x8459bc\nBL              j__ZdlPv; operator delete(void *)                      ; +0x22c, 0x8459c0\nB               loc_84590C                                             ; +0x230, 0x8459c4\nLDUR            W2, [X1,#-8]                                           ; +0x234, 0x8459c8\nSUB             W3, W2, #1                                             ; +0x238, 0x8459cc\nSTUR            W3, [X1,#-8]                                           ; +0x23c, 0x8459d0\nB               loc_845948                                             ; +0x240, 0x8459d4\nLDUR            W2, [X1,#-8]                                           ; +0x244, 0x8459d8\nSUB             W3, W2, #1                                             ; +0x248, 0x8459dc\nSTUR            W3, [X1,#-8]                                           ; +0x24c, 0x8459e0\nB               loc_845980                                             ; +0x250, 0x8459e4\nLDUR            W2, [X1,#-8]                                           ; +0x254, 0x8459e8\nSUB             W3, W2, #1                                             ; +0x258, 0x8459ec\nSTUR            W3, [X1,#-8]                                           ; +0x25c, 0x8459f0\nB               loc_8459B4                                             ; +0x260, 0x8459f4\nBL              .__stack_chk_fail                                      ; +0x264, 0x8459f8\nMOV             X19, X0                                                ; +0x268, 0x8459fc\nADRP            X20, #off_122EFE8@PAGE                                 ; +0x26c, 0x845a00\nLDR             X0, [X29,#0x90+var_20]                                 ; +0x270, 0x845a04\nLDR             X20, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0x274, 0x845a08\nSUB             X0, X0, #0x18                                          ; +0x278, 0x845a0c\nCMP             X0, X20                                                ; +0x27c, 0x845a10\nB.EQ            loc_845A20                                             ; +0x280, 0x845a14\nADD             X1, X29, #0x90+var_28                                  ; +0x284, 0x845a18\nBL              sub_844A20                                             ; +0x288, 0x845a1c\nMOV             X0, X19                                                ; +0x28c, 0x845a20\nBL              _Unwind_Resume                                         ; +0x290, 0x845a24\nMOV             X19, X0                                                ; +0x294, 0x845a28\nADRP            X20, #off_122EFE8@PAGE                                 ; +0x298, 0x845a2c\nLDR             X0, [X29,#0x90+var_18]                                 ; +0x29c, 0x845a30\nLDR             X1, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x2a0, 0x845a34\nSUB             X0, X0, #0x18                                          ; +0x2a4, 0x845a38\nCMP             X0, X1                                                 ; +0x2a8, 0x845a3c\nB.EQ            loc_845A04                                             ; +0x2ac, 0x845a40\nADD             X1, X29, #0x90+var_28                                  ; +0x2b0, 0x845a44\nBL              sub_844A20                                             ; +0x2b4, 0x845a48\nB               loc_845A04                                             ; +0x2b8, 0x845a4c\nADRP            X20, #off_122EFE8@PAGE                                 ; +0x2bc, 0x845a50\nMOV             X19, X0                                                ; +0x2c0, 0x845a54\nLDR             X0, [X29,#0x90+var_10]                                 ; +0x2c4, 0x845a58\nLDR             X1, [X20,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x2c8, 0x845a5c\nSUB             X0, X0, #0x18                                          ; +0x2cc, 0x845a60\nCMP             X0, X1                                                 ; +0x2d0, 0x845a64\nB.EQ            loc_845A30                                             ; +0x2d4, 0x845a68\nADD             X1, X29, #0x90+var_28                                  ; +0x2d8, 0x845a6c\nBL              sub_844A20                                             ; +0x2dc, 0x845a70\nB               loc_845A30                                             ; +0x2e0, 0x845a74", "xrefs": ["AccountRegisterLayer::onSubmit @ 0x84fb48", "<???> @ 0x96f78"], "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"}