{"type": "func", "start": 4295926856, "end": 4295927560, "name": "EditLevelLayer::onShare", "pseudocode": "// \n// EditLevelLayer::onShare from 0x1000ea448 to 0x1000ea708 (704 bytes)\n// \n// 2 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x1000ec138\n// > EditLevelLayer::init @ 0x1000e97e4\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 EditLevelLayer::onShare(EditLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GJAccountManager *v3; // x0\n  GJGameLevel *m_level; // x8\n  std::string *p_m_levelString; // x8\n  ShareLevelLayer *v6; // x19\n  void *v7; // x0\n  _BOOL4 v8; // w20\n  GJGameLevel *v9; // x8\n  std::string *p_m_levelName; // x8\n  _BOOL4 v11; // w20\n  GameManager *v12; // x0\n  GameManager *v13; // x0\n  void *v14[2]; // [xsp+0h] [xbp-A0h] BYREF\n  char v15; // [xsp+17h] [xbp-89h]\n  void *v16[2]; // [xsp+18h] [xbp-88h] BYREF\n  char v17; // [xsp+2Fh] [xbp-71h]\n  _QWORD v18[2]; // [xsp+30h] [xbp-70h] BYREF\n  char v19; // [xsp+47h] [xbp-59h]\n  void *__p[2]; // [xsp+48h] [xbp-58h] BYREF\n  char v21; // [xsp+5Fh] [xbp-41h]\n  __int128 __dst; // [xsp+60h] [xbp-40h] BYREF\n  char *longStorage; // [xsp+70h] [xbp-30h]\n  _QWORD v24[2]; // [xsp+78h] [xbp-28h] BYREF\n  char v25; // [xsp+8Fh] [xbp-11h]\n\n  v3 = GJAccountManager::sharedState();\n  if ( v3->m_accountID > v3->m_unkInt1 )\n  {\n    m_level = a1->m_level;\n    if ( m_level->m_levelString.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    {\n      sub_1000097D0(\n        &__dst,\n        (void *)m_level->m_levelString.m_data.m_long.capacitym1,\n        m_level->m_levelString.m_data.m_long.size);\n    }\n    else\n    {\n      p_m_levelString = &m_level->m_levelString;\n      __dst = *(_OWORD *)&p_m_levelString->m_data.m_short.sizex2;\n      longStorage = p_m_levelString->m_data.m_long.longStorage;\n    }\n    sub_100009900(__p, \"\");\n    v8 = sub_1000045BC(&__dst, __p);\n    if ( v21 < 0 )\n      operator delete(__p[0]);\n    if ( SHIBYTE(longStorage) < 0 )\n    {\n      operator delete((void *)__dst);\n      if ( v8 )\n      {\nLABEL_11:\n        sub_100009900(v18, \"You cannot share an empty level.\");\n        v6 = (ShareLevelLayer *)FLAlertLayer::create_1(0, \"Empty\", v18, \"OK\", 0, 380.0);\n        if ( v19 < 0 )\n        {\n          v7 = (void *)v18[0];\n          goto LABEL_23;\n        }\n        goto LABEL_24;\n      }\n    }\n    else if ( v8 )\n    {\n      goto LABEL_11;\n    }\n    v9 = a1->m_level;\n    if ( v9->m_levelName.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    {\n      sub_1000097D0(&__dst, (void *)v9->m_levelName.m_data.m_long.capacitym1, v9->m_levelName.m_data.m_long.size);\n    }\n    else\n    {\n      p_m_levelName = &v9->m_levelName;\n      __dst = *(_OWORD *)&p_m_levelName->m_data.m_short.sizex2;\n      longStorage = p_m_levelName->m_data.m_long.longStorage;\n    }\n    sub_100009900(__p, \"\");\n    v11 = sub_1000045BC(&__dst, __p);\n    if ( v21 < 0 )\n      operator delete(__p[0]);\n    if ( SHIBYTE(longStorage) < 0 )\n    {\n      operator delete((void *)__dst);\n      if ( v11 )\n      {\nLABEL_21:\n        sub_100009900(v16, \"You must name your level before sharing it.\");\n        v6 = (ShareLevelLayer *)FLAlertLayer::create_1(0, \"No Name\", v16, \"OK\", 0, 380.0);\n        if ( v17 < 0 )\n        {\n          v7 = v16[0];\n          goto LABEL_23;\n        }\n        goto LABEL_24;\n      }\n    }\n    else if ( v11 )\n    {\n      goto LABEL_21;\n    }\n    v12 = GameManager::sharedState();\n    if ( GameManager::getGameVariable(v12, \"0157\") )\n    {\n      EditLevelLayer::closeTextInputs(a1);\n      v6 = ShareLevelLayer::create(a1->m_level);\n    }\n    else\n    {\n      v13 = GameManager::sharedState();\n      GameManager::setGameVariable(v13, \"0157\", 1);\n      sub_100009900(\n        v14,\n        \"Hateful, abusive, or otherwise inappropriate content, whether it is in the level, name, or description may lead \"\n        \"to <cr>deletion</c>. The same applies to levels abusing cheats or exploits. Stealing assets from other levels is\"\n        \" <co>discouraged</c> and may stop a level from being rated depending on the context, severity, credit, and more.\"\n        \" Levels verified with hacks cannot be rated.\\n\"\n        \"<cy>These guidelines and their enforcement are entirely at RobTop's discretion.</c>\");\n      v6 = (ShareLevelLayer *)FLAlertLayer::create_1(\n                                &a1->FLAlertLayerProtocol,\n                                \"Upload Guidelines\",\n                                v14,\n                                \"OK\",\n                                0,\n                                380.0);\n      if ( v15 < 0 )\n        operator delete(v14[0]);\n      ((void (__fastcall *)(ShareLevelLayer *, __int64))v6->setTag)(v6, 10);\n    }\n    goto LABEL_24;\n  }\n  sub_100009900(\n    v24,\n    \"You need an <cl>account</c> to share <cg>levels</c>. You can create one for free from settings in the main menu.\");\n  v6 = (ShareLevelLayer *)FLAlertLayer::create_1(0, \"Account Needed\", v24, \"Close\", 0, 300.0);\n  if ( v25 < 0 )\n  {\n    v7 = (void *)v24[0];\nLABEL_23:\n    operator delete(v7);\n  }\nLABEL_24:\n  ((void (__fastcall *)(ShareLevelLayer *))v6->show)(v6);\n}", "assembly": "; \n; EditLevelLayer::onShare from 0x1000ea448 to 0x1000ea708 (704 bytes)\n; \n; 2 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x1000ec138\n; > EditLevelLayer::init @ 0x1000e97e4\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, #0xB0                                          ; +0x0, 0x1000ea448\nSTP             X20, X19, [SP,#0xA0+var_10]                            ; +0x4, 0x1000ea44c\nSTP             X29, X30, [SP,#0xA0+var_s0]                            ; +0x8, 0x1000ea450\nADD             X29, SP, #0xA0                                         ; +0xc, 0x1000ea454\nMOV             X19, X0                                                ; +0x10, 0x1000ea458\nBL              GJAccountManager__sharedState                          ; +0x14, 0x1000ea45c\nLDR             W8, [X0,#0x160]                                        ; +0x18, 0x1000ea460\nLDR             W9, [X0,#0x164]                                        ; +0x1c, 0x1000ea464\nCMP             W8, W9                                                 ; +0x20, 0x1000ea468\nB.LE            loc_1000EA494                                          ; +0x24, 0x1000ea46c\nLDR             X8, [X19,#0x1C8]                                       ; +0x28, 0x1000ea470\nLDRSB           W9, [X8,#0x19F]                                        ; +0x2c, 0x1000ea474\nTBNZ            W9, #0x1F, loc_1000EA4E0                               ; +0x30, 0x1000ea478\nADD             X8, X8, #0x188                                         ; +0x34, 0x1000ea47c\nLDR             Q0, [X8]                                               ; +0x38, 0x1000ea480\nSTUR            Q0, [X29,#__dst]                                       ; +0x3c, 0x1000ea484\nLDR             X8, [X8,#0x10]                                         ; +0x40, 0x1000ea488\nSTUR            X8, [X29,#var_30]                                      ; +0x44, 0x1000ea48c\nB               loc_1000EA4EC                                          ; +0x48, 0x1000ea490\nADRL            X1, aYouNeedAnClAcc; \"You need an <cl>account</c> to share <c\"... ; +0x4c, 0x1000ea494\nSUB             X0, X29, #-var_28; int                                 ; +0x54, 0x1000ea49c\nBL              sub_100009900                                          ; +0x58, 0x1000ea4a0\nADRL            X1, aAccountNeeded; \"Account Needed\"                   ; +0x5c, 0x1000ea4a4\nADRL            X3, aClose; \"Close\"                                    ; +0x64, 0x1000ea4ac\nMOV             W8, #0x43960000                                        ; +0x6c, 0x1000ea4b4\nFMOV            S0, W8                                                 ; +0x70, 0x1000ea4b8\nSUB             X2, X29, #-var_28                                      ; +0x74, 0x1000ea4bc\nMOV             X0, #0                                                 ; +0x78, 0x1000ea4c0\nMOV             X4, #0                                                 ; +0x7c, 0x1000ea4c4\nBL              FLAlertLayer__create_1                                 ; +0x80, 0x1000ea4c8\nMOV             X19, X0                                                ; +0x84, 0x1000ea4cc\nLDURSB          W8, [X29,#var_11]                                      ; +0x88, 0x1000ea4d0\nTBZ             W8, #0x1F, loc_1000EA638                               ; +0x8c, 0x1000ea4d4\nLDUR            X0, [X29,#var_28]                                      ; +0x90, 0x1000ea4d8\nB               loc_1000EA634                                          ; +0x94, 0x1000ea4dc\nLDP             X1, X2, [X8,#0x188]; __src                             ; +0x98, 0x1000ea4e0\nSUB             X0, X29, #-__dst; __dst                                ; +0x9c, 0x1000ea4e4\nBL              sub_1000097D0                                          ; +0xa0, 0x1000ea4e8\nADRL            X1, asc_100746688; \"\"                                  ; +0xa4, 0x1000ea4ec\nADD             X0, SP, #0xA0+__p; int                                 ; +0xac, 0x1000ea4f4\nBL              sub_100009900                                          ; +0xb0, 0x1000ea4f8\nSUB             X0, X29, #-__dst                                       ; +0xb4, 0x1000ea4fc\nADD             X1, SP, #0xA0+__p                                      ; +0xb8, 0x1000ea500\nBL              sub_1000045BC                                          ; +0xbc, 0x1000ea504\nMOV             X20, X0                                                ; +0xc0, 0x1000ea508\nLDRSB           W8, [SP,#0xA0+var_41]                                  ; +0xc4, 0x1000ea50c\nTBZ             W8, #0x1F, loc_1000EA51C                               ; +0xc8, 0x1000ea510\nLDR             X0, [SP,#0xA0+__p]; __p                                ; +0xcc, 0x1000ea514\nBL              __ZdlPv; operator delete(void *)                       ; +0xd0, 0x1000ea518\nLDURSB          W8, [X29,#var_30+7]                                    ; +0xd4, 0x1000ea51c\nTBNZ            W8, #0x1F, loc_1000EA574                               ; +0xd8, 0x1000ea520\nCBZ             W20, loc_1000EA580                                     ; +0xdc, 0x1000ea524\nADRL            X1, aYouCannotShare; \"You cannot share an empty level.\" ; +0xe0, 0x1000ea528\nADD             X0, SP, #0xA0+var_70; int                              ; +0xe8, 0x1000ea530\nBL              sub_100009900                                          ; +0xec, 0x1000ea534\nADRL            X1, aEmpty; \"Empty\"                                    ; +0xf0, 0x1000ea538\nADRL            X3, aOk; \"OK\"                                          ; +0xf8, 0x1000ea540\nMOV             W8, #0x43BE0000                                        ; +0x100, 0x1000ea548\nFMOV            S0, W8                                                 ; +0x104, 0x1000ea54c\nADD             X2, SP, #0xA0+var_70                                   ; +0x108, 0x1000ea550\nMOV             X0, #0                                                 ; +0x10c, 0x1000ea554\nMOV             X4, #0                                                 ; +0x110, 0x1000ea558\nBL              FLAlertLayer__create_1                                 ; +0x114, 0x1000ea55c\nMOV             X19, X0                                                ; +0x118, 0x1000ea560\nLDRSB           W8, [SP,#0xA0+var_59]                                  ; +0x11c, 0x1000ea564\nTBZ             W8, #0x1F, loc_1000EA638                               ; +0x120, 0x1000ea568\nLDR             X0, [SP,#0xA0+var_70]                                  ; +0x124, 0x1000ea56c\nB               loc_1000EA634                                          ; +0x128, 0x1000ea570\nLDUR            X0, [X29,#__dst]; __p                                  ; +0x12c, 0x1000ea574\nBL              __ZdlPv; operator delete(void *)                       ; +0x130, 0x1000ea578\nCBNZ            W20, loc_1000EA528                                     ; +0x134, 0x1000ea57c\nLDR             X8, [X19,#0x1C8]                                       ; +0x138, 0x1000ea580\nLDRSB           W9, [X8,#0x16F]                                        ; +0x13c, 0x1000ea584\nTBNZ            W9, #0x1F, loc_1000EA5A4                               ; +0x140, 0x1000ea588\nADD             X8, X8, #0x158                                         ; +0x144, 0x1000ea58c\nLDR             Q0, [X8]                                               ; +0x148, 0x1000ea590\nSTUR            Q0, [X29,#__dst]                                       ; +0x14c, 0x1000ea594\nLDR             X8, [X8,#0x10]                                         ; +0x150, 0x1000ea598\nSTUR            X8, [X29,#var_30]                                      ; +0x154, 0x1000ea59c\nB               loc_1000EA5B0                                          ; +0x158, 0x1000ea5a0\nLDP             X1, X2, [X8,#0x158]; __src                             ; +0x15c, 0x1000ea5a4\nSUB             X0, X29, #-__dst; __dst                                ; +0x160, 0x1000ea5a8\nBL              sub_1000097D0                                          ; +0x164, 0x1000ea5ac\nADRL            X1, asc_100746688; \"\"                                  ; +0x168, 0x1000ea5b0\nADD             X0, SP, #0xA0+__p; int                                 ; +0x170, 0x1000ea5b8\nBL              sub_100009900                                          ; +0x174, 0x1000ea5bc\nSUB             X0, X29, #-__dst                                       ; +0x178, 0x1000ea5c0\nADD             X1, SP, #0xA0+__p                                      ; +0x17c, 0x1000ea5c4\nBL              sub_1000045BC                                          ; +0x180, 0x1000ea5c8\nMOV             X20, X0                                                ; +0x184, 0x1000ea5cc\nLDRSB           W8, [SP,#0xA0+var_41]                                  ; +0x188, 0x1000ea5d0\nTBZ             W8, #0x1F, loc_1000EA5E0                               ; +0x18c, 0x1000ea5d4\nLDR             X0, [SP,#0xA0+__p]; __p                                ; +0x190, 0x1000ea5d8\nBL              __ZdlPv; operator delete(void *)                       ; +0x194, 0x1000ea5dc\nLDURSB          W8, [X29,#var_30+7]                                    ; +0x198, 0x1000ea5e0\nTBNZ            W8, #0x1F, loc_1000EA658                               ; +0x19c, 0x1000ea5e4\nCBZ             W20, loc_1000EA664                                     ; +0x1a0, 0x1000ea5e8\nADRL            X1, aYouMustNameYou; \"You must name your level before sharing\"... ; +0x1a4, 0x1000ea5ec\nADD             X0, SP, #0xA0+var_88; int                              ; +0x1ac, 0x1000ea5f4\nBL              sub_100009900                                          ; +0x1b0, 0x1000ea5f8\nADRL            X1, aNoName; \"No Name\"                                 ; +0x1b4, 0x1000ea5fc\nADRL            X3, aOk; \"OK\"                                          ; +0x1bc, 0x1000ea604\nMOV             W8, #0x43BE0000                                        ; +0x1c4, 0x1000ea60c\nFMOV            S0, W8                                                 ; +0x1c8, 0x1000ea610\nADD             X2, SP, #0xA0+var_88                                   ; +0x1cc, 0x1000ea614\nMOV             X0, #0                                                 ; +0x1d0, 0x1000ea618\nMOV             X4, #0                                                 ; +0x1d4, 0x1000ea61c\nBL              FLAlertLayer__create_1                                 ; +0x1d8, 0x1000ea620\nMOV             X19, X0                                                ; +0x1dc, 0x1000ea624\nLDRSB           W8, [SP,#0xA0+var_71]                                  ; +0x1e0, 0x1000ea628\nTBZ             W8, #0x1F, loc_1000EA638                               ; +0x1e4, 0x1000ea62c\nLDR             X0, [SP,#0xA0+var_88]; __p                             ; +0x1e8, 0x1000ea630\nBL              __ZdlPv; operator delete(void *)                       ; +0x1ec, 0x1000ea634\nLDR             X8, [X19]                                              ; +0x1f0, 0x1000ea638\nLDR             X8, [X8,#0x508]                                        ; +0x1f4, 0x1000ea63c\nMOV             X0, X19                                                ; +0x1f8, 0x1000ea640\nBLR             X8                                                     ; +0x1fc, 0x1000ea644\nLDP             X29, X30, [SP,#0xA0+var_s0]                            ; +0x200, 0x1000ea648\nLDP             X20, X19, [SP,#0xA0+var_10]                            ; +0x204, 0x1000ea64c\nADD             SP, SP, #0xB0                                          ; +0x208, 0x1000ea650\nRET                                                                    ; +0x20c, 0x1000ea654\nLDUR            X0, [X29,#__dst]; __p                                  ; +0x210, 0x1000ea658\nBL              __ZdlPv; operator delete(void *)                       ; +0x214, 0x1000ea65c\nCBNZ            W20, loc_1000EA5EC                                     ; +0x218, 0x1000ea660\nBL              GameManager__sharedState                               ; +0x21c, 0x1000ea664\nADRL            X1, a0157; \"0157\"                                      ; +0x220, 0x1000ea668\nBL              GameManager__getGameVariable                           ; +0x228, 0x1000ea670\nTBZ             W0, #0, loc_1000EA690                                  ; +0x22c, 0x1000ea674\nMOV             X0, X19                                                ; +0x230, 0x1000ea678\nBL              EditLevelLayer__closeTextInputs                        ; +0x234, 0x1000ea67c\nLDR             X0, [X19,#0x1C8]                                       ; +0x238, 0x1000ea680\nBL              ShareLevelLayer__create                                ; +0x23c, 0x1000ea684\nMOV             X19, X0                                                ; +0x240, 0x1000ea688\nB               loc_1000EA638                                          ; +0x244, 0x1000ea68c\nBL              GameManager__sharedState                               ; +0x248, 0x1000ea690\nADRL            X1, a0157; \"0157\"                                      ; +0x24c, 0x1000ea694\nMOV             W2, #1                                                 ; +0x254, 0x1000ea69c\nBL              GameManager__setGameVariable                           ; +0x258, 0x1000ea6a0\nADRL            X1, aHatefulAbusive; \"Hateful, abusive, or otherwise inapprop\"... ; +0x25c, 0x1000ea6a4\nMOV             X0, SP; int                                            ; +0x264, 0x1000ea6ac\nBL              sub_100009900                                          ; +0x268, 0x1000ea6b0\nADRL            X1, aUploadGuidelin; \"Upload Guidelines\"               ; +0x26c, 0x1000ea6b4\nADRL            X3, aOk; \"OK\"                                          ; +0x274, 0x1000ea6bc\nMOV             W8, #0x43BE0000                                        ; +0x27c, 0x1000ea6c4\nFMOV            S0, W8                                                 ; +0x280, 0x1000ea6c8\nADD             X0, X19, #0x1A0                                        ; +0x284, 0x1000ea6cc\nMOV             X2, SP                                                 ; +0x288, 0x1000ea6d0\nMOV             X4, #0                                                 ; +0x28c, 0x1000ea6d4\nBL              FLAlertLayer__create_1                                 ; +0x290, 0x1000ea6d8\nMOV             X19, X0                                                ; +0x294, 0x1000ea6dc\nLDRSB           W8, [SP,#0xA0+var_89]                                  ; +0x298, 0x1000ea6e0\nTBZ             W8, #0x1F, loc_1000EA6F0                               ; +0x29c, 0x1000ea6e4\nLDR             X0, [SP,#0xA0+var_A0]; __p                             ; +0x2a0, 0x1000ea6e8\nBL              __ZdlPv; operator delete(void *)                       ; +0x2a4, 0x1000ea6ec\nLDR             X8, [X19]                                              ; +0x2a8, 0x1000ea6f0\nLDR             X8, [X8,#0x48]                                         ; +0x2ac, 0x1000ea6f4\nMOV             X0, X19                                                ; +0x2b0, 0x1000ea6f8\nMOV             W1, #0xA                                               ; +0x2b4, 0x1000ea6fc\nBLR             X8                                                     ; +0x2b8, 0x1000ea700\nB               loc_1000EA638                                          ; +0x2bc, 0x1000ea704", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x1000ec138", "EditLevelLayer::init @ 0x1000e97e4"], "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"}