Function at 0x100657460
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov esi, edx
mov qword [rsp + 0x90], r8
mov rbx, rcx
mov ebp, r9d
lea rax, [rsi + rsi*8]
mov rdi, rsi
lea rax, [rsi + rax*4]
lea r12, [rcx + rax*8]
mov r14d, dword [r12 + 0x18]
cmp r14d, 0xffffffff
je 0x1006576b0
mov r8d, dword [rcx + 0x518]
test r8d, r8d
je 0x1006574ba
mov ecx, dword [r12 + 0x9c]
test ecx, ecx
je 0x100657750
cmp qword [0x10072c848], 0
je 0x100657548
mov r8d, edi
mov rdx, rbx
lea rcx, str.SEND
call fcn.1006548c0
mov rdx, qword [0x10072c848]
mov ecx, 0x27
call sub.msys_2.0.dll_fputc
mov r9, qword [0x10072c848]
movsxd rdx, ebp
mov rcx, qword [rsp + 0x90]
mov r8d, 1
call sub.msys_2.0.dll_fwrite
mov rdx, qword [sym.vim.exe_vim_ignored]
mov r9, qword [0x10072c848]
mov r8d, 2
lea rcx, [0x1006e9a95]
mov dword [rdx], eax
mov edx, 1
call sub.msys_2.0.dll_fwrite
mov rcx, qword [0x10072c848]
call sub.msys_2.0.dll_fflush
mov rax, qword [sym.vim.exe_did_repeated_msg]
mov dword [rax], 0
lea rax, [rsi + rsi*8]
xor r13d, r13d
lea rax, [rsi + rax*4]
lea rdi, [rbx + rax*8]
mov rax, qword [rdi + 0xb8]
test rax, rax
je 0x10065763e
mov r15, qword [rax + 0x10]
mov r12d, dword [rax]
mov r13d, 1
movsxd r8, r12d
mov rdx, r15
mov ecx, r14d
call sub.msys_2.0.dll_write
mov r10d, eax
test eax, eax
js 0x100657690
mov edx, dword [rdi + 0x9c]
test edx, edx
je 0x1006576f4
mov r9, qword [rdi + 0xb8]
test r13d, r13d
jne 0x100657660
cmp r12d, r10d
jne 0x1006577a0
test r9, r9
jne 0x1006575f8
test r13d, r13d
jne 0x1006575e0
mov dword [rbx + 0x4d4], 0
mov eax, 1
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, str.Write_queue_empty
mov rcx, rbx
call sym.vim.exe_ch_log
jmp 0x1006575be
mov rcx, r9
mov qword [rsp + 0x20], r9
call sym.vim.exe_ga_clear
mov r9, qword [rsp + 0x20]
mov rax, qword [r9 + 0x18]
mov qword [rdi + 0xb8], rax
test rax, rax
je 0x100657788
mov qword [rax + 0x20], 0
mov rcx, r9
call sym.vim.exe_vim_free
mov rax, qword [rdi + 0xb8]
test rax, rax
jne 0x100657567
test ebp, ebp
je 0x1006578ea
mov r15, qword [rsp + 0x90]
mov r12d, ebp
jmp 0x100657574
mov r8d, r10d
lea rdx, str.Sent__d_bytes_now
mov rcx, rbx
mov qword [rsp + 0x28], r9
mov dword [rsp + 0x20], r10d
call sym.vim.exe_ch_log
mov r9, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x20]
jmp 0x1006575ab
mov dword [rsp + 0x20], eax
call sub.msys_2.0.dll___errno
mov r10d, dword [rsp + 0x20]
cmp dword [rax], 0xb
jne 0x1006576e0
xor r10d, r10d
jmp 0x10065758d
mov r9d, dword [rcx + 0x4d4]
test r9d, r9d
jne 0x1006576cb
cmp qword [rsp + 0xa0], 0
jne 0x100657919
mov dword [rbx + 0x4d4], 1
xor eax, eax
jmp 0x1006575cd
mov dword [rsp + 0x20], r10d
call sub.msys_2.0.dll___errno
mov r10d, dword [rsp + 0x20]
cmp dword [rax], 0xb
je 0x1006576a3
cmp r12d, r10d
je 0x1006575be
mov eax, dword [rbx + 0x4d4]
test eax, eax
jne 0x1006576cb
cmp qword [rsp + 0xa0], 0
je 0x1006576cb
mov r8, qword [rsp + 0xa0]
lea rdx, str._s__:_write_failed
mov rcx, rbx
call fcn.1006549a0
mov rcx, qword [sym.vim.exe_e_str_write_failed]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, qword [rsp + 0xa0]
mov rcx, rax
call sym.vim.exe_semsg
jmp 0x1006576cb
mov r8d, 0x4000
mov edx, 4
mov ecx, r14d
call sub.msys_2.0.dll_fcntl
cmp qword [0x10072c848], 0
mov dword [r12 + 0x9c], 1
jne 0x1006574c8
jmp 0x100657548
mov qword [rdi + 0xc0], 0
jmp 0x100657626
test r9, r9
je 0x1006578f4
test r10d, r10d
je 0x1006577da
mov rcx, qword [r9 + 0x10]
sub r12d, r10d
movsxd rdx, r10d
mov qword [rsp + 0x28], r9
movsxd r8, r12d
mov dword [rsp + 0x20], r10d
add rdx, rcx
call sub.msys_2.0.dll_memmove
mov r9, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x20]
sub dword [r9], r10d
mov r8d, ebp
lea rdx, str.Adding__d_bytes_to_the_write_queue
mov rcx, rbx
call sym.vim.exe_ch_log
lea rax, [rsi + rsi*8]
lea rax, [rsi + rax*4]
mov rdi, qword [rbx + rax*8 + 0xc0]
test rdi, rdi
je 0x100657848
mov eax, dword [rdi]
add eax, ebp
cmp eax, 0xf9f
jg 0x100657848
test ebp, ebp
jle 0x1006575be
mov edx, ebp
mov rcx, rdi
call sym.vim.exe_ga_grow
cmp eax, 1
jne 0x1006575be
mov rdx, qword [rsp + 0x90]
movsxd rcx, dword [rdi]
movsxd r8, ebp
add rcx, qword [rdi + 0x10]
call sub.msys_2.0.dll_memmove
add dword [rdi], ebp
jmp 0x1006575be
mov ecx, 0x28
call sym.vim.exe_alloc
mov rdi, rax
test rax, rax
je 0x1006575be
lea rax, [rsi + rsi*8]
lea rax, [rsi + rax*4]
lea rax, [rbx + rax*8]
mov rdx, qword [rax + 0xc0]
mov qword [rdi + 0x18], 0
mov qword [rdi + 0x20], rdx
mov rdx, qword [rax + 0xc0]
test rdx, rdx
je 0x10065790d
mov qword [rdx + 0x18], rdi
lea rax, [rsi + rsi*8]
mov r8d, 0x3e8
mov edx, 1
mov rcx, rdi
lea rax, [rsi + rax*4]
mov qword [rbx + rax*8 + 0xc0], rdi
call sym.vim.exe_ga_init2
test ebp, ebp
jle 0x1006575be
mov edx, ebp
mov rcx, rdi
call sym.vim.exe_ga_grow
cmp eax, 1
jne 0x1006575be
mov rcx, qword [rdi + 0x10]
mov rdx, qword [rsp + 0x90]
movsxd r8, ebp
call sub.msys_2.0.dll_memmove
mov dword [rdi], ebp
jmp 0x1006575be
mov eax, 1
jmp 0x1006575cd
movsxd rax, r10d
mov ebp, r12d
add rax, r15
sub ebp, r10d
mov qword [rsp + 0x90], rax
jmp 0x1006577da
mov qword [rax + 0xb8], rdi
jmp 0x100657891
mov r8, qword [rsp + 0xa0]
lea rdx, str._s__:_write_while_not_connected
call fcn.1006549a0
mov rcx, qword [sym.vim.exe_e_str_write_while_not_connected]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, qword [rsp + 0xa0]
mov rcx, rax
call sym.vim.exe_semsg
jmp 0x1006576cb