{"type": "func", "start": 7120892, "end": 7121144, "name": "CreatorLayer::onAdventureMap", "pseudocode": "// \n// CreatorLayer::onAdventureMap from 0x6ca7fc to 0x6ca8f8 (252 bytes)\n// \n// 4 xrefs:\n// > CreatorLayer::dialogClosed @ 0x6ca934\n// > <???> @ 0x67308\n// > CreatorLayer::init @ 0x6cc488\n// > <???> @ 0x122b568\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 CreatorLayer::onAdventureMap(CreatorLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // x20\n  void *v3; // x0\n  unsigned int *v4; // x2\n  int v5; // w1\n  __int64 v6; // [xsp+30h] [xbp+30h] BYREF\n  std::string v7; // 0:x1.8\n\n  sub_D153B8((int)&v6, \"mapPromo.png\");\n  v2 = GJPromoPopup::create((GJPromoPopup *)&v6, v7);\n  v3 = (void *)(v6 - 24);\n  if ( (__int64 *)(v6 - 24) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v4 = (unsigned int *)(v6 - 8);\n      do\n        v5 = __ldaxr(v4);\n      while ( __stlxr(v5 - 1, v4) );\n    }\n    else\n    {\n      v5 = *(_DWORD *)(v6 - 8);\n      *(_DWORD *)(v6 - 8) = v5 - 1;\n    }\n    if ( v5 <= 0 )\n      operator delete(v3);\n  }\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 1288LL))(v2);\n}", "assembly": "; \n; CreatorLayer::onAdventureMap from 0x6ca7fc to 0x6ca8f8 (252 bytes)\n; \n; 4 xrefs:\n; > CreatorLayer::dialogClosed @ 0x6ca934\n; > <???> @ 0x67308\n; > CreatorLayer::init @ 0x6cc488\n; > <???> @ 0x122b568\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_40]!                                ; +0x0, 0x6ca7fc\nADRP            X1, #aMappromoPng@PAGE; \"mapPromo.png\"                 ; +0x4, 0x6ca800\nMOV             X29, SP                                                ; +0x8, 0x6ca804\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0xc, 0x6ca808\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x6ca80c\nADD             X20, X29, #0x40+var_10                                 ; +0x14, 0x6ca810\nMOV             X0, X20; int                                           ; +0x18, 0x6ca814\nADD             X1, X1, #aMappromoPng@PAGEOFF; \"mapPromo.png\"          ; +0x1c, 0x6ca818\nADD             X2, X29, #0x40+var_20                                  ; +0x20, 0x6ca81c\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x6ca820\nLDR             X3, [X3]                                               ; +0x28, 0x6ca824\nSTR             X3, [X29,#0x40+var_8]                                  ; +0x2c, 0x6ca828\nBL              sub_D153B8                                             ; +0x30, 0x6ca82c\nMOV             X0, X20                                                ; +0x34, 0x6ca830\nBL              _ZN12GJPromoPopup6createESs; GJPromoPopup::create(std::string) ; +0x38, 0x6ca834\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x3c, 0x6ca838\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x40, 0x6ca83c\nMOV             X20, X0                                                ; +0x44, 0x6ca840\nSUB             X0, X2, #0x18; p                                       ; +0x48, 0x6ca844\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x4c, 0x6ca848\nCMP             X0, X1                                                 ; +0x50, 0x6ca84c\nB.NE            loc_6CA884                                             ; +0x54, 0x6ca850\nLDR             X1, [X20]                                              ; +0x58, 0x6ca854\nMOV             X0, X20                                                ; +0x5c, 0x6ca858\nLDR             X1, [X1,#0x508]                                        ; +0x60, 0x6ca85c\nBLR             X1                                                     ; +0x64, 0x6ca860\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x68, 0x6ca864\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x6c, 0x6ca868\nLDR             X0, [X19]                                              ; +0x70, 0x6ca86c\nCMP             X1, X0                                                 ; +0x74, 0x6ca870\nB.NE            loc_6CA8C8                                             ; +0x78, 0x6ca874\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x7c, 0x6ca878\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x80, 0x6ca87c\nRET                                                                    ; +0x84, 0x6ca880\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x88, 0x6ca884\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x8c, 0x6ca888\nCBZ             X1, loc_6CA8B8                                         ; +0x90, 0x6ca88c\nSUB             X2, X2, #8                                             ; +0x94, 0x6ca890\nLDAXR           W1, [X2]                                               ; +0x98, 0x6ca894\nSUB             W3, W1, #1                                             ; +0x9c, 0x6ca898\nSTLXR           W4, W3, [X2]                                           ; +0xa0, 0x6ca89c\nCBNZ            W4, loc_6CA894                                         ; +0xa4, 0x6ca8a0\nCMP             W1, WZR                                                ; +0xa8, 0x6ca8a4\nB.GT            loc_6CA854                                             ; +0xac, 0x6ca8a8\nADD             X1, X29, #0x40+var_18                                  ; +0xb0, 0x6ca8ac\nBL              j__ZdlPv; operator delete(void *)                      ; +0xb4, 0x6ca8b0\nB               loc_6CA854                                             ; +0xb8, 0x6ca8b4\nLDUR            W1, [X2,#-8]                                           ; +0xbc, 0x6ca8b8\nSUB             W3, W1, #1                                             ; +0xc0, 0x6ca8bc\nSTUR            W3, [X2,#-8]                                           ; +0xc4, 0x6ca8c0\nB               loc_6CA8A4                                             ; +0xc8, 0x6ca8c4\nBL              .__stack_chk_fail                                      ; +0xcc, 0x6ca8c8\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xd0, 0x6ca8cc\nMOV             X19, X0                                                ; +0xd4, 0x6ca8d0\nLDR             X0, [X29,#0x40+var_10]                                 ; +0xd8, 0x6ca8d4\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xdc, 0x6ca8d8\nSUB             X0, X0, #0x18                                          ; +0xe0, 0x6ca8dc\nCMP             X0, X1                                                 ; +0xe4, 0x6ca8e0\nB.EQ            loc_6CA8F0                                             ; +0xe8, 0x6ca8e4\nADD             X1, X29, #0x40+var_18                                  ; +0xec, 0x6ca8e8\nBL              sub_6CA74C                                             ; +0xf0, 0x6ca8ec\nMOV             X0, X19                                                ; +0xf4, 0x6ca8f0\nBL              _Unwind_Resume                                         ; +0xf8, 0x6ca8f4", "xrefs": ["CreatorLayer::dialogClosed @ 0x6ca934", "<???> @ 0x67308", "CreatorLayer::init @ 0x6cc488", "<???> @ 0x122b568"], "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"}