Function at 0x180018f20
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rbx, r9
mov r10, rcx
test rdx, rdx
je 0x180019047
mov r9d, dword [rdx + 8]
test r9d, r9d
je 0x180018f4c
test r8, r8
je 0x180019047
test r9d, r9d
jne 0x180018f5d
test rbx, rbx
je 0x180018f55
xor ecx, ecx
mov dword [rbx], ecx
xor eax, eax
add rsp, 0x40
pop rbx
ret
cmp dword [rcx + 0x364], 0
jne 0x180018f7a
test rbx, rbx
je 0x180018f6f
xor ecx, ecx
mov dword [rbx], ecx
mov eax, 0x80004005
add rsp, 0x40
pop rbx
ret
mov eax, dword [rcx + 0x38]
cmp eax, 5
jne 0x180018f8f
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x18001bd30
cmp eax, 6
jne 0x180018fa1
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x18001c450
cmp eax, 7
jne 0x180018fb3
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x18001ca90
mov eax, dword [rcx + 0x28]
cmp eax, 0x930
jb 0x180018f6f
jbe 0x180018fcc
mov r9, rbx
add rsp, 0x40
pop rbx
jmp fcn.180019100
mov rax, qword [rdx]
mov ecx, dword [rcx + 0x34]
imul r9d, r9d, 0x930
cqo
and edx, 0x7ff
add rax, rdx
sar rax, 0xb
imul rax, rax, 0x930
add rax, rcx
xor ecx, ecx
mov dword [rsp + 0x58], ecx
mov qword [rsp + 0x30], rax
test r9d, r9d
jne 0x180019007
mov r8d, ecx
jmp 0x18001902d
mov dword [rsp + 0x28], ecx
lea rax, [rsp + 0x58]
lea rdx, [rsp + 0x30]
mov rcx, r10
mov qword [rsp + 0x20], rax
call fcn.180017e80
mov r8d, eax
test eax, eax
jne 0x18001903e
mov ecx, dword [rsp + 0x58]
test rbx, rbx
je 0x18001903e
mov eax, 0xdee95c4d
mul ecx
shr edx, 0xb
mov dword [rbx], edx
mov eax, r8d
add rsp, 0x40
pop rbx
ret
mov eax, 0x80070057
add rsp, 0x40
pop rbx
ret
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x20
mov rsi, r9
mov rbp, r8
mov rdi, rdx
mov rbx, rcx
test rdx, rdx
je 0x18001be4a
mov eax, dword [rdx + 8]
test eax, eax
je 0x18001bd61
test r8, r8
je 0x18001be4a
test eax, eax
jne 0x18001bd72
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rcx + 0x380]
test rcx, rcx
jne 0x18001bd90
mov eax, 0x80004005
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
mov rax, qword [rdx]
movsxd r8, dword [rbx + 0x390]
mov qword [rsp + 0x40], r12
cqo
and edx, 0x7ff
add rax, rdx
sar rax, 0xb
imul rax, rax, 0x930
cqo
idiv r8
mov r12, rax
cmp dword [rbx + 0x388], eax
je 0x18001bdd2
mov r8, qword [rcx]
mov edx, eax
call qword [r8 + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x18001be00
mov eax, dword [rdi + 8]
mov rcx, qword [rbx + 0x380]
xor edx, edx
mov r10, qword [rcx]
lea r9, [rsp + 0x48]
imul eax, eax, 0x930
div dword [rbx + 0x390]
mov rdx, rbp
mov r8d, eax
call qword [r10 + reloc.OLEAUT32.dll_VariantClear]
test eax, eax
je 0x18001be17
mov eax, 0x80004005
mov r12, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
mov edx, dword [rsp + 0x48]
lea eax, [rdx + r12]
mov dword [rbx + 0x388], eax
test rsi, rsi
je 0x18001be46
mov ecx, dword [rbx + 0x390]
mov eax, 0x6f74ae27
imul ecx, edx
imul ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsi], edx
xor eax, eax
jmp 0x18001be05
mov eax, 0x80070057
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
push rbx
sub rsp, 0x30
mov rbx, r9
mov r9, r8
test rdx, rdx
je 0x18001c4f8
mov r8d, dword [rdx + 8]
test r8d, r8d
je 0x18001c47c
test r9, r9
je 0x18001c4f8
test r8d, r8d
jne 0x18001c484
xor eax, eax
add rsp, 0x30
pop rbx
ret
mov rcx, qword [rcx + 0x398]
test rcx, rcx
jne 0x18001c49b
mov eax, 0x80004005
add rsp, 0x30
pop rbx
ret
mov rax, qword [rdx]
imul r8d, r8d, 0x930
mov dword [rsp + 0x48], 0
cqo
and edx, 0x7ff
add rax, rdx
lea rdx, [rsp + 0x48]
sar rax, 0xb
mov qword [rsp + 0x20], rdx
imul rax, rax, 0x930
mov rdx, rax
call fcn.1800201b0
mov r11d, eax
test eax, eax
jne 0x18001c4ef
test rbx, rbx
je 0x18001c4ef
mov eax, 0xdee95c4d
mul dword [rsp + 0x48]
shr edx, 0xb
mov dword [rbx], edx
mov eax, r11d
add rsp, 0x30
pop rbx
ret
mov eax, 0x80070057
add rsp, 0x30
pop rbx
ret
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r13
sub rsp, 0x20
mov rsi, r9
mov r13, r8
mov rdi, rdx
mov rbx, rcx
test rdx, rdx
je 0x18001cbc2
mov eax, dword [rdx + 8]
test eax, eax
je 0x18001cac2
test r8, r8
je 0x18001cbc2
test eax, eax
jne 0x18001cad4
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
ret
mov rcx, qword [rcx + 0x3a0]
test rcx, rcx
jne 0x18001caf3
mov eax, 0x80004005
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
ret
mov rax, qword [rdx]
movsxd r8, dword [rbx + 0x408]
cqo
and edx, 0x7ff
add rax, rdx
sar rax, 0xb
imul rax, rax, 0x930
cqo
idiv r8
mov edx, eax
call fcn.18008ded0
test eax, eax
je 0x18001cae0
mov eax, dword [rdi + 8]
xor edx, edx
mov qword [rsp + 0x40], rbp
mov rcx, rbx
mov qword [rsp + 0x48], r12
imul eax, eax, 0x930
div dword [rbx + 0x410]
mov ebp, eax
lea edx, [rax*4]
call fcn.18001d130
mov r12, rax
test rax, rax
jne 0x18001cb74
mov eax, 0x8007000e
mov rbp, qword [rsp + 0x40]
mov r12, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
ret
mov rcx, qword [rbx + 0x3a0]
mov eax, ebp
cdq
idiv dword [rbx + 0x40c]
mov rdx, r12
mov r8d, eax
call fcn.18008d160
test eax, eax
jne 0x18001cb9a
mov eax, 0x80004005
jmp 0x18001cb5c
mov r9, r13
mov r8d, ebp
mov rdx, r12
mov rcx, rbx
call fcn.18001cd10
test eax, eax
js 0x18001cb5c
cmp eax, 1
je 0x18001cb5c
test rsi, rsi
je 0x18001cbbe
mov eax, dword [rdi + 8]
mov dword [rsi], eax
xor eax, eax
jmp 0x18001cb5c
mov eax, 0x80070057
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
ret