Function at 0x140047a90
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov qword [rbp - 0x19], 0xfffffffffffffffe
mov qword [rsp + 0xe0], rbx
mov rax, qword [0x1401730f8]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rsi, rdx
mov r14, rcx
mov qword [rbp - 0x11], rcx
lea rax, vtable.STREAM.0
mov qword [rcx], rax
lea rbx, [rcx + 8]
mov qword [rbp - 0x21], rbx
lea rax, [0x140102478]
mov qword [rbx], rax
lea rax, [0x1401025f8]
mov qword [rbx + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x48], eax
mov qword [rbx + 0x20], 7
xor r15d, r15d
mov qword [rbx + 0x18], r15
mov word [rbx + 8], r15w
mov qword [rbx + 0x28], r15
mov qword [rbx + 0x30], r15
mov qword [rbx + 0x38], r15
mov rax, qword [rbx + 0x40]
movsxd rcx, dword [rax + 4]
mov ecx, dword [rcx + rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
mov qword [r14 + 0x58], r15
mov dword [r14 + 0x60], r15d
mov word [r14 + 0x64], 0x101
mov byte [r14 + 0x66], 1
mov dword [r14 + 0x6c], r15d
or rdi, 0xffffffffffffffff
mov dword [r14 + 0x70], edi
mov dword [r14 + 0x74], 0x2e
mov dword [r14 + 0x78], VarBstrCmp
lea rbx, [r14 + 0x80]
mov qword [rbp - 0x21], rbx
mov qword [rbx], r15
mov qword [rbx + 8], r15
call fcn.140033db0
mov qword [rbx], rax
mov dword [r14 + 0x90], r15d
mov byte [r14 + 0x94], r15b
lea rdx, [0x1400fc414]
mov rax, rdx
test rsi, rsi
cmovne rax, rsi
test rax, rax
cmovne rdx, rax
cmp word [rdx], r15w
jne 0x140047bb0
mov edi, r15d
jmp 0x140047bba
inc rdi
cmp word [rdx + rdi*2], 0
jne 0x140047bb0
lea rcx, [r14 + 0x10]
mov r8, rdi
call fcn.140004400
lea rbx, [r14 + 0x10]
cmp qword [rbx + 0x18], 8
jb 0x140047bd6
mov rcx, qword [rbx]
jmp 0x140047bd9
mov rcx, rbx
mov dl, 1
call fcn.1400479c0
mov dword [r14 + 0x68], eax
cmp qword [rbx + 0x18], 8
jb 0x140047bf0
mov rcx, qword [rbx]
jmp 0x140047bf3
mov rcx, rbx
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rax
mov qword [r14 + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x140047c36
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [r14 + 0x6c], eax
jmp 0x140047de0
mov dword [r14 + 0x60], 1
xor eax, eax
mov qword [rbp - 9], rax
mov qword [rbp - 1], rax
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
mov dword [rbp + 0x1f], eax
mov word [rbp + 0x23], ax
mov eax, dword [r14 + 0x68]
mov qword [rbp - 0x21], rax
xor r9d, r9d
lea r8, [rbp - 0x1d]
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp edi, 0xffffffff
jne 0x140047c8c
test eax, eax
je 0x140047c94
mov dword [r14 + 0x6c], eax
jmp 0x140047de0
test edi, edi
je 0x140047de0
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x25]
mov r8d, 0x2e
lea rdx, [rbp - 9]
mov rcx, qword [r14 + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rbp - 0x29], eax
test eax, eax
je 0x140047dc5
cmp dword [rbp - 0x25], 0
je 0x140047dc5
lea rdx, [rbp - 9]
mov rcx, r14
call fcn.140048000
test eax, eax
je 0x140047ce3
movzx ecx, word [rbp + 5]
test cx, cx
jne 0x140047d72
cmp qword [rbx + 0x18], 8
jb 0x140047ced
mov rbx, qword [rbx]
xor edx, edx
mov rcx, rbx
call fcn.1400479c0
cmp eax, dword [r14 + 0x68]
jbe 0x140047d01
mov dword [r14 + 0x68], eax
mov r8d, dword [r14 + 0x68]
xor r9d, r9d
mov rdx, qword [r14 + 0x58]
mov rcx, r14
call fcn.140048a10
test eax, eax
je 0x140047de0
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x29]
mov r8d, 0x2e
lea rdx, [rbp - 9]
mov rcx, qword [r14 + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rbp - 0x29], eax
test eax, eax
je 0x140047de0
cmp dword [rbp - 0x25], 0
je 0x140047de0
lea rdx, [rbp - 9]
mov rcx, r14
call fcn.140048000
movzx ecx, word [rbp + 5]
test eax, eax
je 0x140047d67
test cx, cx
jne 0x140047d72
mov dword [r14 + 0x90], 4
mov eax, dword [r14 + 0x90]
cmp eax, 1
je 0x140047d9e
jbe 0x140047dae
cmp eax, 3
jbe 0x140047d94
cmp eax, 4
jne 0x140047dae
mov dword [r14 + 0x78], 0x30
jmp 0x140047da6
mov dword [r14 + 0x78], SafeArrayPutElement
jmp 0x140047da6
mov dword [r14 + 0x78], VarBstrCmp
mov dword [r14 + 0x74], 0x2e
cmp byte [r14 + 0x94], 0
je 0x140047de0
movzx edx, cx
mov rcx, r14
call fcn.140048870
jmp 0x140047de0
mov dword [r14 + 0x90], 4
mov dword [r14 + 0x74], 0x2e
mov dword [r14 + 0x78], 0x30
mov rax, r14
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1400b31f0
mov rbx, qword [rsp + 0xe0]
add rsp, 0xa0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret