Function at 0x1008f590
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x128
movaps xmmword [rsp + 0x110], xmm6
mov rbp, rdx
mov r12, rcx
mov rcx, qword [rdx + 0x18]
cmp qword [rdx + 0x10], 0
mov qword [rdx + 0x10], 0
je 0x1008f5c9
call sub.kernel32.dll_CloseHandle
mov qword [rsp + 0x70], 1
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
mov qword [rsp + 0x88], 1
movups xmmword [rsp + 0x90], xmm0
mov rbx, qword [rbp + 0x28]
cmp qword [rbp + 0x20], 0
mov rax, qword [rbp + 0x30]
mov qword [rbp + 0x20], 0
mov rdi, qword [rbp + 0x38]
mov qword [rbp + 0x30], 0
je 0x1008f8cc
test rax, rax
je 0x1008fb4e
lea rcx, [rsp + 0x30]
lea r8, [rsp + 0x70]
mov rdx, rbx
call fcn.100a07d0
mov rbx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x50]
cmp rax, 3
je 0x10090093
mov rcx, qword [rsp + 0x58]
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rsp + 0xd8], xmm0
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0xe8], rdx
mov qword [rsp + 0xd0], rbx
mov qword [rsp + 0xf0], rax
mov qword [rsp + 0xf8], rcx
lea rcx, [rsp + 0x30]
lea r8, [rsp + 0x88]
mov rdx, rdi
call fcn.100a07d0
mov rbx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x50]
cmp rax, 3
je 0x1008fea7
mov rcx, qword [rsp + 0x58]
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rsp + 0xa8], xmm0
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0xb8], rdx
mov qword [rsp + 0xa0], rbx
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xc8], rcx
mov rax, qword [rsp + 0xd8]
mov rcx, qword [rsp + 0xa8]
mov qword [rsp + 0x100], rax
mov qword [rsp + 0x108], rcx
lea r14, [rsp + 0x100]
lea rsi, [rsp + 0x30]
lea r15, [rsp + 0xa0]
lea rdi, [rsp + 0xd0]
nop dword [rax + rax]
mov ecx, 2
mov rdx, r14
xor r8d, r8d
mov r9d, 0xffffffff
call sub.kernel32.dll_WaitForMultipleObjects
cmp eax, 1
je 0x1008f7a0
test eax, eax
jne 0x1008fe8b
mov rax, qword [rsp + 0xf0]
test rax, rax
je 0x1008f85e
cmp eax, 1
jne 0x1008f835
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0xe0]
mov dword [rsp + 0x30], 0
mov r8, rsi
mov r9d, 1
call sub.kernel32.dll_GetOverlappedResult
test eax, eax
je 0x1008f8a3
mov eax, dword [rsp + 0x30]
jmp 0x1008f83d
mov rax, qword [rsp + 0xc0]
test rax, rax
je 0x1008f80f
cmp eax, 1
jne 0x1008f7e6
mov rcx, qword [rsp + 0xa0]
mov rdx, qword [rsp + 0xb0]
mov dword [rsp + 0x30], 0
mov r8, rsi
mov r9d, 1
call sub.kernel32.dll_GetOverlappedResult
test eax, eax
je 0x1008f884
mov eax, dword [rsp + 0x30]
jmp 0x1008f7ee
mov rax, qword [rsp + 0xc8]
mov qword [rsp + 0xc0], 0
mov rcx, qword [rsp + 0xb8]
add qword [rcx + 0x10], rax
test rax, rax
je 0x1008fde8
mov rcx, rsi
mov rdx, r15
call fcn.100a08a0
cmp byte [rsp + 0x30], 0
jne 0x1008fe80
test byte [rsp + 0x31], 1
jne 0x1008f720
jmp 0x1008fde8
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0xf0], 0
mov rcx, qword [rsp + 0xe8]
add qword [rcx + 0x10], rax
test rax, rax
je 0x1008fde5
mov rcx, rsi
mov rdx, rdi
call fcn.100a08a0
cmp byte [rsp + 0x30], 0
jne 0x1008fe80
test byte [rsp + 0x31], 1
jne 0x1008f720
jmp 0x1008fde5
call sub.kernel32.dll_GetLastError
cmp eax, 0x6d
je 0x1008f8be
mov ebx, eax
mov eax, 0
cmp ebx, 0x26
je 0x1008f7ee
jmp 0x1008fe92
call sub.kernel32.dll_GetLastError
cmp eax, 0x6d
je 0x1008f8c5
mov ebx, eax
mov eax, 0
cmp ebx, 0x26
je 0x1008f83d
jmp 0x1008fe92
xor eax, eax
jmp 0x1008f7ee
xor eax, eax
jmp 0x1008f83d
test rax, rax
je 0x1008febd
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x28], rbp
xorps xmm6, xmm6
lea r13, [rsp + 0x30]
lea rax, [0x10121828]
mov qword [rsp + 0x68], rax
xor r15d, r15d
xor r14d, r14d
xor ebx, ebx
jmp 0x1008f918
call sub.kernel32.dll_GetLastError
mov r12d, eax
mov ecx, r12d
call fcn.100a6480
cmp al, 0x23
jne 0x1008fdb1
cmp r14, r15
jne 0x1008f943
mov r8d, 0x20
lea rcx, [rsp + 0x88]
mov rdx, r15
call fcn.10067610
mov r15, qword [rsp + 0x90]
mov r14, qword [rsp + 0x98]
mov rsi, r15
sub rsi, r14
mov r8, rsi
sub r8, rbx
jb 0x10090065
mov rbp, qword [rsp + 0x88]
add rbp, r14
lea rcx, [rbx + rbp]
xor edx, edx
call sub.msvcrt.dll_memset
mov eax, 0xffffffff
cmp rsi, rax
mov r8d, 0xffffffff
cmovb r8, rsi
mov dword [rsp + 0xa0], 0
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x48], rax
lea rax, [0x100a07b0]
mov qword [rsp + 0x20], rax
mov rcx, rdi
mov rdx, rbp
mov r9, r13
call sub.kernel32.dll_ReadFileEx
test eax, eax
je 0x1008f900
nop word cs:[rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call sub.kernel32.dll_SleepEx
cmp dword [rsp + 0xa0], 1
jne 0x1008f9d0
mov r12d, dword [rsp + 0xa4]
test r12d, r12d
jne 0x1008f908
mov eax, dword [rsp + 0xa8]
cmp rsi, rax
mov rbx, rax
cmova rbx, rsi
test rax, rax
je 0x1008fdbd
cmp rsi, rax
jb 0x100900e4
sub rbx, rax
add r14, rax
mov qword [rsp + 0x98], r14
mov rax, r15
or rax, r14
jne 0x1008f918
movaps xmmword [rsp + 0xb0], xmm6
movaps xmmword [rsp + 0xa0], xmm6
lea rsi, [rsp + 0xd0]
jmp 0x1008fa78
call sub.kernel32.dll_GetLastError
mov r12d, eax
mov ecx, r12d
call fcn.100a6480
cmp al, 0x23
jne 0x1008fdb1
mov dword [rsp + 0xd0], 0
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], rsi
lea rax, [0x100a07b0]
mov qword [rsp + 0x20], rax
mov rcx, rdi
lea rdx, [rsp + 0xa0]
mov r8d, 0x20
mov r9, r13
call sub.kernel32.dll_ReadFileEx
test eax, eax
je 0x1008fa60
nop
mov ecx, 0xffffffff
mov edx, 1
call sub.kernel32.dll_SleepEx
cmp dword [rsp + 0xd0], 1
jne 0x1008fac0
mov r12d, dword [rsp + 0xd4]
test r12d, r12d
jne 0x1008fa68
mov r12d, dword [rsp + 0xd8]
test r12, r12
je 0x1008fdbd
cmp r12d, 0x21
jae 0x100900d0
lea rcx, [rsp + 0x88]
xor edx, edx
mov r8, r12
call fcn.10067610
mov r15, qword [rsp + 0x90]
mov r14, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x88]
add rcx, r14
lea rdx, [rsp + 0xa0]
mov r8, r12
call sub.msvcrt.dll_memcpy
add r14, r12
mov qword [rsp + 0x98], r14
jmp 0x1008f918
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x28], rbp
xorps xmm6, xmm6
lea rbp, [rsp + 0x30]
lea rax, [0x10121828]
mov qword [rsp + 0x68], rax
xor r14d, r14d
xor r13d, r13d
xor edi, edi
jmp 0x1008fb98
call sub.kernel32.dll_GetLastError
mov r12d, eax
mov ecx, r12d
call fcn.100a6480
cmp al, 0x23
jne 0x1008fdc2
cmp r13, r14
jne 0x1008fbbd
mov r8d, 0x20
lea rcx, [rsp + 0x70]
mov rdx, r14
call fcn.10067610
mov r14, qword [rsp + 0x78]
mov r13, qword [rsp + 0x80]
mov r15, r14
sub r15, r13
mov r8, r15
sub r8, rdi
jb 0x1009007c
mov rsi, qword [rsp + 0x70]
add rsi, r13
lea rcx, [rsi + rdi]
xor edx, edx
call sub.msvcrt.dll_memset
mov eax, 0xffffffff
cmp r15, rax
mov r8d, 0xffffffff
cmovb r8, r15
mov dword [rsp + 0xa0], 0
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x48], rax
lea rax, [0x100a07b0]
mov qword [rsp + 0x20], rax
mov rcx, rbx
mov rdx, rsi
mov r9, rbp
call sub.kernel32.dll_ReadFileEx
test eax, eax
je 0x1008fb80
nop dword [rax]
mov ecx, 0xffffffff
mov edx, 1
call sub.kernel32.dll_SleepEx
cmp dword [rsp + 0xa0], 1
jne 0x1008fc40
mov r12d, dword [rsp + 0xa4]
test r12d, r12d
jne 0x1008fb88
mov eax, dword [rsp + 0xa8]
cmp r15, rax
mov rdi, rax
cmova rdi, r15
test rax, rax
je 0x1008fdce
cmp r15, rax
jb 0x1009010b
sub rdi, rax
add r13, rax
mov qword [rsp + 0x80], r13
mov rax, r14
or rax, r13
jne 0x1008fb98
movaps xmmword [rsp + 0xb0], xmm6
movaps xmmword [rsp + 0xa0], xmm6
lea rsi, [rsp + 0xd0]
jmp 0x1008fce8
call sub.kernel32.dll_GetLastError
mov r12d, eax
mov ecx, r12d
call fcn.100a6480
cmp al, 0x23
jne 0x1008fdc2
mov dword [rsp + 0xd0], 0
movaps xmmword [rsp + 0x30], xmm6
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], rsi
lea rax, [0x100a07b0]
mov qword [rsp + 0x20], rax
mov rcx, rbx
lea rdx, [rsp + 0xa0]
mov r8d, 0x20
mov r9, rbp
call sub.kernel32.dll_ReadFileEx
test eax, eax
je 0x1008fcd0
nop
mov ecx, 0xffffffff
mov edx, 1
call sub.kernel32.dll_SleepEx
cmp dword [rsp + 0xd0], 1
jne 0x1008fd30
mov r12d, dword [rsp + 0xd4]
test r12d, r12d
jne 0x1008fcd8
mov r12d, dword [rsp + 0xd8]
test r12, r12
je 0x1008fdce
cmp r12d, 0x21
jae 0x100900f6
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8, r12
call fcn.10067610
mov r14, qword [rsp + 0x78]
mov r13, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x70]
add rcx, r13
lea rdx, [rsp + 0xa0]
mov r8, r12
call sub.msvcrt.dll_memcpy
add r13, r12
mov qword [rsp + 0x80], r13
jmp 0x1008fb98
movzx eax, al
cmp eax, 0xb
jne 0x1008ffef
mov rbx, rdi
jmp 0x1008fdce
movzx eax, al
cmp eax, 0xb
jne 0x1009002a
mov rbp, qword [rsp + 0x28]
mov r12, qword [rsp + 0x60]
mov rcx, rbx
call sub.kernel32.dll_CloseHandle
jmp 0x1008febd
mov rdi, r15
lea rsi, [rsp + 0x30]
nop dword [rax]
mov rax, qword [rdi + 0x20]
test rax, rax
je 0x1008fe49
cmp eax, 1
jne 0x1008fe30
mov rdx, qword [rdi + 0x10]
mov dword [rsp + 0x30], 0
mov rcx, qword [rdi]
mov r8, rsi
mov r9d, 1
call sub.kernel32.dll_GetOverlappedResult
test eax, eax
je 0x1008fe64
mov eax, dword [rsp + 0x30]
jmp 0x1008fe34
mov rax, qword [rdi + 0x28]
mov qword [rdi + 0x20], 0
mov rcx, qword [rdi + 0x18]
add qword [rcx + 0x10], rax
test rax, rax
je 0x1008fe87
mov rcx, rsi
mov rdx, rdi
call fcn.100a08a0
cmp byte [rsp + 0x30], 0
jne 0x1008fe80
test byte [rsp + 0x31], 1
jne 0x1008fdf0
jmp 0x1008fe87
call sub.kernel32.dll_GetLastError
cmp eax, 0x6d
je 0x1008fe7c
mov ebx, eax
mov eax, 0
cmp ebx, 0x26
je 0x1008fe34
jmp 0x1008fe92
xor eax, eax
jmp 0x1008fe34
mov rbx, qword [rsp + 0x38]
jmp 0x1008fe9a
xor ebx, ebx
jmp 0x1008fe9a
call sub.kernel32.dll_GetLastError
mov ebx, eax
shl rbx, 0x20
or rbx, 2
lea rcx, [rsp + 0xa0]
call fcn.1005c560
lea rcx, [rsp + 0xd0]
call fcn.1005c560
test rbx, rbx
jne 0x1009009b
mov qword [rbp + 0x10], 0
mov rsi, qword [rbp]
mov rcx, rsi
mov edx, 0xffffffff
call sub.kernel32.dll_WaitForSingleObject
test eax, eax
je 0x1008ff3f
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [r12 + 8], rax
mov qword [r12], 0
mov rdx, qword [rsp + 0x90]
test rdx, rdx
je 0x1008ff18
mov rcx, qword [rsp + 0x88]
mov r8, rdx
not r8
shr r8, 0x3f
call fcn.100028e0
mov rdx, qword [rsp + 0x78]
test rdx, rdx
je 0x1008ffbf
mov rcx, qword [rsp + 0x70]
mov r8, rdx
not r8
shr r8, 0x3f
call fcn.100028e0
jmp 0x1008ffbf
mov dword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rsi
call sub.kernel32.dll_GetExitCodeProcess
test eax, eax
je 0x1008feda
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x80]
mov qword [rsp + 0x40], rcx
movups xmm0, xmmword [rsp + 0x70]
movaps xmmword [rsp + 0x30], xmm0
mov rcx, qword [rsp + 0x98]
mov qword [rsp + 0x58], rcx
movups xmm1, xmmword [rsp + 0x88]
movups xmmword [rsp + 0x48], xmm1
movups xmmword [r12], xmm0
mov rcx, qword [rsp + 0x50]
mov qword [r12 + 0x20], rcx
mov rcx, qword [rsp + 0x58]
mov qword [r12 + 0x28], rcx
mov rcx, qword [rsp + 0x40]
mov qword [r12 + 0x10], rcx
mov rcx, qword [rsp + 0x48]
mov qword [r12 + 0x18], rcx
mov dword [r12 + 0x30], eax
mov rcx, rsi
call sub.kernel32.dll_CloseHandle
mov rcx, qword [rbp + 8]
call sub.kernel32.dll_CloseHandle
mov rax, r12
movaps xmm6, xmmword [rsp + 0x110]
add rsp, 0x128
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
shl r12, 0x20
or r12, 2
mov qword [rsp + 0x30], r12
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x1011f898]
lea r9, fcn.1005bef0
lea r8, [rsp + 0x30]
mov edx, 0x2b
call fcn.100e7b50
jmp 0x1009011b
shl r12, 0x20
or r12, 2
mov qword [rsp + 0x30], r12
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x1011f898]
lea r9, fcn.1005bef0
lea r8, [rsp + 0x30]
mov edx, 0x2b
call fcn.100e7b50
jmp 0x1009011b
lea r8, [0x10121840]
mov rcx, rbx
mov rdx, rsi
call fcn.100ee2a0
jmp 0x1009011b
lea r8, [0x10121840]
mov rcx, rdi
mov rdx, r15
call fcn.100ee2a0
jmp 0x1009011b
mov rcx, rdi
call sub.kernel32.dll_CloseHandle
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x30], rbx
lea rax, str.library_std_srcprocess.rs
mov qword [rsp + 0x20], rax
lea rcx, [0x1011f898]
lea r9, fcn.1005bef0
lea r8, [rsp + 0x30]
mov edx, 0x2b
call fcn.100e7b50
jmp 0x1009011b
lea rax, [0x10121b10]
mov qword [rsp + 0x68], rax
mov esi, 0x20
mov rbx, r12
mov rcx, rbx
mov rdx, rsi
mov r8, qword [rsp + 0x68]
call fcn.100ee380
jmp 0x1009011b
lea rax, [0x10121b10]
mov qword [rsp + 0x68], rax
mov r15d, 0x20
mov rdi, r12
mov rcx, rdi
mov rdx, r15
mov r8, qword [rsp + 0x68]
call fcn.100ee380
ud2