Function at 0x1401220a0
Capabilities:
Read file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x178
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0xe0], xmm6
mov qword [rbp + 0xd8], 0xfffffffffffffffe
mov rsi, rcx
lea rcx, [rbp - 0x40]
call fcn.140116c40
mov rdx, qword [rbp - 0x40]
mov rax, qword [rbp - 0x30]
cmp rax, 2
jne 0x1401220f7
mov qword [rsi + 8], rdx
mov qword [rsi], 0
jmp 0x140122aa0
mov qword [rbp - 0x48], rsi
mov rbx, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x28]
mov r15, qword [rbp - 0x20]
mov rdi, qword [rbp - 0x18]
mov r14, qword [rbp - 0x10]
mov rsi, qword [rbp - 8]
mov qword [rbp - 0x40], rdx
mov qword [rbp - 0x38], rbx
mov qword [rbp - 0x28], rcx
mov qword [rbp - 0x18], rdi
mov qword [rbp + 0xc8], rsi
mov qword [rbp - 8], rsi
mov qword [rbp - 0x30], 0
test rax, rax
je 0x140122140
call sub.kernel32.dll_CloseHandle
mov qword [rbp + 0x78], 1
xorps xmm0, xmm0
movups xmmword [rbp + 0x80], xmm0
mov qword [rbp + 0x60], 1
movups xmmword [rbp + 0x68], xmm0
mov qword [rbp - 0x20], 0
mov qword [rbp - 0x10], 0
test r15, r15
je 0x1401223ee
test r14, r14
je 0x14012263b
mov byte [rbp + 0xd7], 1
lea rcx, [rbp + 0x90]
lea r8, [rbp + 0x78]
mov rdx, rdi
call fcn.140122f30
mov rbx, qword [rbp + 0x90]
mov rax, qword [rbp + 0xb0]
cmp rax, 3
je 0x140122b3c
mov rcx, qword [rbp + 0xb8]
movups xmm0, xmmword [rbp + 0x98]
movups xmmword [rbp + 8], xmm0
mov rdx, qword [rbp + 0xa8]
mov qword [rbp + 0x18], rdx
mov qword [rbp], rbx
mov qword [rbp + 0x20], rax
mov qword [rbp + 0x28], rcx
lea rcx, [rbp + 0x90]
lea r8, [rbp + 0x60]
mov rdx, qword [rbp + 0xc8]
call fcn.140122f30
mov rbx, qword [rbp + 0x90]
mov rax, qword [rbp + 0xb0]
cmp rax, 3
je 0x140122956
mov rcx, qword [rbp + 0xb8]
movups xmm0, xmmword [rbp + 0x98]
movups xmmword [rbp + 0x38], xmm0
mov rdx, qword [rbp + 0xa8]
mov qword [rbp + 0x48], rdx
mov qword [rbp + 0x30], rbx
mov qword [rbp + 0x50], rax
mov qword [rbp + 0x58], rcx
mov rax, qword [rbp + 8]
mov rcx, qword [rbp + 0x38]
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rcx
lea rsi, [rbp - 0x58]
lea rdi, [rbp + 0x90]
lea r14, [rbp + 0x30]
mov r15, qword [sym.imp.kernel32.dll_GetOverlappedResult]
mov r13, qword [sym.imp.kernel32.dll_GetLastError]
mov r12, rbp
nop word cs:[rax + rax]
mov ecx, 2
mov rdx, rsi
xor r8d, r8d
mov r9d, 0xffffffff
call sub.kernel32.dll_WaitForMultipleObjects
cmp eax, 1
je 0x1401222e0
test eax, eax
jne 0x14012293d
mov rax, qword [rbp + 0x20]
test rax, rax
je 0x140122380
cmp eax, 1
jne 0x140122363
mov rcx, qword [rbp]
mov rdx, qword [rbp + 0x10]
mov dword [rbp + 0x90], 0
mov r8, rdi
mov r9d, 1
call r15
test eax, eax
je 0x1401223c7
mov eax, dword [rbp + 0x90]
jmp 0x140122367
mov rax, qword [rbp + 0x50]
test rax, rax
je 0x140122339
cmp eax, 1
jne 0x14012231c
mov rcx, qword [rbp + 0x30]
mov rdx, qword [rbp + 0x40]
mov dword [rbp + 0x90], 0
mov r8, rdi
mov r9d, 1
call r15
test eax, eax
je 0x1401223aa
mov eax, dword [rbp + 0x90]
jmp 0x140122320
mov rax, qword [rbp + 0x58]
mov qword [rbp + 0x50], 0
mov rcx, qword [rbp + 0x48]
add qword [rcx + 0x10], rax
test rax, rax
je 0x140122925
mov rcx, rdi
mov rdx, r14
call fcn.1401231b0
cmp byte [rbp + 0x90], 0
jne 0x14012291c
test byte [rbp + 0x91], 1
jne 0x140122270
jmp 0x140122925
mov rax, qword [rbp + 0x28]
mov qword [rbp + 0x20], 0
mov rcx, qword [rbp + 0x18]
add qword [rcx + 0x10], rax
test rax, rax
je 0x14012292f
mov rcx, rdi
mov rdx, r12
call fcn.1401231b0
cmp byte [rbp + 0x90], 0
jne 0x14012291c
test byte [rbp + 0x91], 1
jne 0x140122270
jmp 0x14012292f
call r13
cmp eax, 0x6d
je 0x1401223e0
mov ebx, eax
mov eax, 0
cmp ebx, 0x26
je 0x140122320
jmp 0x140122945
call r13
cmp eax, 0x6d
je 0x1401223e7
mov ebx, eax
mov eax, 0
cmp ebx, 0x26
je 0x140122367
jmp 0x140122945
xor eax, eax
jmp 0x140122320
xor eax, eax
jmp 0x140122367
test r14, r14
je 0x14012296e
mov r13d, 1
xorps xmm6, xmm6
mov r12, qword [sym.imp.kernel32.dll_SleepEx]
xor edi, edi
xor r15d, r15d
xor eax, eax
mov qword [rbp + 0xc0], rax
jmp 0x140122439
call qword [sym.imp.kernel32.dll_GetLastError]
mov r14d, eax
mov ecx, r14d
call fcn.140109030
cmp al, 0x23
jne 0x1401228a0
cmp r15, rdi
jne 0x14012245c
mov r8d, 0x20
lea rcx, [rbp + 0x60]
mov rdx, rdi
call fcn.140151aa0
mov r15, qword [rbp + 0x70]
mov r13, qword [rbp + 0x60]
mov rdi, qword [rbp + 0x68]
lea rsi, [r15 + r13]
mov rbx, rdi
sub rbx, r15
mov r8, rbx
sub r8, qword [rbp + 0xc0]
jb 0x140122b21
je 0x14012248a
mov rax, qword [rbp + 0xc0]
lea rcx, [rsi + rax]
xor edx, edx
call fcn.1401407b0
mov eax, 0xffffffff
cmp rbx, rax
mov r8d, 0xffffffff
cmovb r8, rbx
mov dword [rbp + 0x30], 0
movaps xmmword [rbp + 0x90], xmm6
mov qword [rbp + 0xa0], 0
lea rax, [rbp + 0x30]
mov qword [rbp + 0xa8], rax
lea rax, [0x1401168e0]
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp + 0xc8]
mov rdx, rsi
lea r9, [rbp + 0x90]
call qword [sym.imp.kernel32.dll_ReadFileEx]
test eax, eax
je 0x140122420
nop dword [rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call r12
cmp dword [rbp + 0x30], 1
jne 0x1401224f0
mov r14d, dword [rbp + 0x34]
test r14d, r14d
jne 0x140122429
mov eax, dword [rbp + 0x38]
cmp rbx, rax
mov rcx, rax
cmova rcx, rbx
mov qword [rbp + 0xc0], rcx
test rax, rax
je 0x1401228f3
cmp rbx, rax
jb 0x140122b7c
sub qword [rbp + 0xc0], rax
add r15, rax
mov qword [rbp + 0x70], r15
mov rax, rdi
or rax, r15
jne 0x140122439
movaps xmmword [rbp + 0x40], xmm6
movaps xmmword [rbp + 0x30], xmm6
mov rsi, rbp
jmp 0x140122576
call qword [sym.imp.kernel32.dll_GetLastError]
mov r14d, eax
mov ecx, r14d
call fcn.140109030
cmp al, 0x23
jne 0x1401228a0
mov dword [rbp], 0
movaps xmmword [rbp + 0x90], xmm6
mov qword [rbp + 0xa0], 0
mov qword [rbp + 0xa8], rsi
lea rax, [0x1401168e0]
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp + 0xc8]
lea rdx, [rbp + 0x30]
mov r8d, 0x20
lea r9, [rbp + 0x90]
call qword [sym.imp.kernel32.dll_ReadFileEx]
test eax, eax
je 0x14012255d
nop word cs:[rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call r12
cmp dword [rbp], 1
jne 0x1401225d0
mov r14d, dword [rbp + 4]
test r14d, r14d
jne 0x140122566
mov ebx, dword [rbp + 8]
test rbx, rbx
je 0x1401228f3
cmp ebx, 0x21
jae 0x140122bac
lea rcx, [rbp + 0x60]
xor edx, edx
mov r8, rbx
call fcn.140151aa0
mov r13, qword [rbp + 0x60]
mov rdi, qword [rbp + 0x68]
mov r15, qword [rbp + 0x70]
lea rcx, [r15 + r13]
lea rdx, [rbp + 0x30]
mov r8, rbx
call fcn.14013fb40
add r15, rbx
mov qword [rbp + 0x70], r15
jmp 0x140122439
mov qword [rbp + 0xc8], rdi
mov r13d, 1
xorps xmm6, xmm6
mov r12, qword [sym.imp.kernel32.dll_SleepEx]
xor edi, edi
xor r15d, r15d
xor eax, eax
mov qword [rbp + 0xc0], rax
jmp 0x140122689
call qword [sym.imp.kernel32.dll_GetLastError]
mov r14d, eax
mov ecx, r14d
call fcn.140109030
cmp al, 0x23
jne 0x1401228e7
cmp r15, rdi
jne 0x1401226b2
mov r8d, 0x20
lea rcx, [rbp + 0x78]
mov rdx, rdi
call fcn.140151aa0
mov r15, qword [rbp + 0x88]
mov r13, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x80]
lea rsi, [r15 + r13]
mov rbx, rdi
sub rbx, r15
mov r8, rbx
sub r8, qword [rbp + 0xc0]
jb 0x140122b06
je 0x1401226e0
mov rax, qword [rbp + 0xc0]
lea rcx, [rsi + rax]
xor edx, edx
call fcn.1401407b0
mov eax, 0xffffffff
cmp rbx, rax
mov r8d, 0xffffffff
cmovb r8, rbx
mov dword [rbp + 0x30], 0
movaps xmmword [rbp + 0x90], xmm6
mov qword [rbp + 0xa0], 0
lea rax, [rbp + 0x30]
mov qword [rbp + 0xa8], rax
lea rax, [0x1401168e0]
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp + 0xc8]
mov rdx, rsi
lea r9, [rbp + 0x90]
call qword [sym.imp.kernel32.dll_ReadFileEx]
test eax, eax
je 0x140122670
nop word cs:[rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call r12
cmp dword [rbp + 0x30], 1
jne 0x140122750
mov r14d, dword [rbp + 0x34]
test r14d, r14d
jne 0x140122679
mov eax, dword [rbp + 0x38]
cmp rbx, rax
mov rcx, rax
cmova rcx, rbx
mov qword [rbp + 0xc0], rcx
test rax, rax
je 0x1401228f3
cmp rbx, rax
jb 0x140122b94
sub qword [rbp + 0xc0], rax
add r15, rax
mov qword [rbp + 0x88], r15
mov rax, rdi
or rax, r15
jne 0x140122689
movaps xmmword [rbp + 0x40], xmm6
movaps xmmword [rbp + 0x30], xmm6
mov rsi, qword [rbp + 0xc8]
mov rdi, rbp
jmp 0x1401227e0
call qword [sym.imp.kernel32.dll_GetLastError]
mov r14d, eax
mov ecx, r14d
call fcn.140109030
cmp al, 0x23
jne 0x140122abb
mov dword [rbp], 0
movaps xmmword [rbp + 0x90], xmm6
mov qword [rbp + 0xa0], 0
mov qword [rbp + 0xa8], rdi
lea rax, [0x1401168e0]
mov qword [rsp + 0x20], rax
mov rcx, rsi
lea rdx, [rbp + 0x30]
mov r8d, 0x20
lea r9, [rbp + 0x90]
call qword [sym.imp.kernel32.dll_ReadFileEx]
test eax, eax
je 0x1401227c7
nop word [rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call r12
cmp dword [rbp], 1
jne 0x140122830
mov r14d, dword [rbp + 4]
test r14d, r14d
jne 0x1401227d0
mov ebx, dword [rbp + 8]
test rbx, rbx
je 0x1401228fa
cmp ebx, 0x21
jae 0x140122bc2
lea rcx, [rbp + 0x78]
xor edx, edx
mov r8, rbx
call fcn.140151aa0
mov r13, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x80]
mov r15, qword [rbp + 0x88]
lea rcx, [r15 + r13]
lea rdx, [rbp + 0x30]
mov r8, rbx
call fcn.14013fb40
add r15, rbx
mov qword [rbp + 0x88], r15
jmp 0x140122689
movzx eax, al
cmp eax, 0xb
je 0x1401228f3
shl r14, 0x20
or r14, 2
mov qword [rbp + 0x90], r14
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x1401dae9c]
lea r9, fcn.14010e680
lea r8, [rbp + 0x90]
mov edx, 0x2b
call fcn.14014e620
jmp 0x140122bd6
movzx eax, al
cmp eax, 0xb
jne 0x140122ac7
mov rsi, qword [rbp + 0xc8]
mov rcx, rsi
call sub.kernel32.dll_CloseHandle
mov rcx, qword [rbp - 0x28]
cmp qword [rbp - 0x30], 0
mov qword [rbp - 0x30], 0
je 0x140122976
call sub.kernel32.dll_CloseHandle
jmp 0x140122976
mov rbx, qword [rbp + 0x98]
jmp 0x14012294d
mov rcx, rbp
call fcn.1401232e0
jmp 0x140122938
lea rcx, [rbp + 0x30]
call fcn.1401232e0
mov rbx, rax
jmp 0x14012294d
call qword [sym.imp.kernel32.dll_GetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
lea rcx, [rbp + 0x30]
call fcn.140123040
mov byte [rbp + 0xd7], 0
mov rcx, rbp
call fcn.140123040
test rbx, rbx
jne 0x140122b48
mov qword [rbp - 0x30], 0
mov rsi, qword [rbp - 0x40]
mov rcx, rsi
mov edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
test eax, eax
je 0x1401229e6
call qword [sym.imp.kernel32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov rcx, qword [rbp - 0x48]
mov qword [rcx + 8], rax
mov qword [rcx], 0
mov rdx, qword [rbp + 0x68]
test rdx, rdx
je 0x1401229c1
mov rcx, qword [rbp + 0x60]
not rdx
shr rdx, 0x3f
call fcn.140004990
mov rdx, qword [rbp + 0x80]
test rdx, rdx
je 0x140122a6f
mov rcx, qword [rbp + 0x78]
not rdx
shr rdx, 0x3f
call fcn.140004990
jmp 0x140122a6f
mov dword [rbp + 0x90], 0
lea rdx, [rbp + 0x90]
mov rcx, rsi
call qword [sym.imp.kernel32.dll_GetExitCodeProcess]
test eax, eax
je 0x14012298b
mov eax, dword [rbp + 0x90]
mov rcx, qword [rbp + 0x88]
mov qword [rbp + 0xa0], rcx
movups xmm0, xmmword [rbp + 0x78]
movaps xmmword [rbp + 0x90], xmm0
mov rcx, qword [rbp + 0x70]
mov qword [rbp + 0xb8], rcx
movups xmm1, xmmword [rbp + 0x60]
movups xmmword [rbp + 0xa8], xmm1
mov rdx, qword [rbp - 0x48]
movups xmmword [rdx], xmm0
mov rcx, qword [rbp + 0xb0]
mov qword [rdx + 0x20], rcx
mov rcx, qword [rbp + 0xb8]
mov qword [rdx + 0x28], rcx
mov rcx, qword [rbp + 0xa0]
mov qword [rdx + 0x10], rcx
mov rcx, qword [rbp + 0xa8]
mov qword [rdx + 0x18], rcx
mov dword [rdx + 0x30], eax
mov rcx, rsi
call sub.kernel32.dll_CloseHandle
mov rcx, qword [rbp - 0x38]
call sub.kernel32.dll_CloseHandle
cmp qword [rbp - 0x20], 0
je 0x140122a90
mov rcx, qword [rbp - 0x18]
call sub.kernel32.dll_CloseHandle
cmp qword [rbp - 0x10], 0
je 0x140122aa0
mov rcx, qword [rbp - 8]
call sub.kernel32.dll_CloseHandle
movaps xmm6, xmmword [rbp + 0xe0]
add rsp, 0x178
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
movzx eax, al
cmp eax, 0xb
je 0x1401228fa
shl r14, 0x20
or r14, 2
mov qword [rbp + 0x90], r14
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x1401dae9c]
lea r9, fcn.14010e680
lea r8, [rbp + 0x90]
mov edx, 0x2b
call fcn.14014e620
jmp 0x140122bd6
lea r8, str.library_std_srcio_readbuf.rs
mov rcx, qword [rbp + 0xc0]
mov rdx, rbx
call fcn.14014e480
jmp 0x140122bd6
lea r8, str.library_std_srcio_readbuf.rs
mov rcx, qword [rbp + 0xc0]
mov rdx, rbx
call fcn.14014e480
jmp 0x140122bd6
mov rcx, qword [rbp + 0xc8]
call sub.kernel32.dll_CloseHandle
mov qword [rbp + 0x90], rbx
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x1401dae9c]
lea r9, fcn.14010e680
lea r8, [rbp + 0x90]
mov edx, 0x2b
call fcn.14014e620
jmp 0x140122bd6
lea r8, str.library_std_srcio_readbuf.rs
mov rcx, qword [rbp + 0xc0]
mov rdx, rbx
call fcn.14014e490
jmp 0x140122bd6
lea r8, str.library_std_srcio_readbuf.rs
mov rcx, qword [rbp + 0xc0]
mov rdx, rbx
call fcn.14014e490
jmp 0x140122bd6
lea r8, [0x1401d7558]
mov edx, 0x20
mov rcx, rbx
call fcn.14014e490
jmp 0x140122bd6
lea r8, [0x1401d7558]
mov edx, 0x20
mov rcx, rbx
call fcn.14014e490
ud2