{"type": "func", "start": 7934048, "end": 7934276, "name": "GJGarageLayer::textChanged", "pseudocode": "// \n// GJGarageLayer::textChanged from 0x791060 to 0x791144 (228 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'GJGarageLayer::textChanged @ 0x791148\n// > <???> @ 0xaa568\n// > <???> @ 0x1178a90\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 GJGarageLayer::textChanged(GJGarageLayer *a1, CCTextInputNode *a2)\n{\n  char *v3; // x0\n  unsigned int *v4; // x2\n  int v5; // w1\n  char *v6; // [xsp+30h] [xbp+30h] BYREF\n\n  CCTextInputNode::getString(a2, (__int64)&v6);\n  GJGarageLayer::updatePlayerName(a1, v6);\n  v3 = v6 - 24;\n  if ( v6 - 24 != (char *)&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 - 2);\n      *((_DWORD *)v6 - 2) = v5 - 1;\n    }\n    if ( v5 <= 0 )\n      operator delete(v3);\n  }\n}", "assembly": "; \n; GJGarageLayer::textChanged from 0x791060 to 0x791144 (228 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'GJGarageLayer::textChanged @ 0x791148\n; > <???> @ 0xaa568\n; > <???> @ 0x1178a90\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, 0x791060\nMOV             X29, SP                                                ; +0x4, 0x791064\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0x791068\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x79106c\nMOV             X20, X0                                                ; +0x10, 0x791070\nMOV             X0, X1; this                                           ; +0x14, 0x791074\nADD             X8, X29, #0x40+var_10                                  ; +0x18, 0x791078\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x79107c\nLDR             X1, [X1]                                               ; +0x20, 0x791080\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x24, 0x791084\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x28, 0x791088\nLDR             X1, [X29,#0x40+var_10]; char *                         ; +0x2c, 0x79108c\nMOV             X0, X20; this                                          ; +0x30, 0x791090\nBL              _ZN13GJGarageLayer16updatePlayerNameEPKc; GJGarageLayer::updatePlayerName(char const*) ; +0x34, 0x791094\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x38, 0x791098\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x3c, 0x79109c\nSUB             X0, X2, #0x18; p                                       ; +0x40, 0x7910a0\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x44, 0x7910a4\nCMP             X0, X1                                                 ; +0x48, 0x7910a8\nB.NE            loc_7910D0                                             ; +0x4c, 0x7910ac\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x50, 0x7910b0\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x54, 0x7910b4\nLDR             X0, [X19]                                              ; +0x58, 0x7910b8\nCMP             X1, X0                                                 ; +0x5c, 0x7910bc\nB.NE            loc_791114                                             ; +0x60, 0x7910c0\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x64, 0x7910c4\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x68, 0x7910c8\nRET                                                                    ; +0x6c, 0x7910cc\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x70, 0x7910d0\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x74, 0x7910d4\nCBZ             X1, loc_791104                                         ; +0x78, 0x7910d8\nSUB             X2, X2, #8                                             ; +0x7c, 0x7910dc\nLDAXR           W1, [X2]                                               ; +0x80, 0x7910e0\nSUB             W3, W1, #1                                             ; +0x84, 0x7910e4\nSTLXR           W4, W3, [X2]                                           ; +0x88, 0x7910e8\nCBNZ            W4, loc_7910E0                                         ; +0x8c, 0x7910ec\nCMP             W1, WZR                                                ; +0x90, 0x7910f0\nB.GT            loc_7910B0                                             ; +0x94, 0x7910f4\nADD             X1, X29, #0x40+var_18                                  ; +0x98, 0x7910f8\nBL              j__ZdlPv; operator delete(void *)                      ; +0x9c, 0x7910fc\nB               loc_7910B0                                             ; +0xa0, 0x791100\nLDUR            W1, [X2,#-8]                                           ; +0xa4, 0x791104\nSUB             W3, W1, #1                                             ; +0xa8, 0x791108\nSTUR            W3, [X2,#-8]                                           ; +0xac, 0x79110c\nB               loc_7910F0                                             ; +0xb0, 0x791110\nBL              .__stack_chk_fail                                      ; +0xb4, 0x791114\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xb8, 0x791118\nMOV             X19, X0                                                ; +0xbc, 0x79111c\nLDR             X0, [X29,#0x40+var_10]                                 ; +0xc0, 0x791120\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xc4, 0x791124\nSUB             X0, X0, #0x18                                          ; +0xc8, 0x791128\nCMP             X0, X1                                                 ; +0xcc, 0x79112c\nB.EQ            loc_79113C                                             ; +0xd0, 0x791130\nADD             X1, X29, #0x40+var_18                                  ; +0xd4, 0x791134\nBL              sub_4DBC48                                             ; +0xd8, 0x791138\nMOV             X0, X19                                                ; +0xdc, 0x79113c\nBL              _Unwind_Resume                                         ; +0xe0, 0x791140", "xrefs": ["`non-virtual thunk to'GJGarageLayer::textChanged @ 0x791148", "<???> @ 0xaa568", "<???> @ 0x1178a90"], "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"}