Function at 0x1004e97c0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov dword [rdx], 7
mov r13, rcx
mov r12, rdx
mov ebx, r8d
mov qword [rdx + 8], 0
call sym.vim.exe_check_restricted
test eax, eax
je 0x1004e9810
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call sym.vim.exe_check_secure
mov esi, eax
test eax, eax
jne 0x1004e97f3
call sym.vim.exe_in_vim9script
test eax, eax
jne 0x1004e99a0
mov eax, dword [r13 + 0x10]
xor r14d, r14d
test eax, eax
jne 0x1004e9a38
mov rax, qword [sym.vim.exe_msg_silent]
mov rcx, r13
cmp dword [rax], 1
sbb edi, edi
and edi, 4
add edi, 0x10
test ebx, ebx
je 0x1004e99d0
call sym.vim.exe_tv_get_string
mov r13, rax
call sym.vim.exe_check_restricted
test eax, eax
jne 0x1004e9a08
call sym.vim.exe_check_secure
mov esi, eax
test eax, eax
jne 0x1004e9a08
mov rcx, r13
lea r9, [rsp + 0x30]
mov r8d, edi
mov rdx, r14
call fcn.1004e94c0
mov r13, rax
test rax, rax
je 0x1004e9a08
call sym.vim.exe_list_alloc
mov r15, rax
test rax, rax
je 0x1004e9c36
mov eax, dword [rsp + 0x30]
mov edi, 0xa
test eax, eax
jle 0x1004e9974
nop dword [rax]
movsxd rdx, esi
lea r8, [r13 + rdx]
mov rbx, r8
nop dword [rax + rax]
cmp byte [rbx], 0xa
je 0x1004e9b98
add esi, 1
add rbx, 1
cmp esi, eax
jl 0x1004e98d0
movsxd rcx, esi
lea rbx, [r13 + rcx]
sub rcx, rdx
mov qword [rsp + 0x20], r8
add rcx, 1
call sym.vim.exe_alloc
mov rbp, rax
test rax, rax
je 0x1004e9bb0
mov r8, qword [rsp + 0x20]
cmp r8, rbx
jae 0x1004e9ba0
sub rbx, r8
xor eax, eax
nop dword [rax]
movzx edx, byte [r8 + rax]
test dl, dl
cmove edx, edi
mov byte [rbp + rax], dl
add rax, 1
cmp rbx, rax
jne 0x1004e9920
add rbx, rbp
mov byte [rbx], 0
call sym.vim.exe_listitem_alloc
mov rdx, rax
test rax, rax
je 0x1004e9ba8
mov dword [rax + 0x10], 7
mov rcx, r15
add esi, 1
mov byte [rax + 0x14], 0
mov qword [rax + 0x18], rbp
call sym.vim.exe_list_append
mov eax, dword [rsp + 0x30]
cmp eax, esi
jg 0x1004e98c0
mov rdx, r15
mov rcx, r12
call sym.vim.exe_rettv_list_set
test r14, r14
je 0x1004e9994
mov rcx, r14
call sub.msys_2.0.dll_unlink
mov rcx, r14
call sym.vim.exe_vim_free
mov rcx, r13
jmp 0x1004e9a1c
xor edx, edx
mov rcx, r13
call sym.vim.exe_check_for_string_arg
test eax, eax
je 0x1004e97f3
mov edx, 1
mov rcx, r13
call sym.vim.exe_check_for_opt_string_or_number_or_list_arg
test eax, eax
jne 0x1004e9828
jmp 0x1004e97f3
call sym.vim.exe_tv_get_string
mov r13, rax
call sym.vim.exe_check_restricted
test eax, eax
jne 0x1004e9ad8
call sym.vim.exe_check_secure
test eax, eax
jne 0x1004e9ad8
xor r9d, r9d
mov r8d, edi
mov rdx, r14
mov rcx, r13
call fcn.1004e94c0
mov qword [r12 + 8], rax
test r14, r14
je 0x1004e97f3
mov rcx, r14
call sub.msys_2.0.dll_unlink
mov rcx, r14
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.vim.exe_vim_free
mov edx, 1
mov ecx, 0x69
call sym.vim.exe_vim_tempname
mov r14, rax
test rax, rax
je 0x1004e9c0f
lea rdx, [0x1006c813a]
mov rcx, rax
call sub.msys_2.0.dll_fopen
mov r15, rax
test rax, rax
je 0x100678716
mov eax, dword [r13 + 0x10]
cmp eax, 5
je 0x1004e9adf
cmp eax, 0xb
je 0x1004e9be8
lea rdx, [rsp + 0x30]
lea rcx, [r13 + 0x10]
call sym.vim.exe_tv_get_string_buf_chk
mov rsi, rax
test rax, rax
je 0x1004e9c6b
mov rcx, rax
call sub.msys_2.0.dll_strlen
mov rcx, r15
test rax, rax
jne 0x1004e9c44
call fcn.100672bf0
test eax, eax
je 0x1004e9837
mov rcx, qword [sym.vim.exe_e_error_writing_temp_file]
call sub.msys_intl_8.dll_libintl_gettext
mov rcx, rax
call sym.vim.exe_emsg
jmp 0x1004e9a11
xor eax, eax
jmp 0x1004e9a03
mov ecx, dword [r13 + 0x18]
call sym.vim.exe_buflist_findnr
mov qword [rsp + 0x28], rax
test rax, rax
je 0x1006786d0
mov qword [rsp + 0x20], 1
xor edi, edi
cmp qword [rax], 0
jle 0x1004e9b7f
nop word [rax + rax]
mov rcx, qword [rsp + 0x28]
mov rdx, qword [rsp + 0x20]
xor r8d, r8d
call sym.vim.exe_ml_get_buf
movzx ecx, byte [rax]
mov rbp, rax
test cl, cl
jne 0x1004e9b3c
jmp 0x1004e9b54
movzx ecx, byte [rbp + 1]
add rbp, 1
test cl, cl
je 0x1004e9b54
cmp cl, 0xa
mov rdx, r15
cmove ecx, edi
call sub.msys_2.0.dll_putc
cmp eax, 0xffffffff
jne 0x1004e9b30
mov esi, 1
mov rdx, r15
mov ecx, 0xa
call sub.msys_2.0.dll_putc
cmp eax, 0xffffffff
je 0x1004e9c66
mov rcx, qword [rsp + 0x28]
add qword [rsp + 0x20], 1
mov rax, qword [rsp + 0x20]
cmp qword [rcx], rax
jge 0x1004e9b10
mov rcx, r15
call fcn.100672bf0
or eax, esi
je 0x1004e9837
jmp 0x1004e9abb
movsxd rcx, esi
jmp 0x1004e98ec
mov rbx, rax
jmp 0x1004e993a
mov rcx, rbp
call sym.vim.exe_vim_free
test r14, r14
je 0x1004e9bc5
mov rcx, r14
call sub.msys_2.0.dll_unlink
mov rcx, r14
call sym.vim.exe_vim_free
mov rcx, r13
call sym.vim.exe_vim_free
mov rcx, r15
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.vim.exe_list_free
mov rdx, qword [r13 + 0x18]
mov rcx, r15
mov r8d, 1
call sym.vim.exe_write_list
mov rcx, r15
test eax, eax
jne 0x1004e9aae
call fcn.100672bf0
jmp 0x1004e9abb
mov rcx, qword [sym.vim.exe_e_cant_get_temp_file_name]
call sub.msys_intl_8.dll_libintl_gettext
mov rcx, rax
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.vim.exe_emsg
test r14, r14
jne 0x1004e9984
jmp 0x1004e9994
mov rcx, rsi
mov r9, r15
mov r8d, 1
mov rdx, rax
call sub.msys_2.0.dll_fwrite
mov rcx, r15
cmp rax, 1
jne 0x1004e9c05
jmp 0x1004e9aae
mov rcx, r15
jmp 0x1004e9c05
mov rcx, r15
call fcn.100672bf0
jmp 0x1004e9a11
xor r8d, r8d
jmp 0x1004e97c0
mov rcx, qword [sym.vim.exe_e_buffer_nr_does_not_exist]
mov r12, qword [r13 + 0x18]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r12
mov rcx, rax
call sym.vim.exe_semsg
mov rcx, r15
call fcn.100672bf0
mov rcx, r14
call sub.msys_2.0.dll_unlink
mov rcx, r14
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.vim.exe_vim_free
mov rcx, qword [sym.vim.exe_e_cant_open_file_str]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r14
mov rcx, rax
call sym.vim.exe_semsg
jmp 0x1006786f3