{"type": "func", "start": 3893412, "end": 3893844, "name": "EditLevelLayer::onShare", "pseudocode": "// \n// EditLevelLayer::onShare from 0x3b68a4 to 0x3b6a54 (432 bytes)\n// \n// 1 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x3b8116\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 EditLevelLayer::onShare(EditLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GJAccountManager *v3; // r0\n  FLAlertLayer *v4; // r0\n  int v5; // r8\n  int v6; // r8\n  FLAlertLayer *v7; // r5\n  GameManager *v8; // r0\n  GameManager *v9; // r0\n  ShareLevelLayer *v10; // r0\n  _BYTE v11[4]; // [sp+Ch] [bp-10h] BYREF\n  _BYTE v12[4]; // [sp+10h] [bp-Ch] BYREF\n\n  v3 = GJAccountManager::sharedState();\n  if ( v3->m_accountID - v3->m_unkInt1 <= 0 )\n  {\n    sub_776584(\n      (int)v12,\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    v4 = FLAlertLayer::create(0, (int)\"Account Needed\", (int)v12, (int)\"Close\", 0, 300.0);\nLABEL_7:\n    v7 = v4;\n    sub_774008(v12);\nLABEL_10:\n    v7->show(v7);\n    return;\n  }\n  sub_775C20(v11, &a1->m_level->m_levelString);\n  sub_776584((int)v12, (char *)&unk_939830);\n  v5 = sub_774DBC(v11, v12);\n  sub_774008(v12);\n  sub_774008(v11);\n  if ( !v5 )\n  {\n    sub_776584((int)v12, \"You cannot share an empty level.\");\n    v4 = FLAlertLayer::create(0, (int)\"Empty\", (int)v12, (int)\"OK\", 0, 380.0);\n    goto LABEL_7;\n  }\n  sub_775C20(v11, &a1->m_level->m_levelName);\n  sub_776584((int)v12, (char *)&unk_939830);\n  v6 = sub_774DBC(v11, v12);\n  sub_774008(v12);\n  sub_774008(v11);\n  if ( !v6 )\n  {\n    sub_776584((int)v12, \"You must name your level before sharing it.\");\n    v4 = FLAlertLayer::create(0, (int)\"No Name\", (int)v12, (int)\"OK\", 0, 380.0);\n    goto LABEL_7;\n  }\n  v8 = GameManager::sharedState();\n  if ( !GameManager::getGameVariable(v8, \"0157\") )\n  {\n    v9 = GameManager::sharedState();\n    GameManager::setGameVariable(v9, \"0157\", 1);\n    sub_776584(\n      (int)v12,\n      \"Hateful, abusive, or otherwise inappropriate content, whether it is in the level, name, or description may lead to\"\n      \" <cr>deletion</c>. The same applies to levels abusing cheats or exploits. Stealing assets from other levels is <co\"\n      \">discouraged</c> and may stop a level from being rated depending on the context, severity, credit, and more. Level\"\n      \"s verified with hacks cannot be rated.\\n\"\n      \"<cy>These guidelines and their enforcement are entirely at RobTop's discretion.</c>\");\n    v7 = FLAlertLayer::create((int)&a1->FLAlertLayerProtocol, (int)\"Upload Guidelines\", (int)v12, (int)\"OK\", 0, 380.0);\n    sub_774008(v12);\n    v7->setTag(v7, 10);\n    goto LABEL_10;\n  }\n  EditLevelLayer::closeTextInputs(a1);\n  v10 = ShareLevelLayer::create(a1->m_level);\n  v10->show(v10);\n}", "assembly": "; \n; EditLevelLayer::onShare from 0x3b68a4 to 0x3b6a54 (432 bytes)\n; \n; 1 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x3b8116\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\nPUSH.W          {R4-R9,LR}                                             ; +0x0, 0x3b68a4\nSUB             SP, SP, #0x1C                                          ; +0x4, 0x3b68a8\nLDR             R6, =(__stack_chk_guard_ptr - 0x3B68B6)                ; +0x6, 0x3b68aa\nMOV             R7, R0                                                 ; +0x8, 0x3b68ac\nADD             R4, SP, #0x1C+var_C                                    ; +0xa, 0x3b68ae\nADD             R5, SP, #0x1C+var_10                                   ; +0xc, 0x3b68b0\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3b68b2\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x3b68b4\nLDR             R3, [R6]                                               ; +0x12, 0x3b68b6\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x14, 0x3b68b8\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x16, 0x3b68ba\nLDR.W           R3, [R0,#0x110]                                        ; +0x1a, 0x3b68be\nLDR.W           R2, [R0,#0x114]                                        ; +0x1e, 0x3b68c2\nSUBS            R3, R3, R2                                             ; +0x22, 0x3b68c6\nCMP             R3, #0                                                 ; +0x24, 0x3b68c8\nBGT             loc_3B68F0                                             ; +0x26, 0x3b68ca\nLDR             R1, =(aYouNeedAnClAcc - 0x3B68D6); \"You need an <cl>account</c> to share <c\"... ; +0x28, 0x3b68cc\nMOV             R2, R5                                                 ; +0x2a, 0x3b68ce\nMOV             R0, R4; int                                            ; +0x2c, 0x3b68d0\nADD             R1, PC; \"You need an <cl>account</c> to share <c\"...   ; +0x2e, 0x3b68d2\nBL              sub_776584                                             ; +0x30, 0x3b68d4\nLDR             R3, flt_3B6A54                                         ; +0x34, 0x3b68d8\nLDR             R1, =(aAccountNeeded - 0x3B68E8); \"Account Needed\"     ; +0x36, 0x3b68da\nMOVS            R0, #0; int                                            ; +0x38, 0x3b68dc\nMOV             R2, R4; int                                            ; +0x3a, 0x3b68de\nSTR             R0, [SP,#0x1C+var_1C]; int                             ; +0x3c, 0x3b68e0\nSTR             R3, [SP,#0x1C+var_18]; float                           ; +0x3e, 0x3b68e2\nADD             R1, PC; \"Account Needed\"                               ; +0x40, 0x3b68e4\nLDR             R3, =(aClose_0 - 0x3B68EC); \"Close\"                    ; +0x42, 0x3b68e6\nADD             R3, PC; \"Close\"                                        ; +0x44, 0x3b68e8\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x46, 0x3b68ea\nB               loc_3B69AA                                             ; +0x4a, 0x3b68ee\nLDR.W           R1, [R7,#0x154]                                        ; +0x4c, 0x3b68f0\nMOV             R0, R5                                                 ; +0x50, 0x3b68f4\nADD.W           R9, SP, #0x1C+var_14                                   ; +0x52, 0x3b68f6\nADD.W           R1, R1, #0x120                                         ; +0x56, 0x3b68fa\nBL              sub_775C20                                             ; +0x5a, 0x3b68fe\nLDR             R1, =(unk_939830 - 0x3B690C)                           ; +0x5e, 0x3b6902\nMOV             R0, R4; int                                            ; +0x60, 0x3b6904\nMOV             R2, R9                                                 ; +0x62, 0x3b6906\nADD             R1, PC; unk_939830 ; char *                            ; +0x64, 0x3b6908\nBL              sub_776584                                             ; +0x66, 0x3b690a\nMOV             R1, R4                                                 ; +0x6a, 0x3b690e\nMOV             R0, R5                                                 ; +0x6c, 0x3b6910\nBL              sub_774DBC                                             ; +0x6e, 0x3b6912\nMOV             R8, R0                                                 ; +0x72, 0x3b6916\nMOV             R0, R4                                                 ; +0x74, 0x3b6918\nBL              sub_774008                                             ; +0x76, 0x3b691a\nMOV             R0, R5                                                 ; +0x7a, 0x3b691e\nBL              sub_774008                                             ; +0x7c, 0x3b6920\nCMP.W           R8, #0                                                 ; +0x80, 0x3b6924\nBNE             loc_3B6950                                             ; +0x84, 0x3b6928\nLDR             R1, =(aYouCannotShare - 0x3B6934); \"You cannot share an empty level.\" ; +0x86, 0x3b692a\nMOV             R2, R5                                                 ; +0x88, 0x3b692c\nMOV             R0, R4; int                                            ; +0x8a, 0x3b692e\nADD             R1, PC; \"You cannot share an empty level.\"             ; +0x8c, 0x3b6930\nBL              sub_776584                                             ; +0x8e, 0x3b6932\nLDR             R3, flt_3B6A58                                         ; +0x92, 0x3b6936\nLDR             R1, =(aEmpty - 0x3B6948); \"Empty\"                      ; +0x94, 0x3b6938\nMOV             R0, R8; int                                            ; +0x96, 0x3b693a\nSTR.W           R8, [SP,#0x1C+var_1C]; int                             ; +0x98, 0x3b693c\nMOV             R2, R4; int                                            ; +0x9c, 0x3b6940\nSTR             R3, [SP,#0x1C+var_18]; float                           ; +0x9e, 0x3b6942\nADD             R1, PC; \"Empty\"                                        ; +0xa0, 0x3b6944\nLDR             R3, =(aOk - 0x3B694C); \"OK\"                            ; +0xa2, 0x3b6946\nADD             R3, PC; \"OK\"                                           ; +0xa4, 0x3b6948\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0xa6, 0x3b694a\nB               loc_3B69AA                                             ; +0xaa, 0x3b694e\nLDR.W           R1, [R7,#0x154]                                        ; +0xac, 0x3b6950\nMOV             R0, R5                                                 ; +0xb0, 0x3b6954\nADD.W           R1, R1, #0x118                                         ; +0xb2, 0x3b6956\nBL              sub_775C20                                             ; +0xb6, 0x3b695a\nLDR             R1, =(unk_939830 - 0x3B6968)                           ; +0xba, 0x3b695e\nMOV             R0, R4; int                                            ; +0xbc, 0x3b6960\nMOV             R2, R9                                                 ; +0xbe, 0x3b6962\nADD             R1, PC; unk_939830 ; char *                            ; +0xc0, 0x3b6964\nBL              sub_776584                                             ; +0xc2, 0x3b6966\nMOV             R1, R4                                                 ; +0xc6, 0x3b696a\nMOV             R0, R5                                                 ; +0xc8, 0x3b696c\nBL              sub_774DBC                                             ; +0xca, 0x3b696e\nMOV             R8, R0                                                 ; +0xce, 0x3b6972\nMOV             R0, R4                                                 ; +0xd0, 0x3b6974\nBL              sub_774008                                             ; +0xd2, 0x3b6976\nMOV             R0, R5                                                 ; +0xd6, 0x3b697a\nBL              sub_774008                                             ; +0xd8, 0x3b697c\nCMP.W           R8, #0                                                 ; +0xdc, 0x3b6980\nBNE             loc_3B69B4                                             ; +0xe0, 0x3b6984\nLDR             R1, =(aYouMustNameYou - 0x3B6990); \"You must name your level before sharing\"... ; +0xe2, 0x3b6986\nMOV             R2, R5                                                 ; +0xe4, 0x3b6988\nMOV             R0, R4; int                                            ; +0xe6, 0x3b698a\nADD             R1, PC; \"You must name your level before sharing\"...   ; +0xe8, 0x3b698c\nBL              sub_776584                                             ; +0xea, 0x3b698e\nLDR             R3, flt_3B6A58                                         ; +0xee, 0x3b6992\nLDR             R1, =(aNoName - 0x3B69A4); \"No Name\"                   ; +0xf0, 0x3b6994\nMOV             R0, R8; int                                            ; +0xf2, 0x3b6996\nSTR.W           R8, [SP,#0x1C+var_1C]; int                             ; +0xf4, 0x3b6998\nMOV             R2, R4; int                                            ; +0xf8, 0x3b699c\nSTR             R3, [SP,#0x1C+var_18]; float                           ; +0xfa, 0x3b699e\nADD             R1, PC; \"No Name\"                                      ; +0xfc, 0x3b69a0\nLDR             R3, =(aOk - 0x3B69A8); \"OK\"                            ; +0xfe, 0x3b69a2\nADD             R3, PC; \"OK\"                                           ; +0x100, 0x3b69a4\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x102, 0x3b69a6\nMOV             R5, R0                                                 ; +0x106, 0x3b69aa\nMOV             R0, R4                                                 ; +0x108, 0x3b69ac\nBL              sub_774008                                             ; +0x10a, 0x3b69ae\nB               loc_3B6A0C                                             ; +0x10e, 0x3b69b2\nLDR.W           R9, =(a0157 - 0x3B69C0); \"0157\"                        ; +0x110, 0x3b69b4\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x114, 0x3b69b8\nADD             R9, PC; \"0157\"                                         ; +0x118, 0x3b69bc\nMOV             R1, R9; char *                                         ; +0x11a, 0x3b69be\nBL              _ZN11GameManager15getGameVariableEPKc; GameManager::getGameVariable(char const*) ; +0x11c, 0x3b69c0\nMOV             R8, R0                                                 ; +0x120, 0x3b69c4\nCBNZ            R0, loc_3B6A16                                         ; +0x122, 0x3b69c6\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x124, 0x3b69c8\nMOV             R1, R9; char *                                         ; +0x128, 0x3b69cc\nMOVS            R2, #1; bool                                           ; +0x12a, 0x3b69ce\nBL              _ZN11GameManager15setGameVariableEPKcb; GameManager::setGameVariable(char const*,bool) ; +0x12c, 0x3b69d0\nLDR             R1, =(aHatefulAbusive - 0x3B69DE); \"Hateful, abusive, or otherwise inapprop\"... ; +0x130, 0x3b69d4\nMOV             R2, R5                                                 ; +0x132, 0x3b69d6\nMOV             R0, R4; int                                            ; +0x134, 0x3b69d8\nADD             R1, PC; \"Hateful, abusive, or otherwise inapprop\"...   ; +0x136, 0x3b69da\nBL              sub_776584                                             ; +0x138, 0x3b69dc\nLDR             R3, flt_3B6A58                                         ; +0x13c, 0x3b69e0\nLDR             R1, =(aUploadGuidelin - 0x3B69F4); \"Upload Guidelines\" ; +0x13e, 0x3b69e2\nADD.W           R0, R7, #0x140; int                                    ; +0x140, 0x3b69e4\nSTR.W           R8, [SP,#0x1C+var_1C]; int                             ; +0x144, 0x3b69e8\nMOV             R2, R4; int                                            ; +0x148, 0x3b69ec\nSTR             R3, [SP,#0x1C+var_18]; float                           ; +0x14a, 0x3b69ee\nADD             R1, PC; \"Upload Guidelines\"                            ; +0x14c, 0x3b69f0\nLDR             R3, =(aOk - 0x3B69F8); \"OK\"                            ; +0x14e, 0x3b69f2\nADD             R3, PC; \"OK\"                                           ; +0x150, 0x3b69f4\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x152, 0x3b69f6\nMOV             R5, R0                                                 ; +0x156, 0x3b69fa\nMOV             R0, R4                                                 ; +0x158, 0x3b69fc\nBL              sub_774008                                             ; +0x15a, 0x3b69fe\nLDR             R3, [R5]                                               ; +0x15e, 0x3b6a02\nMOV             R0, R5                                                 ; +0x160, 0x3b6a04\nMOVS            R1, #0xA                                               ; +0x162, 0x3b6a06\nLDR             R3, [R3,#0x24]                                         ; +0x164, 0x3b6a08\nBLX             R3                                                     ; +0x166, 0x3b6a0a\nLDR             R3, [R5]                                               ; +0x168, 0x3b6a0c\nMOV             R0, R5                                                 ; +0x16a, 0x3b6a0e\nLDR.W           R3, [R3,#0x284]                                        ; +0x16c, 0x3b6a10\nB               loc_3B6A2A                                             ; +0x170, 0x3b6a14\nMOV             R0, R7; this                                           ; +0x172, 0x3b6a16\nBL              _ZN14EditLevelLayer15closeTextInputsEv; EditLevelLayer::closeTextInputs(void) ; +0x174, 0x3b6a18\nLDR.W           R0, [R7,#0x154]; this                                  ; +0x178, 0x3b6a1c\nBL              _ZN15ShareLevelLayer6createEP11GJGameLevel; ShareLevelLayer::create(GJGameLevel *) ; +0x17c, 0x3b6a20\nLDR             R3, [R0]                                               ; +0x180, 0x3b6a24\nLDR.W           R3, [R3,#0x284]                                        ; +0x182, 0x3b6a26\nBLX             R3                                                     ; +0x186, 0x3b6a2a\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x188, 0x3b6a2c\nLDR             R3, [R6]                                               ; +0x18a, 0x3b6a2e\nCMP             R2, R3                                                 ; +0x18c, 0x3b6a30\nBEQ             loc_3B6A4E                                             ; +0x18e, 0x3b6a32\nBLX             __stack_chk_fail                                       ; +0x190, 0x3b6a34\nB               loc_3B6A44                                             ; +0x194, 0x3b6a38\nMOV             R0, R5                                                 ; +0x196, 0x3b6a3a\nBL              sub_774008                                             ; +0x198, 0x3b6a3c\nBL              __cxa_end_cleanup                                      ; +0x19c, 0x3b6a40\nMOV             R0, R4                                                 ; +0x1a0, 0x3b6a44\nB               loc_3B6A3C                                             ; +0x1a2, 0x3b6a46\nB               loc_3B6A3A                                             ; +0x1a4, 0x3b6a48\nB               loc_3B6A44                                             ; +0x1a6, 0x3b6a4a\nB               loc_3B6A44                                             ; +0x1a8, 0x3b6a4c\nADD             SP, SP, #0x1C                                          ; +0x1aa, 0x3b6a4e\nPOP.W           {R4-R9,PC}                                             ; +0x1ac, 0x3b6a50", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x3b8116"], "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"}