{"type": "func", "start": 8638156, "end": 8638436, "name": "CustomSongLayer::showNewgroundsMessage", "pseudocode": "// \n// CustomSongLayer::showNewgroundsMessage from 0x83cecc to 0x83cfe4 (280 bytes)\n// \n// 2 xrefs:\n// > CustomSongLayer::onSearch @ 0x83d0cc\n// > <???> @ 0x6fc00\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 CustomSongLayer::showNewgroundsMessage(CustomSongLayer *a1)\n{\n  FLAlertLayer *v1; // x20\n  void *v2; // x0\n  unsigned int *v3; // x2\n  int v4; // w1\n  __int64 v5; // [xsp+30h] [xbp+30h] BYREF\n\n  sub_D153B8(\n    (int)&v5,\n    \"There are thousands of great custom songs for you to choose from Newgrounds. Please do not upload music you did not \"\n    \"create. You are only allowed to use songs from artists that have been scouted on Newgrounds. For more information, p\"\n    \"lease check the <cy>Audio Guidelines</c>.\");\n  v1 = FLAlertLayer::create(0, (__int64)\"Newgrounds Info\", (__int64)&v5);\n  v2 = (void *)(v5 - 24);\n  if ( (__int64 *)(v5 - 24) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v3 = (unsigned int *)(v5 - 8);\n      do\n        v4 = __ldaxr(v3);\n      while ( __stlxr(v4 - 1, v3) );\n    }\n    else\n    {\n      v4 = *(_DWORD *)(v5 - 8);\n      *(_DWORD *)(v5 - 8) = v4 - 1;\n    }\n    if ( v4 <= 0 )\n      operator delete(v2);\n  }\n  v1->show(v1);\n}", "assembly": "; \n; CustomSongLayer::showNewgroundsMessage from 0x83cecc to 0x83cfe4 (280 bytes)\n; \n; 2 xrefs:\n; > CustomSongLayer::onSearch @ 0x83d0cc\n; > <???> @ 0x6fc00\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, 0x83cecc\nADRP            X1, #aThereAreThousa@PAGE; \"There are thousands of great custom son\"... ; +0x4, 0x83ced0\nMOV             X29, SP                                                ; +0x8, 0x83ced4\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0xc, 0x83ced8\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x83cedc\nADD             X20, X29, #0x40+var_10                                 ; +0x14, 0x83cee0\nMOV             X0, X20; int                                           ; +0x18, 0x83cee4\nADD             X1, X1, #aThereAreThousa@PAGEOFF; \"There are thousands of great custom son\"... ; +0x1c, 0x83cee8\nADD             X2, X29, #0x40+var_20                                  ; +0x20, 0x83ceec\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0x83cef0\nLDR             X3, [X3]                                               ; +0x28, 0x83cef4\nSTR             X3, [X29,#0x40+var_8]                                  ; +0x2c, 0x83cef8\nBL              sub_D153B8                                             ; +0x30, 0x83cefc\nLDR             S0, =0x43BE0000                                        ; +0x34, 0x83cf00\nADRP            X1, #aNewgroundsInfo@PAGE; \"Newgrounds Info\"           ; +0x38, 0x83cf04\nADRP            X3, #aOk@PAGE; \"OK\"                                    ; +0x3c, 0x83cf08\nMOV             X0, #0                                                 ; +0x40, 0x83cf0c\nADD             X1, X1, #aNewgroundsInfo@PAGEOFF; \"Newgrounds Info\"    ; +0x44, 0x83cf10\nMOV             X2, X20                                                ; +0x48, 0x83cf14\nADD             X3, X3, #aOk@PAGEOFF; \"OK\"                             ; +0x4c, 0x83cf18\nMOV             X4, #0                                                 ; +0x50, 0x83cf1c\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x54, 0x83cf20\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x58, 0x83cf24\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x5c, 0x83cf28\nMOV             X20, X0                                                ; +0x60, 0x83cf2c\nSUB             X0, X2, #0x18; p                                       ; +0x64, 0x83cf30\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x68, 0x83cf34\nCMP             X0, X1                                                 ; +0x6c, 0x83cf38\nB.NE            loc_83CF70                                             ; +0x70, 0x83cf3c\nLDR             X1, [X20]                                              ; +0x74, 0x83cf40\nMOV             X0, X20                                                ; +0x78, 0x83cf44\nLDR             X1, [X1,#0x508]                                        ; +0x7c, 0x83cf48\nBLR             X1                                                     ; +0x80, 0x83cf4c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x84, 0x83cf50\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x88, 0x83cf54\nLDR             X0, [X19]                                              ; +0x8c, 0x83cf58\nCMP             X1, X0                                                 ; +0x90, 0x83cf5c\nB.NE            loc_83CFB4                                             ; +0x94, 0x83cf60\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x98, 0x83cf64\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x9c, 0x83cf68\nRET                                                                    ; +0xa0, 0x83cf6c\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xa4, 0x83cf70\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xa8, 0x83cf74\nCBZ             X1, loc_83CFA4                                         ; +0xac, 0x83cf78\nSUB             X2, X2, #8                                             ; +0xb0, 0x83cf7c\nLDAXR           W1, [X2]                                               ; +0xb4, 0x83cf80\nSUB             W3, W1, #1                                             ; +0xb8, 0x83cf84\nSTLXR           W4, W3, [X2]                                           ; +0xbc, 0x83cf88\nCBNZ            W4, loc_83CF80                                         ; +0xc0, 0x83cf8c\nCMP             W1, WZR                                                ; +0xc4, 0x83cf90\nB.GT            loc_83CF40                                             ; +0xc8, 0x83cf94\nADD             X1, X29, #0x40+var_18                                  ; +0xcc, 0x83cf98\nBL              j__ZdlPv; operator delete(void *)                      ; +0xd0, 0x83cf9c\nB               loc_83CF40                                             ; +0xd4, 0x83cfa0\nLDUR            W1, [X2,#-8]                                           ; +0xd8, 0x83cfa4\nSUB             W3, W1, #1                                             ; +0xdc, 0x83cfa8\nSTUR            W3, [X2,#-8]                                           ; +0xe0, 0x83cfac\nB               loc_83CF90                                             ; +0xe4, 0x83cfb0\nBL              .__stack_chk_fail                                      ; +0xe8, 0x83cfb4\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xec, 0x83cfb8\nMOV             X19, X0                                                ; +0xf0, 0x83cfbc\nLDR             X0, [X29,#0x40+var_10]                                 ; +0xf4, 0x83cfc0\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xf8, 0x83cfc4\nSUB             X0, X0, #0x18                                          ; +0xfc, 0x83cfc8\nCMP             X0, X1                                                 ; +0x100, 0x83cfcc\nB.EQ            loc_83CFDC                                             ; +0x104, 0x83cfd0\nADD             X1, X29, #0x40+var_18                                  ; +0x108, 0x83cfd4\nBL              sub_4DC1E0                                             ; +0x10c, 0x83cfd8\nMOV             X0, X19                                                ; +0x110, 0x83cfdc\nBL              _Unwind_Resume                                         ; +0x114, 0x83cfe0", "xrefs": ["CustomSongLayer::onSearch @ 0x83d0cc", "<???> @ 0x6fc00"], "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"}