Function at 0x18004a970
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x40
mov rbx, r9
mov r10, rcx
test rdx, rdx
je 0x18004aa93
mov r9d, dword [rdx + 8]
test r9d, r9d
je 0x18004a99c
test r8, r8
je 0x18004aa93
test r9d, r9d
jne 0x18004a9ad
test rbx, rbx
je 0x18004a9a5
xor ecx, ecx
mov dword [rbx], ecx
xor eax, eax
add rsp, 0x40
pop rbx
ret
cmp dword [rcx + 0x35c], 0
jne 0x18004a9ca
test rbx, rbx
je 0x18004a9bf
xor ecx, ecx
mov dword [rbx], ecx
mov eax, 0x80004005
add rsp, 0x40
pop rbx
ret
mov eax, dword [rcx + 0x30]
cmp eax, 5
jne 0x18004a9df
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x18004d4b0
cmp eax, 6
jne 0x18004a9f1
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x18004dbd0
cmp eax, 7
jne 0x18004aa03
mov r9, rbx
add rsp, 0x40
pop rbx
jmp 0x18004e210
mov eax, dword [rcx + 0x20]
cmp eax, 0x930
jb 0x18004a9bf
jbe 0x18004aa1c
mov r9, rbx
add rsp, 0x40
pop rbx
jmp fcn.18004ab40
mov rax, qword [rdx]
mov ecx, dword [rcx + 0x2c]
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 0x18004aa57
mov r8d, ecx
jmp 0x18004aa79
lea rax, [rsp + 0x58]
lea rdx, [rsp + 0x30]
mov rcx, r10
mov qword [rsp + 0x20], rax
call fcn.180049930
mov r8d, eax
test eax, eax
jne 0x18004aa8a
mov ecx, dword [rsp + 0x58]
test rbx, rbx
je 0x18004aa8a
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 0x18004d5ca
mov eax, dword [rdx + 8]
test eax, eax
je 0x18004d4e1
test r8, r8
je 0x18004d5ca
test eax, eax
jne 0x18004d4f2
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rcx + 0x378]
test rcx, rcx
jne 0x18004d510
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 + 0x388]
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 + 0x380], eax
je 0x18004d552
mov r8, qword [rcx]
mov edx, eax
call qword [r8 + 0x10]
test eax, eax
jne 0x18004d580
mov eax, dword [rdi + 8]
mov rcx, qword [rbx + 0x378]
xor edx, edx
mov r10, qword [rcx]
lea r9, [rsp + 0x48]
imul eax, eax, 0x930
div dword [rbx + 0x388]
mov rdx, rbp
mov r8d, eax
call qword [r10 + reloc.OLEAUT32.dll_VariantClear]
test eax, eax
je 0x18004d597
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 + 0x380], eax
test rsi, rsi
je 0x18004d5c6
mov ecx, dword [rbx + 0x388]
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 0x18004d585
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 0x18004dc78
mov r8d, dword [rdx + 8]
test r8d, r8d
je 0x18004dbfc
test r9, r9
je 0x18004dc78
test r8d, r8d
jne 0x18004dc04
xor eax, eax
add rsp, 0x30
pop rbx
ret
mov rcx, qword [rcx + 0x390]
test rcx, rcx
jne 0x18004dc1b
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.180051800
mov r11d, eax
test eax, eax
jne 0x18004dc6f
test rbx, rbx
je 0x18004dc6f
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 0x18004e342
mov eax, dword [rdx + 8]
test eax, eax
je 0x18004e242
test r8, r8
je 0x18004e342
test eax, eax
jne 0x18004e254
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
ret
mov rcx, qword [rcx + 0x398]
test rcx, rcx
jne 0x18004e273
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 + 0x400]
cqo
and edx, 0x7ff
add rax, rdx
sar rax, 0xb
imul rax, rax, 0x930
cqo
idiv r8
mov edx, eax
call fcn.180083c10
test eax, eax
je 0x18004e260
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 + 0x408]
mov ebp, eax
lea edx, [rax*4]
call fcn.18004e8b0
mov r12, rax
test rax, rax
jne 0x18004e2f4
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 + 0x398]
mov eax, ebp
cdq
idiv dword [rbx + 0x404]
mov rdx, r12
mov r8d, eax
call fcn.180082ea0
test eax, eax
jne 0x18004e31a
mov eax, 0x80004005
jmp 0x18004e2dc
mov r9, r13
mov r8d, ebp
mov rdx, r12
mov rcx, rbx
call fcn.18004e490
test eax, eax
js 0x18004e2dc
cmp eax, 1
je 0x18004e2dc
test rsi, rsi
je 0x18004e33e
mov eax, dword [rdi + 8]
mov dword [rsi], eax
xor eax, eax
jmp 0x18004e2dc
mov eax, 0x80070057
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
ret