Function at 0x10042ae60
Capabilities:
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0xb8
lea rbp, [rsp + 0x80]
mov r15, rcx
mov ecx, dword [rcx + 0x50]
mov dword [rbp - 0x50], edx
mov rsi, r8
test ecx, ecx
je 0x10042b228
mov edx, 8
lea rcx, [r15 + 0x38]
mov r8d, 0x3e8
call sym.vim.exe_ga_init2
mov edx, dword [r15 + 0x50]
test edx, edx
je 0x10042b280
mov rax, qword [sym.vim.exe_curtab]
movsxd r13, dword [rbp - 0x50]
mov rax, qword [rax]
mov r12, qword [rax + r13*8 + 0x68]
test rsi, rsi
je 0x10042af1d
mov eax, dword [rsi + 0x3c]
test eax, eax
je 0x10042af1d
cmp r13d, 8
je 0x10042badc
mov ebx, r13d
jmp 0x10042aefa
mov rax, qword [sym.vim.exe_curtab]
add ebx, 1
mov rax, qword [rax]
cmp ebx, 8
je 0x10042af18
movsxd rdx, ebx
mov r12, qword [rax + rdx*8 + 0x68]
mov rcx, r12
call sym.vim.exe_buf_valid
test eax, eax
je 0x10042aee0
xor edx, edx
mov rcx, r12
call sym.vim.exe_buf_check_timestamp
jmp 0x10042aee0
mov r12, qword [rax + r13*8 + 0x68]
mov rdx, r15
mov rcx, r12
call fcn.10042ab00
test eax, eax
je 0x10042b1f5
mov eax, dword [rbp - 0x50]
add eax, 1
mov dword [rbp - 0x4c], eax
mov dword [rbp - 0x2c], eax
cmp eax, 7
jg 0x10042b1e4
mov qword [rbp - 0x48], r15
nop dword [rax]
mov rax, qword [sym.vim.exe_curtab]
movsxd rdi, dword [rbp - 0x2c]
mov rax, qword [rax]
mov qword [rbp - 0x40], rdi
mov rcx, qword [rax + rdi*8 + 0x68]
test rcx, rcx
je 0x10042b1d0
cmp qword [rcx + 8], 0
je 0x10042b1d0
mov rsi, qword [rbp - 0x48]
lea rdx, [rsi + 0x18]
call fcn.10042ab00
test eax, eax
je 0x10042b1d0
mov rcx, rsi
call fcn.10042a7d0
test eax, eax
je 0x10042b1d0
mov rax, qword [sym.vim.exe_curtab]
mov rax, qword [rax]
mov rbx, qword [rax + 0x60]
mov rax, qword [rsi + 0x30]
mov qword [rbp - 0x28], rax
test rax, rax
je 0x10042b930
lea rdx, [0x100690f74]
mov rcx, rax
mov r14d, 2
call sub.msys_2.0.dll_fopen
mov qword [rbp - 0x28], rax
test rax, rax
je 0x10042bac3
mov dword [rbp - 0x30], 0
mov r15d, 1
xor r12d, r12d
nop dword [rax]
cmp qword [rbp - 0x28], 0
je 0x10042b4f0
lea rsi, [rbp - 0x10]
mov r8, qword [rbp - 0x28]
mov edx, 0x32
mov rcx, rsi
call sym.vim.exe_vim_fgets
test eax, eax
jne 0x10042b130
mov r9, rsi
cmp r14d, 2
je 0x10042b51b
test r14d, r14d
je 0x10042b398
cmp byte [r9], 0x40
jne 0x10042b620
cmp byte [r9 + 1], 0x40
jne 0x10042b620
cmp byte [r9 + 2], 0x20
jne 0x10042b620
movzx eax, byte [r9]
mov r14d, 1
cmp al, 0x40
jne 0x10042aff8
lea rax, [r9 + 2]
mov qword [rbp - 0x18], rax
cmp byte [r9 + 1], 0x40
jne 0x10042aff8
lea rax, [r9 + 3]
mov qword [rbp - 0x18], rax
cmp byte [r9 + 2], 0x20
jne 0x10042aff8
lea rax, [r9 + 4]
mov qword [rbp - 0x18], rax
cmp byte [r9 + 3], 0x2d
jne 0x10042aff8
lea rcx, [rbp - 0x18]
mov edi, 1
mov qword [rbp - 0x38], rcx
call sym.vim.exe_getdigits
mov rcx, qword [rbp - 0x38]
mov rsi, rax
mov rax, qword [rbp - 0x18]
cmp byte [rax], 0x2c
je 0x10042bafc
lea rdx, [rax + 1]
mov qword [rbp - 0x18], rdx
cmp byte [rax], 0x20
jne 0x10042b620
lea rdx, [rax + 2]
mov r14d, 1
mov qword [rbp - 0x18], rdx
cmp byte [rax + 1], 0x2b
jne 0x10042aff8
mov qword [rbp - 0x38], rcx
call sym.vim.exe_getdigits
mov rcx, qword [rbp - 0x38]
mov r9, rax
mov rax, qword [rbp - 0x18]
cmp byte [rax], 0x2c
je 0x10042bb19
cmp rdi, 1
mov r8d, 1
adc rsi, 0
test r9, r9
jne 0x10042b11e
mov r9d, 1
mov r14d, 1
jmp 0x10042b468
test rbx, rbx
je 0x10042b197
test r15d, r15d
jne 0x10042ba9f
mov rax, qword [rbx]
test rax, rax
je 0x10042b190
xor edx, edx
test rbx, rbx
je 0x10042b165
mov rdi, qword [rbp - 0x40]
mov rdx, qword [rbx + r13*8 + 0x48]
add rdx, qword [rbx + r13*8 + 8]
sub rdx, qword [rbx + rdi*8 + 0x48]
sub rdx, qword [rbx + rdi*8 + 8]
mov rcx, qword [rax + r13*8 + 8]
mov rsi, qword [rbp - 0x40]
mov rbx, rax
sub rcx, rdx
mov rdx, qword [rax + r13*8 + 0x48]
mov qword [rax + rsi*8 + 8], rcx
mov qword [rax + rsi*8 + 0x48], rdx
mov rax, qword [rbx]
test rax, rax
jne 0x10042b146
nop dword [rax + rax]
cmp qword [rbp - 0x28], 0
je 0x10042b1a0
mov rcx, qword [rbp - 0x28]
call fcn.10065e4f0
mov rax, qword [rbp - 0x48]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x10042b9d8
call sub.msys_2.0.dll_unlink
mov rax, qword [rbp - 0x48]
mov rcx, qword [rax + 0x30]
test rcx, rcx
je 0x10042b9ba
call sub.msys_2.0.dll_unlink
nop dword [rax]
add dword [rbp - 0x2c], 1
mov eax, dword [rbp - 0x2c]
cmp eax, 8
jne 0x10042af50
mov r15, qword [rbp - 0x48]
mov rcx, qword [r15]
test rcx, rcx
je 0x10042ba70
call sub.msys_2.0.dll_unlink
mov rcx, qword [r15]
call sym.vim.exe_vim_free
mov rcx, qword [r15 + 0x18]
call sym.vim.exe_vim_free
mov rcx, qword [r15 + 0x30]
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp sym.vim.exe_vim_free
mov edx, 1
mov ecx, 0x6f
call sym.vim.exe_vim_tempname
mov edx, 1
mov ecx, 0x6e
mov qword [r15], rax
call sym.vim.exe_vim_tempname
mov ecx, 0x64
mov edx, 1
mov qword [r15 + 0x18], rax
call sym.vim.exe_vim_tempname
mov rcx, qword [r15]
mov qword [r15 + 0x30], rax
test rcx, rcx
je 0x10042b1f8
cmp qword [r15 + 0x18], 0
je 0x10042b1f8
test rax, rax
je 0x10042b1f8
mov edx, dword [r15 + 0x50]
test edx, edx
jne 0x10042aeaf
mov qword [rbp - 0x28], rsi
mov rdi, qword [sym.vim.exe_p_dex]
xor ebx, ebx
mov r12d, 1
jmp 0x10042b36c
mov r9, rax
mov r8d, 1
mov edx, 6
lea rcx, str.line1_n
call sub.msys_2.0.dll_fwrite
mov rcx, r13
cmp rax, 1
cmovne ebx, r12d
call fcn.10065e4f0
mov rcx, qword [r15 + 0x18]
lea rdx, [0x100690f64]
call sub.msys_2.0.dll_fopen
mov r13, rax
test rax, rax
je 0x10042b8e8
mov r9, rax
mov r8d, 1
mov edx, 6
lea rcx, str.line2_n
call sub.msys_2.0.dll_fwrite
mov rcx, r13
cmp rax, 1
cmovne ebx, r12d
xor r14d, r14d
call fcn.10065e4f0
mov rcx, r15
call fcn.10042a7d0
cmp eax, 1
je 0x10042b9ff
mov ebx, 1
mov rcx, qword [r15 + 0x30]
call sub.msys_2.0.dll_unlink
mov rcx, qword [r15 + 0x18]
call sub.msys_2.0.dll_unlink
mov rcx, qword [r15]
call sub.msys_2.0.dll_unlink
mov rax, qword [rdi]
cmp byte [rax], 0
jne 0x10042b97f
cmp dword [0x10066d630], 2
jne 0x10042b97f
mov dword [0x10066d630], r14d
test r14d, r14d
jne 0x10042ba89
mov rcx, qword [r15]
lea rdx, [0x100690f64]
call sub.msys_2.0.dll_fopen
mov r13, rax
test rax, rax
jne 0x10042b2a0
xor r14d, r14d
mov ebx, 1
jmp 0x10042b343
mov qword [rbp - 0x38], r9
call sub.msys_2.0.dll___locale_ctype_ptr
mov r9, qword [rbp - 0x38]
movzx edx, byte [r9]
test byte [rdx + rax + 1], 4
je 0x10042b610
lea rcx, [rbp - 0x18]
mov qword [rbp - 0x18], r9
mov qword [rbp - 0x38], rcx
call sym.vim.exe_getdigits
mov rcx, qword [rbp - 0x38]
mov rsi, rax
mov rax, qword [rbp - 0x18]
mov r14, rsi
movzx r8d, byte [rax]
cmp r8b, 0x2c
je 0x10042b830
lea r9d, [r8 - 0x63]
cmp r9b, 1
seta dil
cmp r8b, 0x61
setne r8b
and dil, r8b
jne 0x10042b610
lea r8, [rax + 1]
mov qword [rbp - 0x38], rcx
mov qword [rbp - 0x18], r8
movzx eax, byte [rax]
mov byte [rbp - 0x58], al
call sym.vim.exe_getdigits
mov rcx, qword [rbp - 0x38]
mov r9, rax
mov rax, qword [rbp - 0x18]
mov r8, r9
cmp byte [rax], 0x2c
je 0x10042b858
cmp rsi, r14
jg 0x10042b610
test dil, dil
jne 0x10042b610
movzx ecx, byte [rbp - 0x58]
cmp cl, 0x61
je 0x10042b818
mov rdx, r14
sub rdx, rsi
lea rdi, [rdx + 1]
cmp ecx, 0x64
jne 0x10042b81e
add r9, 1
xor r8d, r8d
xor r14d, r14d
test rbx, rbx
je 0x10042b641
mov rax, qword [rbp - 0x40]
mov qword [rbp - 0x38], r8
lea r10, [r13 + 8]
lea r11, [rax + 8]
mov r8, rax
jmp 0x10042b4a8
mov rax, qword [rbx]
mov r15d, 1
mov r12, rbx
test rax, rax
je 0x10042b7e0
mov rbx, rax
mov rax, qword [rbx + r13*8 + 8]
mov rdx, qword [rbx + r10*8 + 8]
lea rcx, [rax + rdx]
cmp rcx, rsi
jge 0x10042b630
test r15d, r15d
je 0x10042b490
test r12, r12
je 0x10042b4e0
mov rcx, qword [r12 + r10*8 + 8]
add rcx, qword [r12 + r13*8 + 8]
sub rcx, qword [r12 + r11*8 + 8]
sub rcx, qword [r12 + r8*8 + 8]
sub rax, rcx
mov qword [rbx + r8*8 + 8], rax
mov qword [rbx + r11*8 + 8], rdx
jmp 0x10042b490
mov rax, qword [rbp - 0x48]
mov edi, dword [rbp - 0x30]
cmp dword [rax + 0x38], edi
jle 0x10042b9f1
mov rax, qword [rax + 0x48]
movsxd rdx, edi
mov r9, qword [rax + rdx*8]
lea eax, [rdi + 1]
mov dword [rbp - 0x30], eax
cmp r14d, 2
jne 0x10042b02d
mov qword [rbp - 0x38], r9
call sub.msys_2.0.dll___locale_ctype_ptr
mov r9, qword [rbp - 0x38]
mov r8, rax
movzx edx, byte [r9]
mov rax, rdx
test byte [rdx + r8 + 1], 4
jne 0x10042b398
cmp byte [r9], 0x40
jne 0x10042b560
cmp byte [r9 + 1], 0x40
jne 0x10042b560
cmp byte [r9 + 2], 0x20
je 0x10042b05a
nop word cs:[rax + rax]
mov ecx, 4
mov rsi, r9
lea rdi, [0x100690fe4]
mov qword [rbp - 0x38], r9
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x10042aff8
lea r10, [rbp - 0x10]
mov r8, qword [rbp - 0x28]
mov edx, 0x32
mov rcx, r10
mov qword [rbp - 0x58], r10
call sym.vim.exe_vim_fgets
test eax, eax
jne 0x10042aff8
mov r9, qword [rbp - 0x38]
mov ecx, 4
lea rdi, [0x100690fe9]
mov rsi, r9
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x10042aff8
mov r10, qword [rbp - 0x58]
mov r8, qword [rbp - 0x28]
mov edx, 0x32
mov rcx, r10
call sym.vim.exe_vim_fgets
test eax, eax
jne 0x10042aff8
mov r9, qword [rbp - 0x38]
cmp byte [r9], 0x40
jne 0x10042aff8
cmp byte [r9 + 1], 0x40
jne 0x10042aff8
cmp byte [r9 + 2], 0x20
je 0x10042b056
jmp 0x10042aff8
xor r14d, r14d
jmp 0x10042aff8
mov r14d, 1
jmp 0x10042aff8
lea r10, [rsi + rdi]
mov r8, qword [rbp - 0x38]
cmp rax, r10
jle 0x10042b710
mov rax, qword [sym.vim.exe_curtab]
mov ecx, 0x88
mov qword [rbp - 0x58], r9
mov qword [rbp - 0x38], r8
mov r15, qword [rax]
call sym.vim.exe_alloc
mov r8, qword [rbp - 0x38]
mov r9, qword [rbp - 0x58]
test rax, rax
je 0x10042b190
mov qword [rax], rbx
test r12, r12
jne 0x10042baf4
mov qword [r15 + 0x60], rax
mov rbx, rax
mov rax, qword [rbp - 0x40]
lea rdx, [rbx + r13*8]
mov qword [rdx + 0x48], rdi
mov edi, dword [rbp - 0x2c]
mov qword [rdx + 8], rsi
mov qword [rbx + rax*8 + 8], r9
mov qword [rbx + rax*8 + 0x48], r8
cmp dword [rbp - 0x4c], edi
jge 0x10042b701
mov rax, qword [sym.vim.exe_curtab]
mov r11d, dword [rbp - 0x2c]
lea r9, [r13 + 8]
mov r8, qword [rax]
movsxd rax, dword [rbp - 0x4c]
nop dword [rax]
cmp qword [r8 + rax*8 + 0x68], 0
je 0x10042b6f8
xor ecx, ecx
test r12, r12
je 0x10042b6e3
mov rcx, qword [r12 + r9*8 + 8]
add rcx, qword [r12 + r13*8 + 8]
sub rcx, qword [r12 + rax*8 + 0x48]
sub rcx, qword [r12 + rax*8 + 8]
mov r10, qword [rdx + 8]
sub r10, rcx
mov qword [rbx + rax*8 + 8], r10
mov rcx, qword [rdx + 0x48]
mov qword [rbx + rax*8 + 0x48], rcx
add rax, 1
cmp r11d, eax
jg 0x10042b6c0
xor r15d, r15d
jmp 0x10042aff8
mov rdx, rbx
jmp 0x10042b71f
cmp r10, qword [rdx + r13*8 + 8]
jl 0x10042b72a
mov r11, rdx
mov rdx, qword [rdx]
test rdx, rdx
jne 0x10042b718
sub rax, rsi
test rax, rax
jg 0x10042b880
test r15d, r15d
je 0x10042b8f8
mov rsi, qword [rbp - 0x40]
add r9, rax
sub r8, rax
mov qword [rbx + rsi*8 + 0x48], r8
sub r10, qword [r11 + r13*8 + 0x48]
mov qword [rbx + rsi*8 + 8], r9
sub r10, qword [r11 + r13*8 + 8]
js 0x10042b96b
mov esi, dword [rbp - 0x2c]
cmp dword [rbp - 0x50], esi
jge 0x10042b7a8
mov rax, qword [sym.vim.exe_curtab]
mov rsi, qword [rax]
mov r8d, dword [rbp - 0x2c]
mov rax, r13
nop dword [rax]
cmp qword [rsi + rax*8 + 0x68], 0
je 0x10042b79f
mov rcx, qword [r11 + rax*8 + 0x48]
add rcx, qword [r11 + rax*8 + 8]
sub rcx, qword [rbx + rax*8 + 8]
add rcx, r10
mov qword [rbx + rax*8 + 0x48], rcx
add rax, 1
cmp r8d, eax
jg 0x10042b780
mov rsi, qword [rbx]
mov qword [rbx], rdx
cmp rsi, rdx
je 0x10042b701
nop word [rax + rax]
mov rcx, rsi
mov rsi, qword [rsi]
call sym.vim.exe_vim_free
cmp rsi, qword [rbx]
jne 0x10042b7c0
xor r15d, r15d
jmp 0x10042aff8
mov ecx, 0x88
mov qword [rbp - 0x58], r9
call sym.vim.exe_alloc
mov r8, qword [rbp - 0x38]
mov r9, qword [rbp - 0x58]
test rax, rax
mov rbx, rax
je 0x10042b190
mov qword [rbx], 0
mov qword [r12], rbx
jmp 0x10042b681
add rsi, 1
xor edi, edi
sub r8, r9
xor r14d, r14d
add r8, 1
jmp 0x10042b468
add rax, 1
mov qword [rbp - 0x18], rax
call sym.vim.exe_getdigits
mov rcx, qword [rbp - 0x38]
mov r14, rax
mov rax, qword [rbp - 0x18]
movzx r8d, byte [rax]
jmp 0x10042b3e1
add rax, 1
mov qword [rbp - 0x38], r9
mov qword [rbp - 0x18], rax
call sym.vim.exe_getdigits
mov r9, qword [rbp - 0x38]
mov r8, rax
cmp r9, rax
setg dil
jmp 0x10042b42c
mov edi, dword [rbp - 0x2c]
cmp dword [rbp - 0x50], edi
jge 0x10042b93b
mov rsi, qword [sym.vim.exe_curtab]
mov rcx, r13
mov rsi, qword [rsi]
nop dword [rax]
cmp qword [rsi + rcx*8 + 0x68], 0
je 0x10042b8ad
sub qword [rbx + rcx*8 + 8], rax
add rcx, 1
cmp edi, ecx
jg 0x10042b8a0
mov rax, qword [rbp - 0x40]
mov qword [rbx + rax*8 + 0x48], r8
sub r10, qword [r11 + r13*8 + 0x48]
mov qword [rbx + rax*8 + 8], r9
sub r10, qword [r11 + r13*8 + 8]
jns 0x10042b775
test r15d, r15d
jne 0x10042b962
xor r10d, r10d
jmp 0x10042b76b
xor r14d, r14d
mov ebx, 1
jmp 0x10042b33b
lea r9, [r11 + r13*8]
sub r8, rdi
mov rsi, qword [rbp - 0x40]
mov rax, qword [r9 + 8]
add r8, rax
add r8, qword [r9 + 0x48]
sub r8, rcx
add qword [rbx + rsi*8 + 0x48], r8
add rax, qword [r9 + 0x48]
sub r10, rax
mov eax, 0
cmovs r10, rax
jmp 0x10042b763
mov r14d, 1
jmp 0x10042afe1
mov rax, qword [rbp - 0x40]
mov qword [rbx + rax*8 + 8], r9
sub r10, qword [r11 + r13*8 + 8]
mov qword [rbx + rax*8 + 0x48], r8
sub r10, qword [r11 + r13*8 + 0x48]
jns 0x10042b7a8
test r15d, r15d
je 0x10042b7a8
mov rax, qword [rbp - 0x40]
mov r8, qword [rbx + rax*8 + 0x48]
mov rax, qword [rbp - 0x40]
sub r8, r10
xor r10d, r10d
mov qword [rbx + rax*8 + 0x48], r8
jmp 0x10042b763
mov rsi, qword [rbp - 0x28]
test r14d, r14d
jne 0x10042aeaf
test ebx, ebx
jne 0x10042baaa
lea rcx, str.E97:_Cannot_create_diffs
call sub.msys_intl_8.dll_libintl_gettext
mov rcx, rax
call sym.vim.exe_emsg
mov rcx, qword [r15]
mov dword [0x10066d630], 2
jmp 0x10042b1f8
lea rcx, [rax + 0x38]
call sym.vim.exe_ga_clear_strings
add dword [rbp - 0x2c], 1
mov eax, dword [rbp - 0x2c]
cmp eax, 8
jne 0x10042af50
jmp 0x10042b1e0
mov rcx, qword [rax + 0x20]
mov rsi, rax
call sym.vim.exe_vim_free
mov qword [rsi + 0x20], 0
jmp 0x10042b1b6
test rbx, rbx
jne 0x10042b135
jmp 0x10042b1a0
mov rcx, qword [r15 + 0x30]
lea rdx, [0x100690f74]
call sub.msys_2.0.dll_fopen
mov rsi, rax
test rax, rax
je 0x10042b324
lea r13, [rbp - 0x10]
nop
mov r8, rsi
mov edx, 0x32
mov rcx, r13
call sym.vim.exe_vim_fgets
test eax, eax
jne 0x10042ba92
cmp word [r13], 0x6331
je 0x10042ba61
movabs rax, 0x312b20312d204040
cmp qword [r13], rax
jne 0x10042ba20
cmp word [r13 + 8], 0x4020
jne 0x10042ba20
cmp byte [r13 + 0xa], 0x40
cmove r14d, r12d
jmp 0x10042ba20
cmp byte [r13 + 2], 0x31
jne 0x10042ba3d
mov r14d, 1
jmp 0x10042ba20
mov rcx, qword [r15 + 8]
call sym.vim.exe_vim_free
mov qword [r15 + 8], 0
mov rcx, qword [r15]
jmp 0x10042b1f8
mov rsi, qword [rbp - 0x28]
jmp 0x10042aeaf
mov rcx, rsi
call fcn.10065e4f0
jmp 0x10042b329
mov rax, rbx
mov rbx, r12
jmp 0x10042b146
lea rcx, str.E810:_Cannot_read_or_write_temp_files
call sub.msys_intl_8.dll_libintl_gettext
mov rcx, rax
call sym.vim.exe_emsg
jmp 0x10042b994
lea rcx, str.E98:_Cannot_read_diff_output
call sub.msys_intl_8.dll_libintl_gettext
mov rcx, rax
call sym.vim.exe_emsg
jmp 0x10042b1a0
mov rdx, r15
mov rcx, r12
call fcn.10042ab00
test eax, eax
jne 0x10042b1e4
jmp 0x10042b1f5
mov rbx, rax
jmp 0x10042b809
add rax, 1
mov qword [rbp - 0x18], rax
call sym.vim.exe_getdigits
mov rcx, qword [rbp - 0x38]
mov rdi, rax
mov rax, qword [rbp - 0x18]
jmp 0x10042b0bf
add rax, 1
mov qword [rbp - 0x38], r9
mov qword [rbp - 0x18], rax
call sym.vim.exe_getdigits
cmp rdi, 1
mov r9, qword [rbp - 0x38]
adc rsi, 0
cmp rax, 1
mov r8, rax
adc r9, 0
jmp 0x10042b113