{"type": "func", "start": 4733980, "end": 4734114, "name": "GJBaseGameLayer::recordAction", "pseudocode": "// \n// GJBaseGameLayer::recordAction from 0x483c1c to 0x483ca2 (134 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::handleButton @ 0x492e68\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  std::vector<RecordButtonCommand> *p_m_queuedRecordedButtons; // r5\n  RecordButtonCommand *m_finish; // r4\n  RecordButtonCommand *m_reserveEnd; // r3\n  int v10; // r1\n  int v11; // r2\n  int v12; // r3\n  _DWORD v13[4]; // [sp+4h] [bp-14h] BYREF\n\n  if ( a1->m_recordInputs && !a1->m_useReplay )\n  {\n    p_m_queuedRecordedButtons = &a1->m_queuedRecordedButtons;\n    m_finish = a1->m_queuedRecordedButtons.m_finish;\n    if ( (unsigned int)(m_finish - a1->m_queuedRecordedButtons.m_start) <= 0x1869F )\n    {\n      memset(v13, a1->m_useReplay, sizeof(v13));\n      m_reserveEnd = p_m_queuedRecordedButtons->m_reserveEnd;\n      v13[0] = a2;\n      LOBYTE(v13[1]) = a3;\n      BYTE1(v13[1]) = a4;\n      if ( m_finish == m_reserveEnd )\n      {\n        std::vector<RecordButtonCommand>::_M_emplace_back_aux<RecordButtonCommand const&>(\n          (const void **)&p_m_queuedRecordedButtons->m_start,\n          v13);\n      }\n      else\n      {\n        if ( m_finish )\n        {\n          v10 = v13[1];\n          v11 = v13[2];\n          v12 = v13[3];\n          m_finish->m_button = v13[0];\n          *(_DWORD *)&m_finish->m_isPush = v10;\n          m_finish->m_step = v11;\n          m_finish->m_unk00c = v12;\n        }\n        p_m_queuedRecordedButtons->m_finish = m_finish + 1;\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::recordAction from 0x483c1c to 0x483ca2 (134 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::handleButton @ 0x492e68\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, 0x483c1c\nMOV             R9, R2                                                 ; +0x4, 0x483c20\nLDR             R2, =(__stack_chk_guard_ptr - 0x483C2E)                ; +0x6, 0x483c22\nMOV             R10, R3                                                ; +0x8, 0x483c24\nSUB             SP, SP, #0x18                                          ; +0xa, 0x483c26\nMOV             R8, R1                                                 ; +0xc, 0x483c28\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0xe, 0x483c2a\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x10, 0x483c2c\nLDR             R3, [R2]                                               ; +0x12, 0x483c2e\nMOV             R7, R2                                                 ; +0x14, 0x483c30\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x16, 0x483c32\nMOVW            R3, #0x2B48                                            ; +0x18, 0x483c34\nLDRB            R3, [R0,R3]                                            ; +0x1c, 0x483c38\nCBZ             R3, loc_483C90                                         ; +0x1e, 0x483c3a\nMOVW            R3, #0x2A88                                            ; +0x20, 0x483c3c\nLDRB            R1, [R0,R3]; int                                       ; +0x24, 0x483c40\nCBNZ            R1, loc_483C90                                         ; +0x26, 0x483c42\nADD.W           R5, R0, #0x2B80                                        ; +0x28, 0x483c44\nMOVW            R3, #0x2B8C                                            ; +0x2c, 0x483c48\nADDS            R5, #0xC                                               ; +0x30, 0x483c4c\nLDR             R2, [R0,R3]                                            ; +0x32, 0x483c4e\nLDR             R4, [R5,#4]                                            ; +0x34, 0x483c50\nLDR             R3, =0x1869F                                           ; +0x36, 0x483c52\nSUBS            R2, R4, R2                                             ; +0x38, 0x483c54\nCMP.W           R3, R2,ASR#4                                           ; +0x3a, 0x483c56\nBCC             loc_483C90                                             ; +0x3e, 0x483c5a\nADD             R6, SP, #0x18+var_14                                   ; +0x40, 0x483c5c\nMOVS            R2, #0x10; size_t                                      ; +0x42, 0x483c5e\nMOV             R0, R6; void *                                         ; +0x44, 0x483c60\nBLX             memset                                                 ; +0x46, 0x483c62\nLDR             R3, [R5,#8]                                            ; +0x4a, 0x483c66\nSTR.W           R8, [SP,#0x18+var_14]                                  ; +0x4c, 0x483c68\nCMP             R4, R3                                                 ; +0x50, 0x483c6c\nSTRB.W          R9, [SP,#0x18+var_10]                                  ; +0x52, 0x483c6e\nSTRB.W          R10, [SP,#0x18+var_F]                                  ; +0x56, 0x483c72\nBEQ             loc_483C88                                             ; +0x5a, 0x483c76\nCBZ             R4, loc_483C82                                         ; +0x5c, 0x483c78\nLDM.W           R6, {R0-R3}                                            ; +0x5e, 0x483c7a\nSTM.W           R4, {R0-R3}                                            ; +0x62, 0x483c7e\nADDS            R4, #0x10                                              ; +0x66, 0x483c82\nSTR             R4, [R5,#4]                                            ; +0x68, 0x483c84\nB               loc_483C90                                             ; +0x6a, 0x483c86\nMOV             R0, R5                                                 ; +0x6c, 0x483c88\nMOV             R1, R6                                                 ; +0x6e, 0x483c8a\nBL              _ZNSt6vectorI19RecordButtonCommandSaIS0_EE19_M_emplace_back_auxIJRKS0_EEEvDpOT_; std::vector<RecordButtonCommand>::_M_emplace_back_aux<RecordButtonCommand const&>(RecordButtonCommand const&) ; +0x70, 0x483c8c\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x74, 0x483c90\nLDR             R3, [R7]                                               ; +0x76, 0x483c92\nCMP             R2, R3                                                 ; +0x78, 0x483c94\nBEQ             loc_483C9C                                             ; +0x7a, 0x483c96\nBLX             __stack_chk_fail                                       ; +0x7c, 0x483c98\nADD             SP, SP, #0x18                                          ; +0x80, 0x483c9c\nPOP.W           {R4-R10,PC}                                            ; +0x82, 0x483c9e", "xrefs": ["GJBaseGameLayer::handleButton @ 0x492e68"], "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"}