{"type": "func", "start": 8632936, "end": 8633104, "name": "CustomSongLayer::textInputOpened", "pseudocode": "// \n// CustomSongLayer::textInputOpened from 0x83ba68 to 0x83bb10 (168 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'CustomSongLayer::textInputOpened @ 0x83bb14\n// > <???> @ 0x82f08\n// > <???> @ 0x118a888\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::textInputOpened(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::textInputOpened from 0x83ba68 to 0x83bb10 (168 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'CustomSongLayer::textInputOpened @ 0x83bb14\n; > <???> @ 0x82f08\n; > <???> @ 0x118a888\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, 0x83ba68\nMOV             X0, X1; this                                           ; +0x4, 0x83ba6c\nMOV             X29, SP                                                ; +0x8, 0x83ba70\nSTR             X19, [SP,#0x40+var_30]                                 ; +0xc, 0x83ba74\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x83ba78\nADD             X8, X29, #0x40+var_10                                  ; +0x14, 0x83ba7c\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x83ba80\nLDR             X1, [X1]                                               ; +0x1c, 0x83ba84\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x20, 0x83ba88\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x24, 0x83ba8c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x28, 0x83ba90\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x2c, 0x83ba94\nSUB             X0, X2, #0x18; p                                       ; +0x30, 0x83ba98\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x34, 0x83ba9c\nCMP             X0, X1                                                 ; +0x38, 0x83baa0\nB.NE            loc_83BAC8                                             ; +0x3c, 0x83baa4\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x40, 0x83baa8\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x44, 0x83baac\nLDR             X0, [X19]                                              ; +0x48, 0x83bab0\nCMP             X1, X0                                                 ; +0x4c, 0x83bab4\nB.NE            loc_83BB0C                                             ; +0x50, 0x83bab8\nLDR             X19, [SP,#0x40+var_30]                                 ; +0x54, 0x83babc\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x58, 0x83bac0\nRET                                                                    ; +0x5c, 0x83bac4\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x60, 0x83bac8\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x64, 0x83bacc\nCBZ             X1, loc_83BAFC                                         ; +0x68, 0x83bad0\nSUB             X2, X2, #8                                             ; +0x6c, 0x83bad4\nLDAXR           W1, [X2]                                               ; +0x70, 0x83bad8\nSUB             W3, W1, #1                                             ; +0x74, 0x83badc\nSTLXR           W4, W3, [X2]                                           ; +0x78, 0x83bae0\nCBNZ            W4, loc_83BAD8                                         ; +0x7c, 0x83bae4\nCMP             W1, WZR                                                ; +0x80, 0x83bae8\nB.GT            loc_83BAA8                                             ; +0x84, 0x83baec\nADD             X1, X29, #0x40+var_18                                  ; +0x88, 0x83baf0\nBL              j__ZdlPv; operator delete(void *)                      ; +0x8c, 0x83baf4\nB               loc_83BAA8                                             ; +0x90, 0x83baf8\nLDUR            W1, [X2,#-8]                                           ; +0x94, 0x83bafc\nSUB             W3, W1, #1                                             ; +0x98, 0x83bb00\nSTUR            W3, [X2,#-8]                                           ; +0x9c, 0x83bb04\nB               loc_83BAE8                                             ; +0xa0, 0x83bb08\nBL              .__stack_chk_fail                                      ; +0xa4, 0x83bb0c", "xrefs": ["`non-virtual thunk to'CustomSongLayer::textInputOpened @ 0x83bb14", "<???> @ 0x82f08", "<???> @ 0x118a888"], "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"}