{"type": "func", "start": 8632760, "end": 8632928, "name": "CustomSongLayer::textInputClosed", "pseudocode": "// \n// CustomSongLayer::textInputClosed from 0x83b9b8 to 0x83ba60 (168 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'CustomSongLayer::textInputClosed @ 0x83ba64\n// > <???> @ 0xbddf8\n// > <???> @ 0x118a890\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::textInputClosed(CustomSongLayer *a1, CCTextInputNode *a2)\n{\n  void *v2; // x0\n  unsigned int *v3; // x2\n  int v4; // w1\n  __int64 v5; // [xsp+30h] [xbp+30h] BYREF\n\n  CCTextInputNode::getString(a2, (__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}", "assembly": "; \n; CustomSongLayer::textInputClosed from 0x83b9b8 to 0x83ba60 (168 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'CustomSongLayer::textInputClosed @ 0x83ba64\n; > <???> @ 0xbddf8\n; > <???> @ 0x118a890\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, 0x83b9b8\nMOV             X0, X1; this                                           ; +0x4, 0x83b9bc\nMOV             X29, SP                                                ; +0x8, 0x83b9c0\nSTR             X19, [SP,#0x40+var_30]                                 ; +0xc, 0x83b9c4\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x83b9c8\nADD             X8, X29, #0x40+var_10                                  ; +0x14, 0x83b9cc\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x83b9d0\nLDR             X1, [X1]                                               ; +0x1c, 0x83b9d4\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x20, 0x83b9d8\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x24, 0x83b9dc\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x28, 0x83b9e0\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x2c, 0x83b9e4\nSUB             X0, X2, #0x18; p                                       ; +0x30, 0x83b9e8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x34, 0x83b9ec\nCMP             X0, X1                                                 ; +0x38, 0x83b9f0\nB.NE            loc_83BA18                                             ; +0x3c, 0x83b9f4\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x40, 0x83b9f8\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x44, 0x83b9fc\nLDR             X0, [X19]                                              ; +0x48, 0x83ba00\nCMP             X1, X0                                                 ; +0x4c, 0x83ba04\nB.NE            loc_83BA5C                                             ; +0x50, 0x83ba08\nLDR             X19, [SP,#0x40+var_30]                                 ; +0x54, 0x83ba0c\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x58, 0x83ba10\nRET                                                                    ; +0x5c, 0x83ba14\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x60, 0x83ba18\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x64, 0x83ba1c\nCBZ             X1, loc_83BA4C                                         ; +0x68, 0x83ba20\nSUB             X2, X2, #8                                             ; +0x6c, 0x83ba24\nLDAXR           W1, [X2]                                               ; +0x70, 0x83ba28\nSUB             W3, W1, #1                                             ; +0x74, 0x83ba2c\nSTLXR           W4, W3, [X2]                                           ; +0x78, 0x83ba30\nCBNZ            W4, loc_83BA28                                         ; +0x7c, 0x83ba34\nCMP             W1, WZR                                                ; +0x80, 0x83ba38\nB.GT            loc_83B9F8                                             ; +0x84, 0x83ba3c\nADD             X1, X29, #0x40+var_18                                  ; +0x88, 0x83ba40\nBL              j__ZdlPv; operator delete(void *)                      ; +0x8c, 0x83ba44\nB               loc_83B9F8                                             ; +0x90, 0x83ba48\nLDUR            W1, [X2,#-8]                                           ; +0x94, 0x83ba4c\nSUB             W3, W1, #1                                             ; +0x98, 0x83ba50\nSTUR            W3, [X2,#-8]                                           ; +0x9c, 0x83ba54\nB               loc_83BA38                                             ; +0xa0, 0x83ba58\nBL              .__stack_chk_fail                                      ; +0xa4, 0x83ba5c", "xrefs": ["`non-virtual thunk to'CustomSongLayer::textInputClosed @ 0x83ba64", "<???> @ 0xbddf8", "<???> @ 0x118a890"], "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"}