Function at 0x100490ce0
Capabilities:
Read file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x478
lea rbp, [rsp + 0x80]
movabs rax, 0x7fffffffffffffff
mov r11d, dword [rcx + 0x10]
mov qword [rbp - 0x38], rdx
mov r12, rcx
mov ebx, r8d
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x44], 0
test r11d, r11d
jne 0x100490d50
test ebx, ebx
jne 0x100490db7
mov rcx, qword [rbp - 0x38]
call sym.vim.exe_rettv_list_alloc
test eax, eax
jne 0x100490dcd
add rsp, 0x478
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea r13, [rcx + 0x10]
mov rcx, r13
call sym.vim.exe_tv_get_string
mov rdx, rax
movzx eax, byte [rax]
sub eax, 0x62
jne 0x100490d6b
movzx eax, byte [rdx + 1]
test eax, eax
mov rcx, r13
sete al
movzx eax, al
mov dword [rbp - 0x44], eax
call sym.vim.exe_tv_get_string
cmp byte [rax], 0x42
jne 0x10049122d
cmp byte [rax + 1], 0
jne 0x10049122d
movabs rax, 0x7fffffffffffffff
mov r10d, dword [r12 + 0x20]
mov qword [rbp - 0x30], rax
test r10d, r10d
je 0x100490db7
lea rcx, [r12 + 0x20]
call sym.vim.exe_tv_get_number
mov qword [rbp - 0x30], rax
mov rcx, qword [rbp - 0x38]
mov ebx, 1
call sym.vim.exe_rettv_blob_alloc
test eax, eax
je 0x100490d3c
mov rcx, r12
call sym.vim.exe_tv_get_string
mov rcx, rax
mov r12, rax
call sym.vim.exe_mch_isdir
test eax, eax
jne 0x100661dd3
cmp byte [r12], 0
je 0x100661e04
lea rdx, [0x1006a3b08]
mov rcx, r12
call sub.msys_2.0.dll_fopen
mov qword [rbp - 0x58], rax
test rax, rax
je 0x100661dfd
test ebx, ebx
jne 0x1004912a6
mov rax, qword [rbp - 0x30]
xor r15d, r15d
mov rdi, rax
shr rdi, 0x3f
mov qword [rbp - 0x60], rdi
test rax, rax
je 0x100490fe9
lea rax, [rbp - 0x10]
xor r14d, r14d
xor edi, edi
xor r10d, r10d
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x30]
xor r15d, r15d
mov r13, r14
not rax
shr rax, 0x3f
mov qword [rbp - 0x50], rax
nop word [rax + rax]
mov rsi, qword [rbp - 0x20]
mov r9, qword [rbp - 0x58]
mov r8d, 0x400
mov edx, 1
mov qword [rbp - 0x18], r10
mov rcx, rsi
call sub.msys_2.0.dll_fread
mov r10, qword [rbp - 0x18]
mov r9, rsi
mov r12d, eax
cdqe
mov qword [rbp - 0x28], rax
mov r14, r10
nop word [rax + rax]
mov rax, qword [rbp - 0x20]
add rax, qword [rbp - 0x28]
cmp rsi, rax
jb 0x100490f85
test r12d, r12d
jg 0x100491176
test r14, r14
jg 0x100490ec2
mov eax, dword [rbp - 0x44]
test eax, eax
je 0x100491260
mov rbx, rsi
sub rbx, r9
test r14, r14
je 0x100490fb0
mov qword [rbp - 0x18], r14
lea r13, [r14 + rbx]
lea rdx, [r13 + 1]
mov rcx, r15
mov qword [rbp - 0x40], r9
call sub.msys_2.0.dll_realloc
test rax, rax
je 0x1004912e3
mov r9, qword [rbp - 0x40]
lea rcx, [rax + r14]
mov r8, rbx
mov qword [rbp - 0x18], rax
xor r15d, r15d
mov rdx, r9
call sub.msys_2.0.dll_memcpy
mov r10, qword [rbp - 0x18]
mov byte [r10 + r13], 0
xor r13d, r13d
mov qword [rbp - 0x18], r10
call sym.vim.exe_listitem_alloc
mov r10, qword [rbp - 0x18]
test rax, rax
mov rdx, rax
je 0x100491212
mov dword [rax + 0x10], 7
add rdi, 1
mov byte [rax + 0x14], 0
mov qword [rax + 0x18], r10
mov rax, qword [rbp - 0x38]
mov rcx, qword [rax + 8]
call sym.vim.exe_list_append
lea r9, [rsi + 1]
cmp rdi, qword [rbp - 0x30]
jl 0x100490f65
cmp byte [rbp - 0x50], 0
jne 0x100491260
test r12d, r12d
jle 0x100491260
mov rax, qword [rbp - 0x20]
mov rsi, r9
add rax, qword [rbp - 0x28]
xor r14d, r14d
cmp rsi, rax
jae 0x100490ea9
movzx eax, byte [rsi]
cmp al, 0xa
je 0x100491010
test r12d, r12d
jle 0x100490ec2
test al, al
jne 0x100491000
mov byte [rsi], 0xa
add rsi, 1
jmp 0x100490e98
mov rdx, rbx
mov rcx, r9
call sym.vim.exe_vim_strnsave
mov r10, rax
test rax, rax
jne 0x100490f18
xor r8d, r8d
lea rcx, [r8 + rbx + 1]
call sym.vim.exe_do_outofmem_msg
mov rdi, qword [rbp - 0x38]
mov rcx, qword [rdi + 8]
call sym.vim.exe_list_free
mov rcx, rdi
call sym.vim.exe_rettv_list_alloc
mov rcx, r15
call sym.vim.exe_vim_free
mov rcx, qword [rbp - 0x58]
call fcn.10065e4f0
jmp 0x100490d3c
cmp al, 0xbf
je 0x100491080
add rsi, 1
jmp 0x100490e98
mov rbx, rsi
sub rbx, r9
test r12d, r12d
jle 0x100490ec8
mov r8d, dword [rbp - 0x44]
test r8d, r8d
je 0x100491043
jmp 0x100490ec8
cmp byte [r9 + rbx - 1], 0xd
lea rax, [rbx - 1]
jne 0x100490ec8
mov rbx, rax
test rbx, rbx
jne 0x100491030
test r14, r14
jg 0x100491062
jmp 0x100490ec8
sub r14, 1
je 0x100490fb0
cmp byte [r15 + r14 - 1], 0xd
je 0x100491058
mov qword [rbp - 0x18], r14
mov r13, r14
jmp 0x100490ed9
mov rax, qword [sym.vim.exe_enc_utf8]
mov ecx, dword [rax]
test ecx, ecx
je 0x100491004
mov edx, dword [rbp - 0x44]
test edx, edx
jne 0x100491004
lea rax, [rbp - 0xf]
cmp rsi, rax
jb 0x1004910cc
lea rcx, [rbp - 0xe]
movzx edx, byte [rsi - 1]
cmp rsi, rcx
jae 0x10049121f
cmp rsi, rax
jne 0x1004910e6
test r14, r14
jle 0x1004912db
movzx eax, byte [r15 + r14 - 1]
jmp 0x1004910f6
xor edx, edx
test r14, r14
jle 0x1004910d9
movzx edx, byte [r15 + r14 - 1]
lea rax, [rbp - 0xe]
cmp rsi, rax
jae 0x10049121f
cmp r14, 1
jle 0x100491004
movzx eax, byte [r15 + r14 - 2]
cmp al, 0xef
jne 0x100491004
cmp dl, 0xbb
jne 0x100491004
lea rcx, [rsi - 2]
cmp r9, rcx
je 0x10049129a
mov rdx, qword [rbp - 0x20]
mov ebx, 3
cmp rcx, rdx
jae 0x100491132
mov rax, rdx
sub rax, rcx
mov rcx, rdx
sub ebx, eax
cdqe
sub r14, rax
mov rax, rsi
mov r11, qword [rbp - 0x28]
sub rax, qword [rbp - 0x20]
lea rdx, [rax + 1]
cmp r11, rdx
jle 0x100491164
sub r11, rax
lea rdx, [rsi + 1]
mov qword [rbp - 0x18], r9
mov r8, r11
sub r8, 1
call sub.msys_2.0.dll_memmove
mov r9, qword [rbp - 0x18]
mov rcx, rax
sub r12d, ebx
mov rsi, rcx
movsxd rax, r12d
mov qword [rbp - 0x28], rax
jmp 0x100490e98
mov r10, r14
cmp rdi, qword [rbp - 0x30]
jl 0x100491189
cmp byte [rbp - 0x50], 0
jne 0x100491260
cmp rsi, r9
jbe 0x1004911f9
sub rsi, r9
lea rbx, [rsi + r10]
cmp rbx, r13
jl 0x1004911e7
test r13, r13
je 0x100491228
lea rax, [r13 + r13*2]
mov r13, rax
shr r13, 0x3f
add r13, rax
lea rax, [rsi + rbx]
sar r13, 1
cmp rax, r13
cmovge r13, rax
mov rdx, r13
mov rcx, r15
mov qword [rbp - 0x28], r10
mov qword [rbp - 0x18], r9
call sub.msys_2.0.dll_realloc
mov r9, qword [rbp - 0x18]
mov r10, qword [rbp - 0x28]
test rax, rax
je 0x1004912ec
mov r15, rax
lea rcx, [r15 + r10]
mov r8, rsi
mov rdx, r9
call sub.msys_2.0.dll_memcpy
mov r10, rbx
cmp rdi, qword [rbp - 0x30]
jl 0x100490e60
cmp byte [rbp - 0x60], 0
jne 0x100490e60
jmp 0x100490fe9
mov rcx, r10
call sym.vim.exe_vim_free
jmp 0x100490fd4
movzx eax, byte [rsi - 2]
jmp 0x1004910f6
mov r13, rsi
jmp 0x1004911c0
movabs rax, 0x7fffffffffffffff
mov r9d, dword [r12 + 0x20]
mov qword [rbp - 0x30], rax
test r9d, r9d
je 0x100490d23
lea rcx, [r12 + 0x20]
call sym.vim.exe_tv_get_number
mov qword [rbp - 0x30], rax
jmp 0x100490d23
mov rax, qword [rbp - 0x30]
test rax, rax
jns 0x100490fe9
neg rax
mov rsi, qword [rbp - 0x38]
mov rbx, rax
cmp rax, rdi
jge 0x100490fe9
mov rcx, qword [rsi + 8]
sub rdi, 1
mov rdx, qword [rcx]
call sym.vim.exe_listitem_remove
cmp rbx, rdi
jne 0x100491280
jmp 0x100490fe9
lea r9, [rsi + 1]
mov rsi, r9
jmp 0x100490e98
mov rax, qword [rbp - 0x38]
mov rcx, qword [rbp - 0x58]
mov rdx, qword [rax + 8]
call sym.vim.exe_read_blob
test eax, eax
je 0x100661da2
mov rcx, qword [rbp - 0x58]
add rsp, 0x478
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp fcn.10065e4f0
mov rsi, rcx
jmp 0x100490e98
mov r8, qword [rbp - 0x18]
jmp 0x100490fca
mov rcx, r13
call sym.vim.exe_do_outofmem_msg
jmp 0x100490fd4
mov rcx, qword [sym.vim.exe_e_notread]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r12
mov rcx, rax
call sym.vim.exe_semsg
mov rdi, qword [rbp - 0x38]
mov rcx, qword [rdi + 8]
call sym.vim.exe_blob_free
mov qword [rdi + 8], 0
jmp 0x1004912bf
mov rcx, qword [sym.vim.exe_e_src_is_directory]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r12
mov rcx, rax
add rsp, 0x478
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp sym.vim.exe_semsg
cmp byte [r12], 0
jne 0x100661e13
lea rcx, [0x1006a3b00]
call sub.msys_intl_8.dll_libintl_gettext
mov r12, rax
mov rcx, qword [sym.vim.exe_e_notopen]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r12
mov rcx, rax
add rsp, 0x478
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp sym.vim.exe_semsg