Function at 0x2100c73c0
Capabilities:
Check for time delay via gettickcount
Read file on windows
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x108
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov eax, dword [rax - 0x2cc8]
mov dword [rsp + 0x78], eax
lea r12, [rsp + 0x78]
mov rbx, rcx
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov rcx, r12
mov eax, dword [rax - 0x2cc4]
mov dword [rsp + 0x7c], eax
call method.tmp_pathbuf.c_get__
mov rcx, r12
mov rsi, rax
call method.tmp_pathbuf.c_get__
mov qword [rsp + 0x50], rax
test byte [0x210273880], 1
jne 0x2100c7d00
mov r12, qword [rbx + 0x18]
lea r15, [rsp + 0x64]
lea rbp, [rsp + 0x60]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x40], rax
nop dword [rax]
call sym.GetTickCount
mov rdx, qword [rbx + 8]
mov rcx, r15
mov dword [r12 + 0xdc], eax
call sym.bytes_available_unsigned_int__void_
test al, al
je 0x2100c7476
mov edx, dword [rsp + 0x64]
test edx, edx
setne al
mov rdx, qword [rbx + 0x18]
mov rcx, qword [rbx + 8]
mov r9, rbp
mov r8d, 0x8000
mov byte [rdx + 0xe0], al
mov rdx, rsi
mov qword [rsp + 0x20], 0
call sym.ReadFile
test eax, eax
je 0x2100c7ba0
mov r12, qword [rbx + 0x18]
cmp byte [r12 + 0x12a], 0
jne 0x2100c7bad
cmp byte [r12 + 0xc8], 0
mov eax, dword [rsp + 0x60]
mov qword [rsp + 0x68], rax
mov rdi, rax
je 0x2100c7768
test eax, eax
je 0x2100c7cc8
xor edi, edi
xor r14d, r14d
xor eax, eax
xor r13d, r13d
jmp 0x2100c750d
cmp dl, 0x30
je 0x2100c7739
xor eax, eax
cmp dl, 7
mov r8d, dword [rsp + 0x60]
setne al
add eax, eax
cmp r8d, edi
jbe 0x2100c7553
mov edx, edi
mov r12d, edi
add edi, 1
movzx edx, byte [rsi + rdx]
cmp dl, 0x1b
je 0x2100c7750
cmp eax, 1
je 0x2100c7730
cmp eax, 2
je 0x2100c74f0
cmp eax, 3
jne 0x2100c7b20
cmp dl, 0x3b
je 0x2100c7739
mov r8d, dword [rsp + 0x60]
cmp dl, 7
cmove eax, r13d
cmp r8d, edi
ja 0x2100c750d
test r8d, r8d
je 0x2100c7cbe
xor edi, edi
xor r12d, r12d
xor eax, eax
mov edx, edi
lea ecx, [rdi + 1]
movzx edx, byte [rsi + rdx]
cmp dl, 0x1b
je 0x2100c75af
nop dword [rax]
cmp eax, 1
je 0x2100c7a78
cmp eax, 2
jne 0x2100c7a40
cmp dl, 0x3e
je 0x2100c7a81
mov r8d, dword [rsp + 0x60]
xor eax, eax
cmp r8d, ecx
jbe 0x2100c75c1
mov edi, ecx
mov edx, edi
lea ecx, [rdi + 1]
movzx edx, byte [rsi + rdx]
cmp dl, 0x1b
jne 0x2100c7578
mov r8d, dword [rsp + 0x60]
mov r12d, edi
mov eax, 1
cmp r8d, ecx
ja 0x2100c759f
test r8d, r8d
je 0x2100c7cbe
xor edi, edi
test eax, eax
je 0x2100c75f1
cmp eax, 1
jne 0x2100c7a90
mov eax, edi
cmp byte [rsi + rax], 0x5d
je 0x2100c760f
nop dword [rax]
add edi, 1
cmp edi, dword [rsp + 0x60]
jae 0x2100c7621
mov eax, edi
cmp byte [rsi + rax], 0x1b
jne 0x2100c75e8
lea eax, [rdi + 1]
mov r12d, edi
cmp dword [rsp + 0x60], eax
jbe 0x2100c7621
mov edx, eax
mov edi, eax
cmp byte [rsi + rdx], 0x5d
jne 0x2100c75e8
mov r8d, dword [rsp + 0x60]
mov eax, 2
add edi, 1
cmp r8d, edi
ja 0x2100c75cc
mov rax, qword [rbx + 0x18]
mov ecx, dword [rax + 0xd8]
cmp ecx, 0xfde9
je 0x2100c7ad0
mov rdi, qword [rsp + 0x50]
lea rax, [0x2102ff798]
mov qword [rsp + 0x20], rsi
mov r9d, 0xfde9
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x68]
lea r8, [rsp + 0xc0]
mov qword [rsp + 0xc0], 0x8000
mov rdx, rdi
mov qword [rsp + 0x28], rax
call sym.convert_mb_str_unsigned_int__char__unsigned_long__unsigned_int__char_const__unsigned_long___mbstate_t___clone_constprop0_
mov rax, qword [rsp + 0xc0]
mov dword [rsp + 0x60], eax
mov edx, eax
and eax, 0xffffffff
mov qword [rsp + 0x68], rax
test edx, edx
je 0x2100c7a30
mov r8, qword [rsp + 0x68]
lea r12, [rsp + 0xc0]
jmp 0x2100c76d7
mov eax, dword [rsp + 0xc0]
add rdi, rax
mov eax, dword [rsp + 0x60]
sub eax, dword [rsp + 0xc0]
mov r8d, eax
mov dword [rsp + 0x60], eax
mov qword [rsp + 0x68], r8
je 0x2100c7a30
mov qword [rsp + 0x20], 0
mov rcx, qword [rbx]
mov r9, r12
mov rdx, rdi
call sym.WriteFile
test eax, eax
jne 0x2100c76b0
lea rax, [0x210273880]
test byte [rax], 1
je 0x2100c7a30
lea r9, str.WriteFile_for_forwarding_failed___E
lea r8, str.static_DWORD_fhandler_pty_master::pty_master_fwd_thread_const_fhandler_pty_master::master_fwd_thread_param_t_
mov edx, 0x100
lea rcx, [0x210273880]
call method.strace.prntf_unsigned_int__char_const__char_const__..._
mov r12, qword [rbx + 0x18]
jmp 0x2100c7450
cmp dl, 0x5d
jne 0x2100c7542
mov r8d, dword [rsp + 0x60]
add eax, 1
jmp 0x2100c7508
mov r8d, dword [rsp + 0x60]
mov r14d, r12d
mov eax, 1
jmp 0x2100c7508
mov rcx, qword [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
xor r14d, r14d
mov edx, dword [r12 + 0x114]
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xb0], 0
mov qword [rsp + 0xb8], 0
call method.pinfo.init_int__unsigned_int__void_
mov rax, qword [rsp + 0xa8]
test rax, rax
je 0x2100c77f4
mov r14d, dword [rax + 0x14]
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100c780b
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
mov rax, qword [0x21024fce8]
lea r12, [rsp + 0xc0]
xor r9d, r9d
xor r8d, r8d
mov rcx, r12
mov edx, dword [rax + 8]
mov qword [rsp + 0xc0], 0
mov qword [rsp + 0xc8], 0
mov qword [rsp + 0xd0], 0
mov qword [rsp + 0xd8], 0
mov qword [rsp + 0xe0], 0
mov qword [rsp + 0xe8], 0
mov qword [rsp + 0xf0], 0
mov qword [rsp + 0xf8], 0
call method.pinfo.init_int__unsigned_int__void_
mov r13d, dword [rbx + 0x20]
test r13d, r13d
jne 0x2100c78a9
mov rax, qword [rsp + 0xe8]
test rax, rax
je 0x2100c7ce1
mov r13d, dword [rax + 0x14]
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100c78c0
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
call sym.GetConsoleCP
mov rcx, qword [0x2102ff780]
mov edx, eax
test rcx, rcx
je 0x2100c78e0
mov dword [rsp + 0x48], eax
call sym.ReleaseMutex
mov edx, dword [rsp + 0x48]
test r14d, r14d
je 0x2100c78fd
test r13d, r13d
setne r8b
test edx, edx
je 0x2100c7bf8
test r8b, r8b
jne 0x2100c7bf8
call sym.GetConsoleOutputCP
mov r14d, eax
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100c7916
call sym.ReleaseMutex
mov rax, qword [rbx + 0x18]
mov r13, rsi
mov ecx, dword [rax + 0xd8]
cmp ecx, r14d
je 0x2100c796f
lea rax, [0x2102ff798]
mov r13, qword [rsp + 0x50]
mov qword [rsp + 0x20], rsi
mov r9d, r14d
mov qword [rsp + 0x30], rax
mov eax, edi
lea r8, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov rdx, r13
mov qword [rsp + 0x70], 0x8000
call sym.convert_mb_str_unsigned_int__char__unsigned_long__unsigned_int__char_const__unsigned_long___mbstate_t___clone_constprop0_
mov rax, qword [rsp + 0x70]
mov dword [rsp + 0x60], eax
and eax, 0xffffffff
mov qword [rsp + 0x68], rax
mov rcx, qword [rbx + 0x10]
mov edx, dword [0x21024fa70]
lea rdi, [rsp + 0x68]
call sym.WaitForSingleObject
mov eax, dword [rsp + 0x60]
test eax, eax
jne 0x2100c79aa
jmp 0x2100c79e3
mov eax, dword [rsp + 0x60]
add r13, qword [rsp + 0x68]
sub eax, dword [rsp + 0x68]
mov ecx, eax
mov dword [rsp + 0x60], eax
mov qword [rsp + 0x68], rcx
je 0x2100c79e3
mov rax, qword [rbx + 0x18]
mov rcx, qword [rbx]
mov r9d, 1
mov r8, rdi
mov dword [rsp + 0x28], 0
mov rdx, r13
mov qword [rsp + 0x20], rax
call method.fhandler_pty_common.process_opost_output_void__void_const__long__bool__tty__bool_
test eax, eax
jne 0x2100c7990
lea rax, [0x210273880]
test byte [rax], 1
jne 0x2100c7c80
mov rcx, qword [rbx + 0x10]
call sym.ReleaseMutex
cmp byte [rsp + 0xd8], 0
je 0x2100c7a09
cmp qword [rsp + 0xe8], 0
je 0x2100c7a09
mov rcx, r12
call method.pinfo.release__
cmp byte [rsp + 0x98], 0
je 0x2100c7a30
cmp qword [rsp + 0xa8], 0
je 0x2100c7a30
mov rcx, qword [rsp + 0x40]
call method.pinfo.release__
nop dword [rax + rax]
mov r12, qword [rbx + 0x18]
jmp 0x2100c7450
cmp eax, 3
jne 0x2100c7a5d
lea r9d, [rdx - 0x30]
cmp r9b, 9
jbe 0x2100c7ac0
cmp dl, 0x3b
je 0x2100c7ac0
cmp dl, 0x6d
je 0x2100c7c40
mov r8d, dword [rsp + 0x60]
xor eax, eax
cmp r8d, ecx
jbe 0x2100c75c1
mov edi, ecx
jmp 0x2100c75a1
cmp dl, 0x5b
jne 0x2100c7593
mov r8d, dword [rsp + 0x60]
add eax, 1
jmp 0x2100c7a64
cmp eax, 2
je 0x2100c7ae0
cmp eax, 3
jne 0x2100c7d48
mov eax, edi
cmp byte [rsi + rax], 0x3f
jne 0x2100c75e8
mov r8d, dword [rsp + 0x60]
mov eax, 4
jmp 0x2100c7619
mov r8d, dword [rsp + 0x60]
jmp 0x2100c7a64
mov edx, dword [rsp + 0x60]
mov rdi, rsi
jmp 0x2100c768f
mov eax, edi
mov r8d, dword [rsp + 0x60]
cmp byte [rsi + rax], 0x3b
je 0x2100c7b11
movsx eax, byte [rsi + rax]
sub eax, 0x30
cmp eax, 9
ja 0x2100c75e8
add edi, 1
cmp r8d, edi
jbe 0x2100c7621
mov eax, edi
cmp byte [rsi + rax], 0x3b
jne 0x2100c7aed
mov eax, 3
jmp 0x2100c7619
cmp dl, 7
jne 0x2100c7542
cmp eax, 4
jne 0x2100c7542
movsxd rcx, r14d
mov edx, edi
mov r9d, 0x1e
add rcx, rsi
sub edx, r14d
lea r8, str._bincygwin_console_helper.exe
mov qword [rsp + 0x48], rcx
call sym.msys_2.0.dll_memmem
mov rcx, qword [rsp + 0x48]
test rax, rax
je 0x2100c7ca0
mov r8d, r12d
mov edx, edi
not r8d
add rdx, rsi
add r8d, dword [rsp + 0x60]
call sym.msys_2.0.dll_memmove
mov eax, dword [rsp + 0x60]
lea r8d, [r14 + rax - 1]
sub r8d, r12d
mov eax, r8d
mov dword [rsp + 0x60], r8d
mov qword [rsp + 0x68], rax
xor eax, eax
jmp 0x2100c7508
test byte [0x210273880], 1
jne 0x2100c7d24
mov edx, dword [rsp + 0x78]
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov dword [rax - 0x2cc8], edx
mov edx, dword [rsp + 0x7c]
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov dword [rax - 0x2cc4], edx
xor eax, eax
add rsp, 0x108
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x48], edx
mov byte [rsp + 0x5f], r8b
call sym.FreeConsole
mov ecx, r14d
call sym.AttachConsole
call sym.GetConsoleOutputCP
mov r14d, eax
call sym.FreeConsole
mov edx, dword [rsp + 0x48]
test edx, edx
je 0x2100c7c2e
movzx r8d, byte [rsp + 0x5f]
test r8b, r8b
jne 0x2100c7caa
xor ecx, ecx
call sym.init_console_handler_bool_
jmp 0x2100c7905
mov edx, ecx
sub r8d, edi
movsxd rcx, r12d
add rcx, rsi
sub r8d, 1
add rdx, rsi
call sym.msys_2.0.dll_memmove
mov eax, dword [rsp + 0x60]
mov ecx, r12d
lea r8d, [r12 + rax - 1]
sub r8d, edi
mov eax, r8d
mov dword [rsp + 0x60], r8d
mov qword [rsp + 0x68], rax
xor eax, eax
jmp 0x2100c7a64
lea r9, str.WriteFile_for_forwarding_failed___E
lea r8, str.static_DWORD_fhandler_pty_master::pty_master_fwd_thread_const_fhandler_pty_master::master_fwd_thread_param_t_
mov edx, 0x100
mov rcx, rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c79e3
mov r8d, dword [rsp + 0x60]
jmp 0x2100c7508
mov ecx, r13d
call sym.AttachConsole
xor ecx, ecx
call sym.init_console_handler_bool_
jmp 0x2100c7905
mov r12, qword [rbx + 0x18]
nop word [rax + rax]
mov ecx, dword [r12 + 0xd8]
cmp ecx, 0xfde9
jne 0x2100c7637
jmp 0x2100c7450
mov rax, qword [0x21024fce8]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov ecx, dword [rax + 0x14]
call method.fhandler_pty_common.get_console_process_id_unsigned_int__bool__bool__bool_
mov r13d, eax
jmp 0x2100c78a9
lea r9, str.Started.
lea r8, str.static_DWORD_fhandler_pty_master::pty_master_fwd_thread_const_fhandler_pty_master::master_fwd_thread_param_t_
mov edx, 0x100
lea rcx, [0x210273880]
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c742e
lea r9, str.ReadFile_for_forwarding_failed___E
lea r8, str.static_DWORD_fhandler_pty_master::pty_master_fwd_thread_const_fhandler_pty_master::master_fwd_thread_param_t_
mov edx, 0x100
lea rcx, [0x210273880]
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c7bad
cmp eax, 4
jne 0x2100c7daf
mov eax, edi
movzx eax, byte [rsi + rax]
cmp al, 0x1b
je 0x2100c7da0
cmp al, 7
jne 0x2100c75e8
sub r8d, 1
lea edx, [rdi + 1]
movsxd rcx, r12d
add rcx, rsi
add rdx, rsi
sub r8d, edi
call sym.msys_2.0.dll_memmove
mov eax, dword [rsp + 0x60]
lea eax, [r12 + rax - 1]
sub eax, edi
mov ecx, eax
mov dword [rsp + 0x60], eax
mov qword [rsp + 0x68], rcx
cmp r12d, eax
jae 0x2100c7621
mov edi, r12d
jmp 0x2100c75f1
mov r8d, dword [rsp + 0x60]
mov eax, 5
jmp 0x2100c7619
cmp eax, 5
jne 0x2100c75e8
mov eax, edi
cmp byte [rsi + rax], 0x5c
je 0x2100c7d5f
add edi, 1
cmp dword [rsp + 0x60], edi
ja 0x2100c75f1
jmp 0x2100c7621