{"type": "func", "start": 5371042912, "end": 5371043353, "name": "GJBaseGameLayer::processCommands", "pseudocode": "// \n// GJBaseGameLayer::processCommands from 0x140239c60 to 0x140239e19 (441 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::update @ 0x140238090\n// > <???> @ 0x1406ce1d8\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::processCommands(GJBaseGameLayer *a1, float a2, bool a3, bool a4)\n{\n  float v7; // xmm0_4\n  unsigned int m_commandIndex; // eax\n  int m_unkUint6; // edx\n  int v10; // ecx\n  int v11; // eax\n  unsigned int m_currentProgress; // eax\n  unsigned int v13; // eax\n  bool v14; // r8\n  std::_Vector_val<std::_Simple_types<RecordButtonCommand>>::pointer Myfirst; // r8\n  unsigned __int64 m_queuedRecordedButtonsSize; // rdx\n  int v17; // r9d\n  signed int m_pauseCounter; // ecx\n\n  a1->m_gameState.m_unkUint4 = a1->m_gameState.m_commandIndex;\n  if ( a2 > 0.0 )\n  {\n    v7 = roundf(a1->m_gameState.m_timeWarp * 1000.0);\n    m_commandIndex = a1->m_gameState.m_commandIndex;\n    m_unkUint6 = a1->m_gameState.m_unkUint6;\n    v10 = (int)v7;\n    if ( a3 )\n    {\n      a1->m_gameState.m_commandIndex = m_commandIndex + 1;\n      v11 = (int)(float)((float)((float)v10 * 0.5) + (float)m_unkUint6);\n    }\n    else\n    {\n      a1->m_gameState.m_commandIndex = m_commandIndex + 2;\n      v11 = m_unkUint6 + v10;\n    }\n    a1->m_gameState.m_unkUint6 = v11;\n  }\n  if ( !a1->m_playerDied )\n  {\n    if ( a2 > 0.0 )\n    {\n      m_currentProgress = a1->m_gameState.m_currentProgress;\n      if ( a3 )\n        v13 = m_currentProgress + 1;\n      else\n        v13 = m_currentProgress + 2;\n      a1->m_gameState.m_currentProgress = v13;\n    }\n    v14 = !a1->m_clickBetweenSteps && !a1->m_clickOnSteps || a4;\n    GJBaseGameLayer::processQueuedButtons(a1, a2, v14);\n    Myfirst = a1->m_queuedRecordedButtons._Mypair._Myval2._Myfirst;\n    m_queuedRecordedButtonsSize = a1->m_queuedRecordedButtonsSize;\n    if ( m_queuedRecordedButtonsSize < a1->m_queuedRecordedButtons._Mypair._Myval2._Mylast - Myfirst )\n    {\n      v17 = a1->m_gameState.m_unkUint4 - a1->m_currentStep;\n      a1->m_currentStep = a1->m_gameState.m_unkUint4;\n      if ( m_queuedRecordedButtonsSize < a1->m_queuedRecordedButtons._Mypair._Myval2._Mylast - Myfirst )\n      {\n        do\n        {\n          Myfirst[(int)m_queuedRecordedButtonsSize].m_step = v17;\n          v17 = 0;\n          LODWORD(m_queuedRecordedButtonsSize) = a1->m_queuedRecordedButtonsSize + 1;\n          a1->m_queuedRecordedButtonsSize = m_queuedRecordedButtonsSize;\n          Myfirst = a1->m_queuedRecordedButtons._Mypair._Myval2._Myfirst;\n        }\n        while ( (int)m_queuedRecordedButtonsSize < (unsigned __int64)(a1->m_queuedRecordedButtons._Mypair._Myval2._Mylast\n                                                                    - Myfirst) );\n      }\n    }\n  }\n  m_pauseCounter = a1->m_gameState.m_pauseCounter;\n  if ( m_pauseCounter > 0 && (--a1->m_gameState.m_pauseBufferTimer & 0x80000000) != 0 )\n  {\n    a1->m_gameState.m_pauseBufferTimer = 120;\n    a1->m_gameState.m_pauseCounter = m_pauseCounter - 1;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::processCommands from 0x140239c60 to 0x140239e19 (441 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::update @ 0x140238090\n; > <???> @ 0x1406ce1d8\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140239c60\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x140239c65\npush    rdi                                                            ; +0xa, 0x140239c6a\nsub     rsp, 40h                                                       ; +0xb, 0x140239c6b\nmov     eax, [rcx+3E0h]                                                ; +0xf, 0x140239c6f\nmovzx   esi, r9b                                                       ; +0x15, 0x140239c75\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x19, 0x140239c79\nmovzx   edi, r8b                                                       ; +0x1e, 0x140239c7e\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0x22, 0x140239c82\nxorps   xmm6, xmm6                                                     ; +0x27, 0x140239c87\nmovaps  xmm7, xmm1                                                     ; +0x2a, 0x140239c8a\nmov     [rcx+3ECh], eax                                                ; +0x2d, 0x140239c8d\ncomiss  xmm7, xmm6                                                     ; +0x33, 0x140239c93\nmov     rbx, rcx                                                       ; +0x36, 0x140239c96\njbe     short loc_140239D02                                            ; +0x39, 0x140239c99\nmovss   xmm0, dword ptr [rcx+330h]                                     ; +0x3b, 0x140239c9b\nmulss   xmm0, cs:dword_14062350C; X                                    ; +0x43, 0x140239ca3\ncall    cs:__imp_roundf                                                ; +0x4b, 0x140239cab\nmov     eax, [rbx+3E0h]                                                ; +0x51, 0x140239cb1\nmov     edx, [rbx+3F4h]                                                ; +0x57, 0x140239cb7\ncvttss2si ecx, xmm0                                                    ; +0x5d, 0x140239cbd\ntest    dil, dil                                                       ; +0x61, 0x140239cc1\njz      short loc_140239CF0                                            ; +0x64, 0x140239cc4\ninc     eax                                                            ; +0x66, 0x140239cc6\nmovd    xmm1, ecx                                                      ; +0x68, 0x140239cc8\ncvtdq2ps xmm1, xmm1                                                    ; +0x6c, 0x140239ccc\nmov     [rbx+3E0h], eax                                                ; +0x6f, 0x140239ccf\nxorps   xmm0, xmm0                                                     ; +0x75, 0x140239cd5\nmulss   xmm1, cs:dword_140622B08                                       ; +0x78, 0x140239cd8\ncvtsi2ss xmm0, rdx                                                     ; +0x80, 0x140239ce0\naddss   xmm1, xmm0                                                     ; +0x85, 0x140239ce5\ncvttss2si rax, xmm1                                                    ; +0x89, 0x140239ce9\njmp     short loc_140239CFC                                            ; +0x8e, 0x140239cee\nadd     eax, 2                                                         ; +0x90, 0x140239cf0\nmov     [rbx+3E0h], eax                                                ; +0x93, 0x140239cf3\nlea     eax, [rdx+rcx]                                                 ; +0x99, 0x140239cf9\nmov     [rbx+3F4h], eax                                                ; +0x9c, 0x140239cfc\ncmp     byte ptr [rbx+324Ah], 0                                        ; +0xa2, 0x140239d02\njnz     loc_140239DD9                                                  ; +0xa9, 0x140239d09\ncomiss  xmm7, xmm6                                                     ; +0xaf, 0x140239d0f\njbe     short loc_140239D2C                                            ; +0xb2, 0x140239d12\nmov     eax, [rbx+3E8h]                                                ; +0xb4, 0x140239d14\ntest    dil, dil                                                       ; +0xba, 0x140239d1a\njz      short loc_140239D23                                            ; +0xbd, 0x140239d1d\ninc     eax                                                            ; +0xbf, 0x140239d1f\njmp     short loc_140239D26                                            ; +0xc1, 0x140239d21\nadd     eax, 2                                                         ; +0xc3, 0x140239d23\nmov     [rbx+3E8h], eax                                                ; +0xc6, 0x140239d26\ncmp     byte ptr [rbx+3799h], 0                                        ; +0xcc, 0x140239d2c\njnz     short loc_140239D3E                                            ; +0xd3, 0x140239d33\ncmp     byte ptr [rbx+379Ah], 0                                        ; +0xd5, 0x140239d35\njz      short loc_140239D48                                            ; +0xdc, 0x140239d3c\ntest    sil, sil                                                       ; +0xde, 0x140239d3e\njnz     short loc_140239D48                                            ; +0xe1, 0x140239d41\nxor     r8d, r8d                                                       ; +0xe3, 0x140239d43\njmp     short loc_140239D4B                                            ; +0xe6, 0x140239d46\nmov     r8b, 1                                                         ; +0xe8, 0x140239d48\nmovaps  xmm1, xmm7                                                     ; +0xeb, 0x140239d4b\nmov     rcx, rbx                                                       ; +0xee, 0x140239d4e\ncall    GJBaseGameLayer__processQueuedButtons                          ; +0xf1, 0x140239d51\nmov     r8, [rbx+3318h]                                                ; +0xf6, 0x140239d56\nmov     rax, [rbx+3320h]                                               ; +0xfd, 0x140239d5d\nmovsxd  rdx, dword ptr [rbx+3400h]                                     ; +0x104, 0x140239d64\nsub     rax, r8                                                        ; +0x10b, 0x140239d6b\nsar     rax, 4                                                         ; +0x10e, 0x140239d6e\ncmp     rdx, rax                                                       ; +0x112, 0x140239d72\njnb     short loc_140239DD9                                            ; +0x115, 0x140239d75\nmov     eax, [rbx+3ECh]                                                ; +0x117, 0x140239d77\nmov     r9d, eax                                                       ; +0x11d, 0x140239d7d\nsub     r9d, [rbx+32FCh]                                               ; +0x120, 0x140239d80\nmov     [rbx+32FCh], eax                                               ; +0x127, 0x140239d87\nmov     rax, [rbx+3320h]                                               ; +0x12d, 0x140239d8d\nsub     rax, r8                                                        ; +0x134, 0x140239d94\nsar     rax, 4                                                         ; +0x137, 0x140239d97\ncmp     rdx, rax                                                       ; +0x13b, 0x140239d9b\njnb     short loc_140239DD9                                            ; +0x13e, 0x140239d9e\nmovsxd  rax, edx                                                       ; +0x140, 0x140239da0\nadd     rax, rax                                                       ; +0x143, 0x140239da3\nmov     [r8+rax*8+8], r9d                                              ; +0x146, 0x140239da6\nxor     r9d, r9d                                                       ; +0x14b, 0x140239dab\nmov     edx, [rbx+3400h]                                               ; +0x14e, 0x140239dae\ninc     edx                                                            ; +0x154, 0x140239db4\nmov     [rbx+3400h], edx                                               ; +0x156, 0x140239db6\nmov     r8, [rbx+3318h]                                                ; +0x15c, 0x140239dbc\nmov     rcx, [rbx+3320h]                                               ; +0x163, 0x140239dc3\nsub     rcx, r8                                                        ; +0x16a, 0x140239dca\nmovsxd  rax, edx                                                       ; +0x16d, 0x140239dcd\nsar     rcx, 4                                                         ; +0x170, 0x140239dd0\ncmp     rax, rcx                                                       ; +0x174, 0x140239dd4\njb      short loc_140239DA0                                            ; +0x177, 0x140239dd7\nmov     ecx, [rbx+86Ch]                                                ; +0x179, 0x140239dd9\ntest    ecx, ecx                                                       ; +0x17f, 0x140239ddf\njle     short loc_140239DFF                                            ; +0x181, 0x140239de1\nsub     dword ptr [rbx+870h], 1                                        ; +0x183, 0x140239de3\njns     short loc_140239DFF                                            ; +0x18a, 0x140239dea\nlea     eax, [rcx-1]                                                   ; +0x18c, 0x140239dec\nmov     dword ptr [rbx+870h], 78h ; 'x'                                ; +0x18f, 0x140239def\nmov     [rbx+86Ch], eax                                                ; +0x199, 0x140239df9\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x19f, 0x140239dff\nmov     rsi, [rsp+48h+arg_8]                                           ; +0x1a4, 0x140239e04\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0x1a9, 0x140239e09\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0x1ae, 0x140239e0e\nadd     rsp, 40h                                                       ; +0x1b3, 0x140239e13\npop     rdi                                                            ; +0x1b7, 0x140239e17\nretn                                                                   ; +0x1b8, 0x140239e18", "xrefs": ["GJBaseGameLayer::update @ 0x140238090", "<???> @ 0x1406ce1d8"], "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"}