Function at 0x100528c60
Capabilities:
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x80]
mov rcx, qword [0x10070b710]
test rcx, rcx
je 0x100529190
lea rdx, [0x1006b3dd8]
call sub.msys_2.0.dll_fopen
mov r12, rax
test rax, rax
je 0x100664180
mov r14, qword [sym.vim.exe_script_items]
mov qword [rbp - 0x38], 0
mov r15d, 1
mov rdi, qword [sym.vim.exe_IObuff]
mov ebx, dword [r14]
test ebx, ebx
jg 0x100528d27
nop dword [rax + rax]
call sym.vim.exe_func_tbl_get
mov rdx, qword [rax + 8]
mov rbx, rax
mov edi, edx
test edx, edx
jne 0x100529060
mov rcx, r12
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp fcn.10065e4f0
mov rcx, r13
mov r15d, dword [rbp - 0x3c]
call fcn.10065e4f0
mov rdx, r12
mov ecx, 0xa
call sub.msys_2.0.dll_fputc
add qword [rbp - 0x38], 8
add r15d, 1
cmp r15d, dword [r14]
jg 0x100528cc8
mov rax, qword [r14 + 0x10]
mov rsi, qword [rbp - 0x38]
mov rsi, qword [rax + rsi]
mov r11d, dword [rsi + 0x1d8]
test r11d, r11d
je 0x100528d19
mov r8, qword [rsi]
lea rdx, str.SCRIPT___s_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov r8d, dword [rsi + 0x1f4]
cmp r8d, 1
je 0x100529170
lea rdx, str.Sourced__d_times_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rax, qword [rsi + 0x200]
lea r9, str._3ld._06ld
xor edx, edx
xor ebx, ebx
mov r8d, 0x32
lea rcx, [0x10070b6a0]
mov qword [rsp + 0x28], rax
mov rax, qword [rsi + 0x1f8]
mov qword [rsp + 0x20], rax
call sub.msys_2.0.dll___sprintf_chk
lea r8, [0x10070b6a0]
lea rdx, str.Total_time:__s_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rax, qword [rsi + 0x210]
lea r9, str._3ld._06ld
xor edx, edx
mov r8d, 0x32
lea rcx, [0x10070b6a0]
mov qword [rsp + 0x28], rax
mov rax, qword [rsi + 0x208]
mov qword [rsp + 0x20], rax
call sub.msys_2.0.dll___sprintf_chk
lea r8, [0x10070b6a0]
lea rdx, str._Self_time:__s_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rdx, r12
mov ecx, 0xa
call sub.msys_2.0.dll_fputc
mov r9, r12
mov r8d, 0x1c
mov edx, 1
lea rcx, str.count__total__s____self__s__n
call sub.msys_2.0.dll_fwrite
mov rcx, qword [rsi]
lea rdx, [0x1006b3e45]
call sub.msys_2.0.dll_fopen
mov r13, rax
test rax, rax
je 0x100529040
mov dword [rbp - 0x3c], r15d
jmp 0x100528e79
mov r9, r12
mov r8d, 0x1c
mov edx, 1
lea rcx, [0x1006b3d67]
call sub.msys_2.0.dll_fwrite
mov rcx, qword [rdi]
mov rdx, r12
add rbx, 1
call sub.msys_2.0.dll_fputs
mov rcx, qword [rdi]
mov r8, r13
mov edx, 0x401
call sym.vim.exe_vim_fgets
test eax, eax
jne 0x100528d00
mov r8, qword [rdi]
movzx eax, byte [r8 + 0x3ff]
test al, al
je 0x100528efc
cmp al, 0xa
je 0x100528efc
mov rcx, qword [sym.vim.exe_enc_utf8]
mov r10d, dword [rcx]
test r10d, r10d
jne 0x100528fd0
mov rax, qword [sym.vim.exe_has_mbyte]
lea rdx, [r8 + 0x3ff]
mov ecx, 0x400
mov r9d, dword [rax]
test r9d, r9d
je 0x100528ef2
mov rax, qword [sym.vim.exe_mb_head_off]
mov rcx, r8
call qword [rax]
mov ecx, 0x3ff
mov rdx, qword [rdi]
sub ecx, eax
movsxd rcx, ecx
add rdx, rcx
add rcx, 1
mov byte [rdx], 0xa
mov rax, qword [rdi]
mov byte [rax + rcx], 0
cmp dword [rsi + 0x238], ebx
jle 0x100528e50
mov rdx, qword [rsi + 0x248]
lea rax, [rbx + rbx*4]
lea r15, [rdx + rax*8]
mov r8d, dword [r15]
test r8d, r8d
jle 0x100528e50
lea rdx, str._5d
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rax, qword [r15 + 0x10]
cmp rax, qword [r15 + 0x20]
mov rdx, qword [r15 + 8]
je 0x100529010
mov qword [rsp + 0x20], rdx
mov r8d, 0x32
xor edx, edx
lea rcx, [0x10070b6a0]
mov qword [rsp + 0x28], rax
lea r9, str._3ld._06ld
call sub.msys_2.0.dll___sprintf_chk
lea r8, [0x10070b6a0]
lea rdx, [0x1006b3d1c]
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rax, qword [r15 + 0x20]
xor edx, edx
lea r9, str._3ld._06ld
mov r8d, 0x32
lea rcx, [0x10070b6a0]
mov qword [rsp + 0x28], rax
mov rax, qword [r15 + 0x18]
mov qword [rsp + 0x20], rax
call sub.msys_2.0.dll___sprintf_chk
lea r8, [0x10070b6a0]
lea rdx, [0x1006b3d1c]
mov rcx, r12
call sub.msys_2.0.dll_fprintf
jmp 0x100528e6a
mov edx, 0x3ff
jmp 0x100528fef
sub rdx, 1
je 0x100529398
movzx eax, byte [r8 + rdx]
and eax, 0xffffffc0
mov ecx, edx
cmp al, 0x80
je 0x100528fe0
movsxd rdx, edx
add ecx, 1
add rdx, r8
movsxd rcx, ecx
jmp 0x100528ef2
cmp rdx, qword [r15 + 0x18]
jne 0x100528f44
mov r9, r12
mov r8d, 0xb
mov edx, 1
lea rcx, [0x1006b3d05]
call sub.msys_2.0.dll_fwrite
jmp 0x100528f7f
mov r9, r12
mov r8d, 0x12
mov edx, 1
lea rcx, str.Cannot_open_file__n
call sub.msys_2.0.dll_fwrite
jmp 0x100528d0c
movsxd rcx, edx
mov qword [rbp - 0x48], rdx
lea r15, [0x1006b3eb4]
shl rcx, 3
call sym.vim.exe_alloc
mov rdx, qword [rbp - 0x48]
mov dword [rbp - 0x3c], 0
mov qword [rbp - 0x38], rax
mov rsi, qword [rbx + 0x28]
test edx, edx
jle 0x100529148
nop word [rax + rax]
mov rbx, qword [rsi + 8]
cmp rbx, qword [sym.vim.exe_hash_removed]
je 0x100529160
test rbx, rbx
je 0x100529160
mov edx, dword [rbx - 0xbc]
sub edi, 1
test edx, edx
jne 0x1005291a8
add rsi, 0x10
test edi, edi
jne 0x100529098
mov rdi, qword [rbp - 0x38]
test rdi, rdi
je 0x100529148
mov ebx, dword [rbp - 0x3c]
test ebx, ebx
jle 0x100529148
movsxd r13, ebx
lea r9, [0x1005277e0]
mov r8d, 8
mov rcx, rdi
mov rdx, r13
call sub.msys_2.0.dll_qsort
mov r8d, ebx
mov rdx, rdi
mov rcx, r12
mov dword [rsp + 0x20], 0
lea r9, str.TOTAL
call fcn.100527a60
lea r9, [0x100527820]
mov rdx, r13
mov rcx, rdi
mov r8d, 8
call sub.msys_2.0.dll_qsort
mov r8d, ebx
mov rdx, rdi
mov rcx, r12
mov dword [rsp + 0x20], 1
lea r9, str.SELF
call fcn.100527a60
mov rcx, qword [rbp - 0x38]
call sym.vim.exe_vim_free
jmp 0x100528cde
add rsi, 0x10
jmp 0x100529098
mov r9, r12
mov r8d, 0xf
mov edx, 1
lea rcx, str.Sourced_1_time_n
call sub.msys_2.0.dll_fwrite
jmp 0x100528d71
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rcx, qword [rbp - 0x38]
test rcx, rcx
je 0x1005291c6
movsxd rax, dword [rbp - 0x3c]
lea rdx, [rbx - 0x188]
mov qword [rcx + rax*8], rdx
lea eax, [rax + 1]
mov dword [rbp - 0x3c], eax
cmp byte [rbx], 0x80
je 0x100529363
mov r8, rbx
lea rdx, str.FUNCTION___s___n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov ecx, dword [rbx - 0x30]
test ecx, ecx
jg 0x1005293a5
mov r8d, dword [rbx - 0xb8]
cmp r8d, 1
je 0x1005293e3
lea rdx, str.Called__d_times_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rax, qword [rbx - 0xa8]
lea r9, str._3ld._06ld
xor edx, edx
xor r13d, r13d
mov r8d, 0x32
lea rcx, [0x10070b6a0]
mov qword [rsp + 0x28], rax
mov rax, qword [rbx - 0xb0]
mov qword [rsp + 0x20], rax
call sub.msys_2.0.dll___sprintf_chk
lea r8, [0x10070b6a0]
lea rdx, str.Total_time:__s_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rax, qword [rbx - 0x98]
lea r9, str._3ld._06ld
xor edx, edx
mov r8d, 0x32
lea rcx, [0x10070b6a0]
mov qword [rsp + 0x28], rax
mov rax, qword [rbx - 0xa0]
mov qword [rsp + 0x20], rax
call sub.msys_2.0.dll___sprintf_chk
lea r8, [0x10070b6a0]
lea rdx, str._Self_time:__s_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rdx, r12
mov ecx, 0xa
call sub.msys_2.0.dll_fputc
mov r9, r12
mov r8d, 0x1c
mov edx, 1
lea rcx, str.count__total__s____self__s__n
call sub.msys_2.0.dll_fwrite
mov eax, dword [rbx - 0xe0]
test eax, eax
jg 0x100529325
jmp 0x100529380
mov r9, qword [rbx - 0x70]
mov r8, r13
mov rcx, r12
shl r8, 4
add r9, r8
add r8, qword [rbx - 0x78]
mov dword [rsp + 0x20], 1
call fcn.1005278e0
mov rax, qword [rbx - 0xd0]
mov rdx, r15
mov rcx, r12
mov r8, qword [rax + r14]
call sub.msys_2.0.dll_fprintf
add r13, 1
cmp dword [rbx - 0xe0], r13d
jle 0x100529380
mov rax, qword [rbx - 0xd0]
lea r14, [r13*8]
cmp qword [rax + r13*8], 0
je 0x100529318
mov rax, qword [rbx - 0x80]
mov edx, dword [rax + r13*4]
test edx, edx
jg 0x1005292e0
mov r9, r12
mov r8d, 0x1c
mov edx, 1
lea rcx, [0x1006b3d67]
call sub.msys_2.0.dll_fwrite
jmp 0x100529302
lea r8, [rbx + 3]
lea rdx, str.FUNCTION___SNR__s___n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
jmp 0x1005291e1
mov rdx, r12
mov ecx, 0xa
call sub.msys_2.0.dll_fputc
jmp 0x1005290c3
mov rdx, r8
mov ecx, 1
jmp 0x100528ef2
call sym.vim.exe_get_scriptname
xor ecx, ecx
mov rdx, rax
call sym.vim.exe_home_replace_save
mov r13, rax
test rax, rax
je 0x1005291ec
mov r9, qword [rbx - 0x28]
mov rcx, r12
mov r8, rax
lea rdx, str.____Defined:__s:_ld_n
call sub.msys_2.0.dll_fprintf
mov rcx, r13
call sym.vim.exe_vim_free
jmp 0x1005291ec
mov r9, r12
mov r8d, 0xe
mov edx, 1
lea rcx, str.Called_1_time_n
call sub.msys_2.0.dll_fwrite
jmp 0x10052920c
mov rcx, qword [sym.vim.exe_e_notopen]
mov r12, qword [0x10070b710]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r12
mov rcx, rax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp sym.vim.exe_semsg