{"type": "func", "start": 9195192, "end": 9195532, "name": "GJMessagePopup::onRemove", "pseudocode": "// \n// GJMessagePopup::onRemove from 0x8c4eb8 to 0x8c500c (340 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0xc4698\n// > GJMessagePopup::loadFromGJMessage @ 0x8ce140\n// > <???> @ 0x122ed20\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 GJMessagePopup::onRemove(GJMessagePopup *a1, cocos2d::CCObject *a2)\n{\n  int v2; // w21\n  FLAlertLayer *v3; // x19\n  void *v4; // x0\n  unsigned int *v5; // x2\n  int v6; // w1\n  __int64 v7; // [xsp+40h] [xbp+40h] BYREF\n\n  v2 = (int)a1;\n  sub_D153B8((int)&v7, \"Are you sure you want to <cr>delete</c> this message?\");\n  v3 = FLAlertLayer::create(v2 + 648, (__int64)\"Delete\", (__int64)&v7);\n  v4 = (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(v4);\n  }\n  ButtonSprite::updateBGImage(v3->m_button2, \"GJ_button_06.png\");\n  v3->setTag(v3, 2);\n  v3->show(v3);\n}", "assembly": "; \n; GJMessagePopup::onRemove from 0x8c4eb8 to 0x8c500c (340 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0xc4698\n; > GJMessagePopup::loadFromGJMessage @ 0x8ce140\n; > <???> @ 0x122ed20\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, 0x8c4eb8\nADRP            X1, #aAreYouSureYouW_1@PAGE; \"Are you sure you want to <cr>delete</c>\"... ; +0x4, 0x8c4ebc\nMOV             X29, SP                                                ; +0x8, 0x8c4ec0\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x8c4ec4\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x8c4ec8\nADD             X19, X29, #0x50+var_10                                 ; +0x14, 0x8c4ecc\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0x8c4ed0\nADD             X1, X1, #aAreYouSureYouW_1@PAGEOFF; \"Are you sure you want to <cr>delete</c>\"... ; +0x1c, 0x8c4ed4\nMOV             X21, X0                                                ; +0x20, 0x8c4ed8\nADD             X2, X29, #0x50+var_20                                  ; +0x24, 0x8c4edc\nLDR             X3, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x28, 0x8c4ee0\nMOV             X0, X19; int                                           ; +0x2c, 0x8c4ee4\nLDR             X3, [X3]                                               ; +0x30, 0x8c4ee8\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x34, 0x8c4eec\nBL              sub_D153B8                                             ; +0x38, 0x8c4ef0\nADRP            X1, #aDelete@PAGE; \"Delete\"                            ; +0x3c, 0x8c4ef4\nADRP            X3, #aBack@PAGE; \"Back\"                                ; +0x40, 0x8c4ef8\nLDR             S0, =0x43BE0000                                        ; +0x44, 0x8c4efc\nADD             X1, X1, #aDelete@PAGEOFF; \"Delete\"                     ; +0x48, 0x8c4f00\nFMOV            S1, WZR                                                ; +0x4c, 0x8c4f04\nADD             X0, X21, #0x288                                        ; +0x50, 0x8c4f08\nMOV             X2, X19                                                ; +0x54, 0x8c4f0c\nADD             X3, X3, #aBack@PAGEOFF; \"Back\"                         ; +0x58, 0x8c4f10\nMOV             X4, X1                                                 ; +0x5c, 0x8c4f14\nMOV             W5, #0                                                 ; +0x60, 0x8c4f18\nFMOV            S2, #1.0                                               ; +0x64, 0x8c4f1c\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_fbff; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float,bool,float,float) ; +0x68, 0x8c4f20\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x6c, 0x8c4f24\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x70, 0x8c4f28\nMOV             X19, X0                                                ; +0x74, 0x8c4f2c\nSUB             X0, X2, #0x18; p                                       ; +0x78, 0x8c4f30\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x7c, 0x8c4f34\nCMP             X0, X1                                                 ; +0x80, 0x8c4f38\nB.NE            loc_8C4F98                                             ; +0x84, 0x8c4f3c\nLDR             X0, [X19,#0x258]; this                                 ; +0x88, 0x8c4f40\nADRL            X1, aGjButton06Png; \"GJ_button_06.png\"                 ; +0x8c, 0x8c4f44\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x94, 0x8c4f4c\nLDR             X2, [X19]                                              ; +0x98, 0x8c4f50\nMOV             X0, X19                                                ; +0x9c, 0x8c4f54\nMOV             W1, #2                                                 ; +0xa0, 0x8c4f58\nLDR             X2, [X2,#0x48]                                         ; +0xa4, 0x8c4f5c\nBLR             X2                                                     ; +0xa8, 0x8c4f60\nLDR             X1, [X19]                                              ; +0xac, 0x8c4f64\nMOV             X0, X19                                                ; +0xb0, 0x8c4f68\nLDR             X1, [X1,#0x508]                                        ; +0xb4, 0x8c4f6c\nBLR             X1                                                     ; +0xb8, 0x8c4f70\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xbc, 0x8c4f74\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xc0, 0x8c4f78\nLDR             X0, [X20]                                              ; +0xc4, 0x8c4f7c\nCMP             X1, X0                                                 ; +0xc8, 0x8c4f80\nB.NE            loc_8C4FDC                                             ; +0xcc, 0x8c4f84\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xd0, 0x8c4f88\nLDR             X21, [SP,#0x50+var_30]                                 ; +0xd4, 0x8c4f8c\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xd8, 0x8c4f90\nRET                                                                    ; +0xdc, 0x8c4f94\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xe0, 0x8c4f98\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xe4, 0x8c4f9c\nCBZ             X1, loc_8C4FCC                                         ; +0xe8, 0x8c4fa0\nSUB             X2, X2, #8                                             ; +0xec, 0x8c4fa4\nLDAXR           W1, [X2]                                               ; +0xf0, 0x8c4fa8\nSUB             W3, W1, #1                                             ; +0xf4, 0x8c4fac\nSTLXR           W4, W3, [X2]                                           ; +0xf8, 0x8c4fb0\nCBNZ            W4, loc_8C4FA8                                         ; +0xfc, 0x8c4fb4\nCMP             W1, WZR                                                ; +0x100, 0x8c4fb8\nB.GT            loc_8C4F40                                             ; +0x104, 0x8c4fbc\nADD             X1, X29, #0x50+var_18                                  ; +0x108, 0x8c4fc0\nBL              j__ZdlPv; operator delete(void *)                      ; +0x10c, 0x8c4fc4\nB               loc_8C4F40                                             ; +0x110, 0x8c4fc8\nLDUR            W1, [X2,#-8]                                           ; +0x114, 0x8c4fcc\nSUB             W3, W1, #1                                             ; +0x118, 0x8c4fd0\nSTUR            W3, [X2,#-8]                                           ; +0x11c, 0x8c4fd4\nB               loc_8C4FB8                                             ; +0x120, 0x8c4fd8\nBL              .__stack_chk_fail                                      ; +0x124, 0x8c4fdc\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x128, 0x8c4fe0\nMOV             X19, X0                                                ; +0x12c, 0x8c4fe4\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x130, 0x8c4fe8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x134, 0x8c4fec\nSUB             X0, X0, #0x18                                          ; +0x138, 0x8c4ff0\nCMP             X0, X1                                                 ; +0x13c, 0x8c4ff4\nB.EQ            loc_8C5004                                             ; +0x140, 0x8c4ff8\nADD             X1, X29, #0x50+var_18                                  ; +0x144, 0x8c4ffc\nBL              sub_4DC698                                             ; +0x148, 0x8c5000\nMOV             X0, X19                                                ; +0x14c, 0x8c5004\nBL              _Unwind_Resume                                         ; +0x150, 0x8c5008", "xrefs": ["<???> @ 0xc4698", "GJMessagePopup::loadFromGJMessage @ 0x8ce140", "<???> @ 0x122ed20"], "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"}