Function at 0x18005f580
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rbx, r9
mov r10, rcx
test rdx, rdx
je 0x18005f6a7
mov r9d, dword [rdx + 8]
test r9d, r9d
je 0x18005f5ac
test r8, r8
je 0x18005f6a7
test r9d, r9d
jne 0x18005f5bd
test rbx, rbx
je 0x18005f5b5
xor ecx, ecx
mov dword [rbx], ecx
xor eax, eax
add rsp, 0x40
pop rbx
ret
cmp dword [rcx + 0x364], 0
jne 0x18005f5da
test rbx, rbx
je 0x18005f5cf
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 0x18005f5ef
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x180062390
cmp eax, 6
jne 0x18005f601
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x180062ab0
cmp eax, 7
jne 0x18005f613
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x1800630f0
mov eax, dword [rcx + 0x28]
cmp eax, 0x930
jb 0x18005f5cf
jbe 0x18005f62c
mov r9, rbx
add rsp, 0x40
pop rbx
jmp fcn.18005f760
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 0x18005f667
mov r8d, ecx
jmp 0x18005f68d
mov dword [rsp + 0x28], ecx
lea rax, [rsp + 0x58]
lea rdx, [rsp + 0x30]
mov rcx, r10
mov qword [rsp + 0x20], rax
call fcn.18005e4e0
mov r8d, eax
test eax, eax
jne 0x18005f69e
mov ecx, dword [rsp + 0x58]
test rbx, rbx
je 0x18005f69e
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 0x1800624aa
mov eax, dword [rdx + 8]
test eax, eax
je 0x1800623c1
test r8, r8
je 0x1800624aa
test eax, eax
jne 0x1800623d2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rcx + 0x380]
test rcx, rcx
jne 0x1800623f0
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 0x180062432
mov r8, qword [rcx]
mov edx, eax
call qword [r8 + reloc.WS2_32.dll_recv]
test eax, eax
jne 0x180062460
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 0x180062477
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 0x1800624a6
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 0x180062465
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 0x180062b58
mov r8d, dword [rdx + 8]
test r8d, r8d
je 0x180062adc
test r9, r9
je 0x180062b58
test r8d, r8d
jne 0x180062ae4
xor eax, eax
add rsp, 0x30
pop rbx
ret
mov rcx, qword [rcx + 0x398]
test rcx, rcx
jne 0x180062afb
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.180066740
mov r11d, eax
test eax, eax
jne 0x180062b4f
test rbx, rbx
je 0x180062b4f
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 0x180063222
mov eax, dword [rdx + 8]
test eax, eax
je 0x180063122
test r8, r8
je 0x180063222
test eax, eax
jne 0x180063134
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
ret
mov rcx, qword [rcx + 0x3a0]
test rcx, rcx
jne 0x180063153
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.18009a5f0
test eax, eax
je 0x180063140
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.180063790
mov r12, rax
test rax, rax
jne 0x1800631d4
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.180099880
test eax, eax
jne 0x1800631fa
mov eax, 0x80004005
jmp 0x1800631bc
mov r9, r13
mov r8d, ebp
mov rdx, r12
mov rcx, rbx
call fcn.180063370
test eax, eax
js 0x1800631bc
cmp eax, 1
je 0x1800631bc
test rsi, rsi
je 0x18006321e
mov eax, dword [rdi + 8]
mov dword [rsi], eax
xor eax, eax
jmp 0x1800631bc
mov eax, 0x80070057
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
ret