{"type": "func", "start": 7388840, "end": 7389120, "name": "GJGameLevel::getUnpackedLevelDescription", "pseudocode": "// \n// GJGameLevel::getUnpackedLevelDescription from 0x70bea8 to 0x70bfc0 (280 bytes)\n// \n// 5 xrefs:\n// > EditLevelLayer::init @ 0x6e0a60\n// > ShareLevelLayer::init @ 0x6e45d8\n// > InfoLayer::onLevelInfo @ 0x7e177c\n// > InfoLayer::init @ 0x7e55e0\n// > <???> @ 0x8c250\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 *__usercall GJGameLevel::getUnpackedLevelDescription@<X0>(\n        __int64 *__return_ptr a1@<X8>,\n        GJGameLevel *this@<X0>)\n{\n  void *v3; // x0\n  unsigned int *v5; // x2\n  int v6; // w1\n  __int64 v7; // [xsp+40h] [xbp+40h] BYREF\n\n  if ( *((_QWORD *)this->m_levelDesc.m_data.m_data - 3) )\n  {\n    sub_D18D28(&v7, &this->m_levelDesc);\n    LevelTools::base64DecodeString((cocos2d::ZipUtils *)&v7, a1);\n    v3 = (void *)(v7 - 24);\n    if ( (__int64 *)(v7 - 24) != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v5 = (unsigned int *)(v7 - 8);\n        do\n          v6 = __ldaxr(v5);\n        while ( __stlxr(v6 - 1, v5) );\n      }\n      else\n      {\n        v6 = *(_DWORD *)(v7 - 8);\n        *(_DWORD *)(v7 - 8) = v6 - 1;\n      }\n      if ( v6 <= 0 )\n        operator delete(v3);\n    }\n  }\n  else\n  {\n    sub_D153B8((int)a1, &byte_F288A0);\n  }\n  return a1;\n}", "assembly": "; \n; GJGameLevel::getUnpackedLevelDescription from 0x70bea8 to 0x70bfc0 (280 bytes)\n; \n; 5 xrefs:\n; > EditLevelLayer::init @ 0x6e0a60\n; > ShareLevelLayer::init @ 0x6e45d8\n; > InfoLayer::onLevelInfo @ 0x7e177c\n; > InfoLayer::init @ 0x7e55e0\n; > <???> @ 0x8c250\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_50]!                                ; +0x0, 0x70bea8\nADD             X1, X0, #0x160                                         ; +0x4, 0x70beac\nMOV             X29, SP                                                ; +0x8, 0x70beb0\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x70beb4\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x70beb8\nLDR             X0, [X0,#0x160]                                        ; +0x14, 0x70bebc\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0x70bec0\nMOV             X21, X8                                                ; +0x1c, 0x70bec4\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x70bec8\nLDUR            X0, [X0,#-0x18]                                        ; +0x24, 0x70becc\nLDR             X2, [X2]                                               ; +0x28, 0x70bed0\nSTR             X2, [X29,#0x50+var_8]                                  ; +0x2c, 0x70bed4\nCBZ             X0, loc_70BF34                                         ; +0x30, 0x70bed8\nADD             X20, X29, #0x50+var_10                                 ; +0x34, 0x70bedc\nMOV             X0, X20                                                ; +0x38, 0x70bee0\nBL              sub_D18D28                                             ; +0x3c, 0x70bee4\nMOV             X8, X21                                                ; +0x40, 0x70bee8\nMOV             X0, X20                                                ; +0x44, 0x70beec\nBL              _ZN10LevelTools18base64DecodeStringESs; LevelTools::base64DecodeString(std::string) ; +0x48, 0x70bef0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x4c, 0x70bef4\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x50, 0x70bef8\nSUB             X0, X2, #0x18; p                                       ; +0x54, 0x70befc\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x58, 0x70bf00\nCMP             X0, X1                                                 ; +0x5c, 0x70bf04\nB.NE            loc_70BF4C                                             ; +0x60, 0x70bf08\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x64, 0x70bf0c\nMOV             X0, X21                                                ; +0x68, 0x70bf10\nLDR             X2, [X29,#0x50+var_8]                                  ; +0x6c, 0x70bf14\nLDR             X1, [X19]                                              ; +0x70, 0x70bf18\nCMP             X2, X1                                                 ; +0x74, 0x70bf1c\nB.NE            loc_70BF90                                             ; +0x78, 0x70bf20\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x7c, 0x70bf24\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x80, 0x70bf28\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x84, 0x70bf2c\nRET                                                                    ; +0x88, 0x70bf30\nADRP            X1, #byte_F288A0@PAGE                                  ; +0x8c, 0x70bf34\nMOV             X0, X8; int                                            ; +0x90, 0x70bf38\nADD             X1, X1, #byte_F288A0@PAGEOFF; char *                   ; +0x94, 0x70bf3c\nADD             X2, X29, #0x50+var_10                                  ; +0x98, 0x70bf40\nBL              sub_D153B8                                             ; +0x9c, 0x70bf44\nB               loc_70BF0C                                             ; +0xa0, 0x70bf48\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xa4, 0x70bf4c\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xa8, 0x70bf50\nCBZ             X1, loc_70BF80                                         ; +0xac, 0x70bf54\nSUB             X2, X2, #8                                             ; +0xb0, 0x70bf58\nLDAXR           W1, [X2]                                               ; +0xb4, 0x70bf5c\nSUB             W3, W1, #1                                             ; +0xb8, 0x70bf60\nSTLXR           W4, W3, [X2]                                           ; +0xbc, 0x70bf64\nCBNZ            W4, loc_70BF5C                                         ; +0xc0, 0x70bf68\nCMP             W1, WZR                                                ; +0xc4, 0x70bf6c\nB.GT            loc_70BF0C                                             ; +0xc8, 0x70bf70\nADD             X1, X29, #0x50+var_18                                  ; +0xcc, 0x70bf74\nBL              j__ZdlPv; operator delete(void *)                      ; +0xd0, 0x70bf78\nB               loc_70BF0C                                             ; +0xd4, 0x70bf7c\nLDUR            W1, [X2,#-8]                                           ; +0xd8, 0x70bf80\nSUB             W3, W1, #1                                             ; +0xdc, 0x70bf84\nSTUR            W3, [X2,#-8]                                           ; +0xe0, 0x70bf88\nB               loc_70BF6C                                             ; +0xe4, 0x70bf8c\nBL              .__stack_chk_fail                                      ; +0xe8, 0x70bf90\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xec, 0x70bf94\nMOV             X19, X0                                                ; +0xf0, 0x70bf98\nLDR             X0, [X29,#0x50+var_10]                                 ; +0xf4, 0x70bf9c\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xf8, 0x70bfa0\nSUB             X0, X0, #0x18                                          ; +0xfc, 0x70bfa4\nCMP             X0, X1                                                 ; +0x100, 0x70bfa8\nB.EQ            loc_70BFB8                                             ; +0x104, 0x70bfac\nADD             X1, X29, #0x50+var_18                                  ; +0x108, 0x70bfb0\nBL              sub_6EE220                                             ; +0x10c, 0x70bfb4\nMOV             X0, X19                                                ; +0x110, 0x70bfb8\nBL              _Unwind_Resume                                         ; +0x114, 0x70bfbc", "xrefs": ["EditLevelLayer::init @ 0x6e0a60", "ShareLevelLayer::init @ 0x6e45d8", "InfoLayer::onLevelInfo @ 0x7e177c", "InfoLayer::init @ 0x7e55e0", "<???> @ 0x8c250"], "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"}