Function at 0x140034ae4
Capabilities:
Read file on windows

Disassembly:
push rbp
mov rbp, rsp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x1d8
mov rax, qword [0x140048b20]
xor rax, rsp
mov qword [rbp - 0x50], rax
and qword [r9], 0
mov rdi, qword [rbp + 0x30]
xor eax, eax
mov qword [rsp + 0xa8], r9
mov r14, r8
mov rbx, rdx
mov qword [rsp + 0x88], rdx
mov r15, rcx
mov qword [rsp + 0x38], rcx
test r8, r8
je 0x14003525f
and dword [rsp + 0x40], eax
mov dword [rsp + 0x30], eax
mov rax, qword [rdi]
mov rcx, rdi
xor r12d, r12d
call qword [rax + 0x18]
mov rdx, qword [rdi]
mov rcx, rdi
mov dword [rsp + 0x70], eax
call qword [rdx + 0x28]
mov rdx, qword [rdi]
mov rcx, rdi
mov qword [rsp + 0x50], rax
call qword [rdx + 0x18]
mov edx, 0x10000
test eax, eax
je 0x140034b76
movzx ecx, bx
sub edx, ecx
mov eax, edx
mov ecx, r14d
mov rsi, r14
cmp rax, r14
cmovb ecx, edx
mov eax, ecx
mov dword [rsp + 0x48], ecx
mov rcx, rdi
sub rsi, rax
mov eax, 4
add rsi, 0x1ffff
shr rsi, 0x10
cmp esi, eax
cmovg esi, eax
mov rax, qword [rdi]
call qword [rax + 0x20]
test eax, eax
jne 0x140034bb9
mov eax, 0x40
cmp esi, eax
cmovg esi, eax
mov rax, qword [rdi]
mov edx, esi
mov rcx, rdi
call qword [rax]
mov ebx, eax
test eax, eax
js 0x140035203
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x30]
mov ebx, eax
test eax, eax
js 0x140035203
and qword [rsp + 0x98], r12
movsxd rax, esi
xor r13d, r13d
xor r15d, r15d
mov qword [rsp + 0x68], rax
test esi, esi
jle 0x1400351db
lea rax, [rsp + 0xfc]
lea rcx, [rsp + 0xc0]
lea rbx, [rsp + 0x114]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0xf8]
mov qword [rsp + 0xb0], rcx
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0xe0]
lea rcx, [rsp + 0x100]
mov qword [rsp + 0x78], rax
lea rax, [rsp + 0x108]
lea rsi, [rsp + 0x110]
mov qword [rsp + 0xa0], rbx
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x80], rax
test r14, r14
je 0x140034ef0
cmp r12d, r13d
jne 0x140034cff
and dword [rcx + 0x14], 0
and qword [rcx], 0
mov r9d, 0x1f0003
xor ecx, ecx
xor r8d, r8d
xor edx, edx
call qword [0x14004e210]
mov rcx, qword [rsp + 0x90]
mov qword [rcx], rax
test rax, rax
jne 0x140034cd6
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
jne 0x1400351fe
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x90]
mov rdx, qword [rsp + 0xb0]
mov rax, qword [rcx]
add rcx, 0x38
inc r12d
mov qword [rdx], rax
add rdx, 8
mov qword [rsp + 0xb0], rdx
mov qword [rsp + 0x90], rcx
cmp dword [rsp + 0x70], 0
je 0x140034d15
mov ecx, dword [rsp + 0x48]
and dword [rsp + 0x70], 0
mov eax, ecx
mov dword [rsi], ecx
jmp 0x140034d25
mov ecx, 0x10000
mov eax, r14d
cmp r14, rcx
cmova eax, ecx
mov dword [rsi], eax
mov r8, qword [rsp + 0x50]
sub r14, rax
mov rax, qword [rdi]
mov edx, r13d
mov rcx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov edx, dword [rsi]
mov r8, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x50]
and dword [rsp + 0x44], 0
mov r11, rax
mov rax, qword [rsp + 0x80]
lea r9, [rsp + 0x44]
mov qword [rax], r11
mov rax, qword [rsp + 0x78]
mov qword [rax], rcx
mov rax, qword [rsp + 0x60]
add rcx, rdx
mov dword [rax], r8d
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x50], rcx
mov rcx, r8
add r8, rdx
shr rcx, 0x20
mov qword [rsp + 0x88], r8
mov r8d, edx
mov dword [rax], ecx
lea rcx, [rsp + 0xe8]
movsxd rax, r13d
mov rdx, r11
imul rax, rax, 0x38
mov qword [rsp + 0xb8], rax
add rax, rcx
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140034de2
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x140034ee6
inc dword [rsp + 0x30]
mov dword [rbx], 1
jmp 0x140034e08
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x20]
test eax, eax
je 0x140034e21
test r15, r15
je 0x140034e21
mov rcx, qword [rsp + r15*8 + 0xc0]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [rbx], 2
mov rax, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov r8, qword [rsp + 0x78]
mov r9, qword [rsp + 0x80]
jmp 0x140034e95
mov eax, dword [rsi]
cmp dword [rsp + 0x44], eax
jne 0x140034ee6
mov rax, qword [rdi]
mov r8, qword [rsp + 0xa8]
lea rdx, [rsp + 0xe0]
add rdx, qword [rsp + 0xb8]
mov rcx, rdi
call qword [rax + 0x10]
mov ebx, eax
test eax, eax
js 0x1400351fe
mov r9, qword [rsp + 0x80]
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x58]
mov rbx, qword [rsp + 0xa0]
sub r9, 0x38
sub r8, 0x38
sub rdx, 0x38
dec r13d
sub rax, 0x38
sub rbx, 0x38
dec r15
sub rsi, 0x38
add r9, 0x38
add r8, 0x38
add rdx, 0x38
add rax, 0x38
add rbx, 0x38
inc r15
inc r13d
add rsi, 0x38
mov qword [rsp + 0x80], r9
mov qword [rsp + 0x78], r8
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x58], rax
mov qword [rsp + 0xa0], rbx
cmp r15, qword [rsp + 0x68]
jge 0x140034ef0
mov rcx, qword [rsp + 0x90]
jmp 0x140034c6d
mov ebx, 0x80004005
jmp 0x1400351fe
cmp r12d, r13d
je 0x140034f16
dec r12d
movsxd rbx, r12d
imul rbx, rbx, 0x38
mov rcx, qword [rsp + rbx + 0x100]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [rsp + rbx + 0x100], 0
mov eax, dword [rsp + 0x30]
test eax, eax
jle 0x1400351db
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x20]
mov r13, qword [rsp + 0x98]
test eax, eax
je 0x140034f83
mov rax, r13
imul rax, rax, 0x38
cmp dword [rsp + rax + 0x114], 1
jne 0x140034f83
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x30]
mov ebx, eax
test eax, eax
js 0x1400351fe
mov rcx, qword [rsp + r13*8 + 0xc0]
xor r8d, r8d
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
test eax, eax
jne 0x140034ee6
mov eax, dword [rsp + 0x40]
mov r15d, eax
cmp eax, 0xffffffff
jne 0x140034fb6
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x30]
mov ebx, eax
test eax, eax
js 0x1400351fe
and dword [rsp + 0x20], 0
lea rdx, [rsp + 0xc0]
or r9d, 0xffffffff
xor r8d, r8d
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
mov r15d, eax
mov rcx, qword [rsp + 0x38]
and dword [rsp + 0x44], 0
movsxd rax, r15d
mov rsi, rax
lea rdx, [rsp + 0xe8]
lea r8, [rsp + 0x44]
xor r9d, r9d
mov qword [rsp + 0x68], rax
imul rsi, rsi, 0x38
add rdx, rsi
mov dword [rsp + rsi + 0x114], 2
call fcn.14000ae5c
test al, al
jne 0x140035012
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
jne 0x1400351fe
mov eax, dword [rsp + rsi + 0x110]
cmp dword [rsp + 0x44], eax
jne 0x140034ee6
mov ebx, dword [rsp + 0x30]
mov rax, qword [rdi]
mov rcx, rdi
dec ebx
mov dword [rsp + 0x30], ebx
call qword [rax + 0x20]
test eax, eax
je 0x140035045
cmp dword [rsp + 0x40], r15d
jne 0x1400351cd
cmp dword [rsp + rsi + 0x114], 2
jne 0x1400351cd
mov rsi, qword [rsp + 0x68]
mov rax, qword [rdi]
mov r8, qword [rsp + 0xa8]
movsxd rcx, r15d
imul rcx, rcx, 0x38
mov qword [rsp + 0x68], rcx
lea rdx, [rsp + 0xe0]
add rdx, rcx
mov rcx, rdi
call qword [rax + 0x10]
mov ebx, eax
test eax, eax
js 0x1400351fe
inc dword [rsp + 0x40]
inc r13
mov rbx, rsi
movsxd rax, r12d
mov qword [rsp + 0x98], r13
imul rbx, rbx, 0x38
and dword [rsp + rbx + 0x114], 0
cmp r13, rax
jne 0x1400350c0
and dword [rsp + 0x40], 0
xor r13d, r13d
mov qword [rsp + 0x98], r13
test r14, r14
je 0x1400351ac
mov r8, qword [rsp + 0x50]
mov ecx, 0x10000
mov eax, r14d
cmp r14, rcx
mov edx, r15d
cmova eax, ecx
mov rcx, rdi
mov dword [rsp + rbx + 0x110], eax
sub r14, rax
mov rax, qword [rdi]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov edx, dword [rsp + rbx + 0x110]
mov r8, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x50]
mov dword [rsp + rbx + 0xf8], r8d
lea r15, [rsp + 0xe8]
mov qword [rsp + rbx + 0xe0], rcx
add rcx, rdx
xor r9d, r9d
mov qword [rsp + 0x50], rcx
mov rcx, r8
add r8, rdx
shr rcx, 0x20
mov qword [rsp + 0x88], r8
mov r8d, edx
mov dword [rsp + rbx + 0xfc], ecx
mov rcx, qword [rsp + 0x68]
mov rdx, rax
add rcx, r15
mov r15, qword [rsp + 0x38]
mov qword [rsp + rbx + 0x108], rax
mov qword [rsp + 0x20], rcx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140035193
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400351d4
mov dword [rsp + rbx + 0x114], 1
mov ebx, dword [rsp + 0x30]
inc ebx
mov dword [rsp + 0x30], ebx
jmp 0x1400351b0
mov rcx, qword [rsp + rsi*8 + 0xc0]
mov dword [rsp + rbx + 0x114], 2
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebx, dword [rsp + 0x30]
mov r15d, dword [rsp + 0x40]
mov rax, r13
mov rsi, r13
imul rax, rax, 0x38
cmp dword [rsp + rax + 0x114], 2
je 0x140035058
test ebx, ebx
jmp 0x140034f1c
mov ebx, 0x80004005
jmp 0x140035203
test r14, r14
jne 0x140034ee6
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x28]
mov ebx, 0x80004005
sub rax, qword [rsp + 0x50]
neg rax
sbb eax, eax
and ebx, eax
mov r15, qword [rsp + 0x38]
xor r14d, r14d
movsxd rsi, r12d
test r12d, r12d
jle 0x14003525d
lea rdi, [rsp + 0x100]
cmp dword [rdi + 0x14], 1
jne 0x140035243
and dword [rsp + 0x48], 0
movsxd rax, r14d
lea rdx, [rsp + 0xe8]
imul rax, rax, 0x38
lea r8, [rsp + 0x48]
mov r9b, 1
add rdx, rax
mov rcx, r15
call fcn.14000ae5c
mov rcx, qword [rdi]
test rcx, rcx
je 0x140035251
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc r14d
add rdi, 0x38
dec rsi
jne 0x140035216
mov eax, ebx
mov rcx, qword [rbp - 0x50]
xor rcx, rsp
call fcn.140015ee0
add rsp, 0x1d8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret