{"type": "func", "start": 4204452, "end": 4204640, "name": "GJGarageLayer::textInputOpened", "pseudocode": "// \n// GJGarageLayer::textInputOpened from 0x4027a4 to 0x402860 (188 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'GJGarageLayer::textInputOpened @ 0x402878\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::textInputOpened(GJGarageLayer *a1, CCTextInputNode *a2)\n{\n  int v4; // r10\n  char *v5; // r2\n  char v6; // [sp+4h] [bp-14h] BYREF\n  _BYTE v7[4]; // [sp+8h] [bp-10h] BYREF\n  char v8[4]; // [sp+Ch] [bp-Ch] BYREF\n  char *v9; // [sp+10h] [bp-8h] BYREF\n\n  GameManager::sharedState()->m_clickedName = 1;\n  CCTextInputNode::getString((CCTextInputNode *)&v6, (int)a2);\n  sub_776584((int)v7, \"Player\");\n  v4 = sub_774DBC(&v6, v7);\n  sub_774008(v7);\n  if ( !v4 )\n  {\n    GJGarageLayer::updatePlayerName(a1, (const char *)&unk_939830);\n    sub_776584((int)v8, (char *)&unk_939830);\n    CCTextInputNode::setString((int)a2, v8, v5);\n    sub_774008(v8);\n    sub_776584((int)&v9, \" \");\n    CCTextInputNode::updateLabel((int)a2, &v9);\n    sub_774008(&v9);\n  }\n  sub_774008(&v6);\n}", "assembly": "; \n; GJGarageLayer::textInputOpened from 0x4027a4 to 0x402860 (188 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'GJGarageLayer::textInputOpened @ 0x402878\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\nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x4027a4\nSUB             SP, SP, #0x18                                          ; +0x4, 0x4027a8\nLDR             R7, =(__stack_chk_guard_ptr - 0x4027B6)                ; +0x6, 0x4027aa\nMOV             R8, R1                                                 ; +0x8, 0x4027ac\nMOV             R9, R0                                                 ; +0xa, 0x4027ae\nADD             R6, SP, #0x18+var_14                                   ; +0xc, 0x4027b0\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x4027b2\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x4027b4\nADD             R5, SP, #0x18+var_10                                   ; +0x12, 0x4027b6\nADD             R4, SP, #0x18+var_8                                    ; +0x14, 0x4027b8\nLDR             R3, [R7]                                               ; +0x16, 0x4027ba\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x18, 0x4027bc\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x1a, 0x4027be\nMOVS            R3, #1                                                 ; +0x1e, 0x4027c2\nMOV             R1, R8                                                 ; +0x20, 0x4027c4\nSTRB.W          R3, [R0,#0x2A1]                                        ; +0x22, 0x4027c6\nMOV             R0, R6; this                                           ; +0x26, 0x4027ca\nBL              _ZN15CCTextInputNode9getStringEv; CCTextInputNode::getString(void) ; +0x28, 0x4027cc\nLDR             R1, =(aPlayer - 0x4027DA); \"Player\"                    ; +0x2c, 0x4027d0\nMOV             R0, R5; int                                            ; +0x2e, 0x4027d2\nMOV             R2, R4                                                 ; +0x30, 0x4027d4\nADD             R1, PC; \"Player\"                                       ; +0x32, 0x4027d6\nBL              sub_776584                                             ; +0x34, 0x4027d8\nMOV             R0, R6                                                 ; +0x38, 0x4027dc\nMOV             R1, R5                                                 ; +0x3a, 0x4027de\nBL              sub_774DBC                                             ; +0x3c, 0x4027e0\nMOV             R10, R0                                                ; +0x40, 0x4027e4\nMOV             R0, R5                                                 ; +0x42, 0x4027e6\nBL              sub_774008                                             ; +0x44, 0x4027e8\nCMP.W           R10, #0                                                ; +0x48, 0x4027ec\nBNE             loc_402832                                             ; +0x4c, 0x4027f0\nLDR             R1, =(unk_939830 - 0x4027FA)                           ; +0x4e, 0x4027f2\nMOV             R0, R9; this                                           ; +0x50, 0x4027f4\nADD             R1, PC; unk_939830 ; char *                            ; +0x52, 0x4027f6\nBL              _ZN13GJGarageLayer16updatePlayerNameEPKc; GJGarageLayer::updatePlayerName(char const*) ; +0x54, 0x4027f8\nADD             R5, SP, #0x18+var_C                                    ; +0x58, 0x4027fc\nLDR             R1, =(unk_939830 - 0x402808)                           ; +0x5a, 0x4027fe\nMOV             R2, R4                                                 ; +0x5c, 0x402800\nMOV             R0, R5; int                                            ; +0x5e, 0x402802\nADD             R1, PC; unk_939830 ; char *                            ; +0x60, 0x402804\nBL              sub_776584                                             ; +0x62, 0x402806\nMOV             R0, R8                                                 ; +0x66, 0x40280a\nMOV             R1, R5                                                 ; +0x68, 0x40280c\nBL              _ZN15CCTextInputNode9setStringESs; CCTextInputNode::setString(std::string) ; +0x6a, 0x40280e\nMOV             R0, R5                                                 ; +0x6e, 0x402812\nBL              sub_774008                                             ; +0x70, 0x402814\nLDR             R1, =(asc_943A02 - 0x402822); \" \"                      ; +0x74, 0x402818\nMOV             R0, R4; int                                            ; +0x76, 0x40281a\nMOV             R2, R5                                                 ; +0x78, 0x40281c\nADD             R1, PC; \" \"                                            ; +0x7a, 0x40281e\nBL              sub_776584                                             ; +0x7c, 0x402820\nMOV             R0, R8                                                 ; +0x80, 0x402824\nMOV             R1, R4                                                 ; +0x82, 0x402826\nBL              _ZN15CCTextInputNode11updateLabelESs; CCTextInputNode::updateLabel(std::string) ; +0x84, 0x402828\nMOV             R0, R4                                                 ; +0x88, 0x40282c\nBL              sub_774008                                             ; +0x8a, 0x40282e\nMOV             R0, R6                                                 ; +0x8e, 0x402832\nBL              sub_774008                                             ; +0x90, 0x402834\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x94, 0x402838\nLDR             R3, [R7]                                               ; +0x96, 0x40283a\nCMP             R2, R3                                                 ; +0x98, 0x40283c\nBEQ             loc_40285A                                             ; +0x9a, 0x40283e\nBLX             __stack_chk_fail                                       ; +0x9c, 0x402840\nMOV             R0, R5                                                 ; +0xa0, 0x402844\nB               loc_40284A                                             ; +0xa2, 0x402846\nMOV             R0, R4                                                 ; +0xa4, 0x402848\nBL              sub_774008                                             ; +0xa6, 0x40284a\nB               loc_402850                                             ; +0xaa, 0x40284e\nMOV             R0, R6                                                 ; +0xac, 0x402850\nBL              sub_774008                                             ; +0xae, 0x402852\nBL              __cxa_end_cleanup                                      ; +0xb2, 0x402856\nADD             SP, SP, #0x18                                          ; +0xb6, 0x40285a\nPOP.W           {R4-R10,PC}                                            ; +0xb8, 0x40285c", "xrefs": ["`non-virtual thunk to'GJGarageLayer::textInputOpened @ 0x402878"], "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"}