{"type": "func", "start": 8874100, "end": 8874296, "name": "GJBaseGameLayer::recordAction", "pseudocode": "// \n// GJBaseGameLayer::recordAction from 0x876874 to 0x876938 (196 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::handleButton @ 0x88c844\n// > <???> @ 0x4b018\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 GJBaseGameLayer::recordAction(GJBaseGameLayer *a1, int a2, bool a3, bool a4)\n{\n  RecordButtonCommand *m_finish; // x5\n  RecordButtonCommand *m_reserveEnd; // x6\n  __int64 v6; // x1\n  __int64 v7; // [xsp+28h] [xbp+28h] BYREF\n  __int64 v8; // [xsp+30h] [xbp+30h]\n\n  if ( a1->m_recordInputs && !a1->m_useReplay )\n  {\n    m_finish = a1->m_queuedRecordedButtons.m_finish;\n    if ( (unsigned __int64)(m_finish - a1->m_queuedRecordedButtons.m_start) <= 0x1869F )\n    {\n      m_reserveEnd = a1->m_queuedRecordedButtons.m_reserveEnd;\n      v8 = 0;\n      LODWORD(v7) = a2;\n      BYTE4(v7) = a3;\n      BYTE5(v7) = a4;\n      if ( m_finish == m_reserveEnd )\n      {\n        std::vector<RecordButtonCommand>::_M_emplace_back_aux<RecordButtonCommand const&>(\n          (__int64)&a1->m_queuedRecordedButtons,\n          &v7);\n      }\n      else\n      {\n        if ( m_finish )\n        {\n          v6 = v8;\n          *(_QWORD *)&m_finish->m_button = v7;\n          *(_QWORD *)&m_finish->m_step = v6;\n        }\n        a1->m_queuedRecordedButtons.m_finish = m_finish + 1;\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::recordAction from 0x876874 to 0x876938 (196 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::handleButton @ 0x88c844\n; > <???> @ 0x4b018\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, 0x876874\nADD             X4, X0, #3,LSL#12                                      ; +0x4, 0x876878\nUXTB            W2, W2                                                 ; +0x8, 0x87687c\nMOV             X29, SP                                                ; +0xc, 0x876880\nSTR             X19, [SP,#0x40+var_30]                                 ; +0x10, 0x876884\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x14, 0x876888\nLDRB            W5, [X4,#0x308]                                        ; +0x18, 0x87688c\nUXTB            W3, W3                                                 ; +0x1c, 0x876890\nLDR             X6, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x876894\nLDR             X6, [X6]                                               ; +0x24, 0x876898\nSTR             X6, [X29,#0x40+var_8]                                  ; +0x28, 0x87689c\nCBZ             W5, loc_8768AC                                         ; +0x2c, 0x8768a0\nLDRB            W5, [X4,#0x1F0]                                        ; +0x30, 0x8768a4\nCBZ             W5, loc_8768CC                                         ; +0x34, 0x8768a8\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x38, 0x8768ac\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x3c, 0x8768b0\nLDR             X0, [X19]                                              ; +0x40, 0x8768b4\nCMP             X1, X0                                                 ; +0x44, 0x8768b8\nB.NE            loc_876934                                             ; +0x48, 0x8768bc\nLDR             X19, [SP,#0x40+var_30]                                 ; +0x4c, 0x8768c0\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x50, 0x8768c4\nRET                                                                    ; +0x54, 0x8768c8\nLDR             X5, [X0,#0x3368]                                       ; +0x58, 0x8768cc\nMOV             X6, #0x869F                                            ; +0x5c, 0x8768d0\nLDR             X0, [X0,#0x3360]                                       ; +0x60, 0x8768d4\nMOVK            X6, #1,LSL#16                                          ; +0x64, 0x8768d8\nSUB             X0, X5, X0                                             ; +0x68, 0x8768dc\nCMP             X6, X0,ASR#4                                           ; +0x6c, 0x8768e0\nB.CC            loc_8768AC                                             ; +0x70, 0x8768e4\nADD             X0, X4, #0x360                                         ; +0x74, 0x8768e8\nLDR             X6, [X0,#0x10]                                         ; +0x78, 0x8768ec\nSTR             WZR, [X29,#0x40+var_10]                                ; +0x7c, 0x8768f0\nADD             X7, X29, #0x40+var_18                                  ; +0x80, 0x8768f4\nSTR             WZR, [X29,#0x40+var_C]                                 ; +0x84, 0x8768f8\nCMP             X5, X6                                                 ; +0x88, 0x8768fc\nSTR             W1, [X29,#0x40+var_18]                                 ; +0x8c, 0x876900\nSTRB            W2, [X29,#0x40+var_14]                                 ; +0x90, 0x876904\nSTRB            W3, [X29,#0x40+var_13]                                 ; +0x94, 0x876908\nB.EQ            loc_876928                                             ; +0x98, 0x87690c\nCBZ             X5, loc_87691C                                         ; +0x9c, 0x876910\nLDP             X0, X1, [X7]                                           ; +0xa0, 0x876914\nSTP             X0, X1, [X5]                                           ; +0xa4, 0x876918\nADD             X5, X5, #0x10                                          ; +0xa8, 0x87691c\nSTR             X5, [X4,#0x368]                                        ; +0xac, 0x876920\nB               loc_8768AC                                             ; +0xb0, 0x876924\nMOV             X1, X7                                                 ; +0xb4, 0x876928\nBL              _ZNSt6vectorI19RecordButtonCommandSaIS0_EE19_M_emplace_back_auxIJRKS0_EEEvDpOT_; std::vector<RecordButtonCommand>::_M_emplace_back_aux<RecordButtonCommand const&>(RecordButtonCommand const&) ; +0xb8, 0x87692c\nB               loc_8768AC                                             ; +0xbc, 0x876930\nBL              .__stack_chk_fail                                      ; +0xc0, 0x876934", "xrefs": ["GJBaseGameLayer::handleButton @ 0x88c844", "<???> @ 0x4b018"], "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"}