Function at 0x180058b30
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
sub rsp, 0xc0
mov qword [rsp + 0xb8], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
movzx ebp, r9w
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
call qword [0x18010e050]
xor r13d, r13d
mov dword [rsp + 0x40], r13d
xor eax, eax
mov dword [rsp + 0x44], eax
mov dword [rsp + 0xa8], r13d
mov word [rsp + 0x60], ax
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov word [rsp + 0x60], 8
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsp + 0x68], rax
test rax, rax
jne 0x180058bc9
test rsi, rsi
je 0x180058bc9
mov word [rsp + 0x60], 0xa
mov dword [rsp + 0x68], 0x8007000e
mov ecx, 0x8007000e
call fcn.1800012c4
nop
mov word [rsp + 0x48], 0
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov word [rsp + 0x48], 8
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x180058c14
test rdi, rdi
je 0x180058c14
mov word [rsp + 0x48], 0xa
mov dword [rsp + 0x50], 0x8007000e
mov ecx, 0x8007000e
call fcn.1800012c4
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
nop
mov word [rsp + 0x90], 2
mov word [rsp + 0x98], bp
mov qword [rsp + 0xb0], r13
mov eax, dword [rbx + 0xcf8]
cmp eax, dword [rbx + 0xce0]
jb 0x180058c84
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, 0x8007000e
jmp 0x180059083
mov dword [rbx + 0xcf0], 1
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x44], r13d
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x40]
mov rcx, qword [rbx + 0xcd8]
call qword [sym.imp.OLEAUT32.dll_SafeArrayCopy]
mov esi, eax
test eax, eax
jns 0x180058ced
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, esi
jmp 0x180059083
mov eax, dword [rbx + 0xcf8]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x44], 1
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x40]
mov rcx, qword [rbx + 0xcd8]
call qword [sym.imp.OLEAUT32.dll_SafeArrayCopy]
mov esi, eax
test eax, eax
jns 0x180058d55
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, esi
jmp 0x180059083
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x180058dd3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x180058d9a
movzx ebx, ax
or ebx, 0x80070000
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, ebx
jmp 0x180059083
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
mov ecx, eax
call fcn.1800605e0
mov rdi, rax
mov r8, rbp
xor edx, edx
mov rcx, rax
call fcn.180086e90
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0xa8]
mov r8d, ebp
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180058e76
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.180088170
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x180058e3d
movzx ebx, ax
or ebx, 0x80070000
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, ebx
jmp 0x180059083
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov word [rsp + 0x78], 0x2011
mov r8d, ebp
xor edx, edx
mov cx, 0x11
call qword [sym.imp.OLEAUT32.dll_SafeArrayCopyData]
mov qword [rsp + 0x80], rax
test rax, rax
jne 0x180058ee7
mov rcx, rdi
call fcn.180088170
nop
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, 0x8007000e
jmp 0x180059083
lea rdx, [rsp + 0xb0]
mov rcx, rax
call qword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
mov esi, eax
test eax, eax
jns 0x180058f40
mov rcx, rdi
call fcn.180088170
nop
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, esi
jmp 0x180059083
mov r8, rbp
mov rdx, rdi
mov rcx, qword [rsp + 0xb0]
call fcn.180086b10
mov rcx, rdi
call fcn.180088170
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
mov edi, eax
test eax, eax
jns 0x180058fa8
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, edi
jmp 0x180059083
mov eax, dword [rbx + 0xcf8]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x44], 2
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x40]
mov rcx, qword [rbx + 0xcd8]
call qword [sym.imp.OLEAUT32.dll_SafeArrayCopy]
mov edi, eax
test eax, eax
jns 0x18005900d
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, edi
jmp 0x180059083
mov eax, dword [rbx + 0xcf8]
mov dword [rsp + 0x40], eax
add eax, 1
mov dword [rbx + 0xcf8], eax
mov dword [rsp + 0x44], 3
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x40]
mov rcx, qword [rbx + 0xcd8]
call qword [sym.imp.OLEAUT32.dll_SafeArrayCopy]
mov edi, eax
test eax, eax
jns 0x18005904f
add dword [rbx + 0xcf8], 0xffffffff
lea rcx, [rsp + 0x90]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
lea rcx, [rsp + 0x60]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, edi
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret