Function at 0x100530870
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rcx, qword [0x100724950]
test rcx, rcx
je 0x100530d90
lea rdx, [0x1006cfa27]
call sub.msys_2.0.dll_fopen
mov r12, rax
test rax, rax
je 0x100678b70
mov r15, qword [sym.vim.exe_script_items]
mov r14d, 1
mov qword [rsp + 0x38], 0
mov ebx, dword [r15]
test ebx, ebx
jg 0x100530929
nop dword [rax]
call sym.vim.exe_func_tbl_get
mov r15, qword [rax + 8]
mov rbx, rax
mov edi, r15d
test r15d, r15d
jne 0x100530c70
mov rcx, r12
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.100672bf0
mov rcx, r13
mov r14d, dword [rsp + 0x4c]
call fcn.100672bf0
mov rdx, r12
mov ecx, 0xa
call sub.msys_2.0.dll_fputc
add qword [rsp + 0x38], 8
add r14d, 1
cmp r14d, dword [r15]
jg 0x1005308c8
mov rax, qword [r15 + 0x10]
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rax + rdi]
mov r11d, dword [rsi + 0x1ec]
test r11d, r11d
je 0x10053091a
mov r8, qword [rsi]
lea rdx, str.SCRIPT___s_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov r8d, dword [rsi + 0x20c]
cmp r8d, 1
je 0x100530d70
lea rdx, str.Sourced__d_times_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov rax, qword [rsi + 0x218]
mov r8d, 0x32
xor edx, edx
xor ebx, ebx
lea rbp, [0x1007248e0]
lea r9, str._3ld._06ld
mov qword [rsp + 0x28], rax
mov rax, qword [rsi + 0x210]
mov rcx, rbp
mov qword [rsp + 0x20], rax
call sub.msys_2.0.dll___sprintf_chk
mov r8, rbp
lea rdx, str.Total_time:__s_n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov r8d, 0x32
xor edx, edx
mov rcx, rbp
mov rax, qword [rsi + 0x228]
lea r9, str._3ld._06ld
mov qword [rsp + 0x28], rax
mov rax, qword [rsi + 0x220]
mov qword [rsp + 0x20], rax
call sub.msys_2.0.dll___sprintf_chk
mov r8, rbp
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, [0x1006cfa94]
call sub.msys_2.0.dll_fopen
mov rdi, qword [sym.vim.exe_IObuff]
mov r13, rax
test rax, rax
je 0x100530c48
mov dword [rsp + 0x4c], r14d
jmp 0x100530a79
mov r9, r12
mov r8d, 0x1c
mov edx, 1
lea rcx, [0x1006cf9e7]
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 0x100530900
mov r8, qword [rdi]
movzx eax, byte [r8 + 0x3ff]
test al, al
je 0x100530afc
cmp al, 0xa
je 0x100530afc
mov rcx, qword [sym.vim.exe_enc_utf8]
mov r10d, dword [rcx]
test r10d, r10d
jne 0x100530bd8
mov rax, qword [sym.vim.exe_has_mbyte]
lea rdx, [r8 + 0x3ff]
mov ecx, 0x400
mov r9d, dword [rax]
test r9d, r9d
je 0x100530af2
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 + 0x250], ebx
jle 0x100530a50
mov rdx, qword [rsi + 0x260]
lea rax, [rbx + rbx*4]
lea r10, [rdx + rax*8]
mov r8d, dword [r10]
mov qword [rsp + 0x40], r10
test r8d, r8d
jle 0x100530a50
lea rdx, str._5d
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov r10, qword [rsp + 0x40]
mov rax, qword [r10 + 0x10]
cmp rax, qword [r10 + 0x20]
mov rdx, qword [r10 + 8]
je 0x100530c10
mov qword [rsp + 0x20], rdx
lea r9, str._3ld._06ld
xor edx, edx
mov r8d, 0x32
mov qword [rsp + 0x28], rax
mov rcx, rbp
lea r14, [0x1006cf99c]
mov qword [rsp + 0x40], r10
call sub.msys_2.0.dll___sprintf_chk
lea r8, [0x1007248e0]
mov rdx, r14
mov rcx, r12
call sub.msys_2.0.dll_fprintf
mov r10, qword [rsp + 0x40]
mov rax, qword [r10 + 0x20]
xor edx, edx
mov rcx, rbp
lea r9, str._3ld._06ld
mov r8d, 0x32
mov qword [rsp + 0x28], rax
mov rax, qword [r10 + 0x18]
mov qword [rsp + 0x20], rax
call sub.msys_2.0.dll___sprintf_chk
lea r8, [0x1007248e0]
mov rdx, r14
mov rcx, r12
call sub.msys_2.0.dll_fprintf
jmp 0x100530a6a
mov edx, 0x3ff
jmp 0x100530bef
sub rdx, 1
je 0x100530f98
movzx eax, byte [r8 + rdx]
and eax, 0xffffffc0
movsxd rcx, edx
cmp al, 0x80
je 0x100530be0
lea rdx, [r8 + rcx]
add rcx, 1
jmp 0x100530af2
cmp rdx, qword [r10 + 0x18]
jne 0x100530b4e
mov r9, r12
mov r8d, 0xb
mov edx, 1
lea rcx, [0x1006cf985]
lea r14, [0x1006cf99c]
call sub.msys_2.0.dll_fwrite
mov r10, qword [rsp + 0x40]
jmp 0x100530b92
mov r9, r12
mov r8d, 0x12
mov edx, 1
lea rcx, str.Cannot_open_file__n
call sub.msys_2.0.dll_fwrite
jmp 0x10053090d
movsxd rcx, r15d
lea r14, [0x1006cfb03]
shl rcx, 3
call sym.vim.exe_alloc
mov dword [rsp + 0x38], 0
mov rsi, qword [rbx + 0x28]
mov r13, rax
test r15d, r15d
jle 0x100530d4d
nop dword [rax + rax]
mov rbx, qword [rsi + 8]
cmp rbx, qword [sym.vim.exe_hash_removed]
je 0x100530d60
test rbx, rbx
je 0x100530d60
mov edx, dword [rbx - 0xbc]
sub edi, 1
test edx, edx
jne 0x100530da8
add rsi, 0x10
test edi, edi
jne 0x100530ca0
test r13, r13
je 0x100530d4d
mov edi, dword [rsp + 0x38]
test edi, edi
jle 0x100530d4d
movsxd r14, edi
lea r9, [0x10052f650]
mov r8d, 8
mov rcx, r13
mov rdx, r14
call fcn.100673050
mov r8d, edi
mov rdx, r13
mov rcx, r12
mov dword [rsp + 0x20], 0
lea r9, str.TOTAL
call fcn.10052f8b0
lea r9, [0x10052f680]
mov rdx, r14
mov rcx, r13
mov r8d, 8
call fcn.100673050
mov r8d, edi
mov rdx, r13
mov rcx, r12
mov dword [rsp + 0x20], 1
lea r9, str.SELF
call fcn.10052f8b0
mov rcx, r13
call sym.vim.exe_vim_free
jmp 0x1005308e0
add rsi, 0x10
jmp 0x100530ca0
mov r9, r12
mov r8d, 0xf
mov edx, 1
lea rcx, str.Sourced_1_time_n
call sub.msys_2.0.dll_fwrite
jmp 0x100530974
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test r13, r13
je 0x100530dc5
movsxd rax, dword [rsp + 0x38]
lea rdx, [rbx - 0x188]
mov qword [r13 + rax*8], rdx
lea eax, [rax + 1]
mov dword [rsp + 0x38], eax
cmp byte [rbx], 0x80
je 0x100530f5e
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 0x100530fa5
mov r8d, dword [rbx - 0xb8]
cmp r8d, 1
je 0x100530fe3
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 ebp, ebp
mov r8d, 0x32
lea rcx, [0x1007248e0]
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, [0x1007248e0]
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, [0x1007248e0]
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, [0x1007248e0]
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 0x100530f19
jmp 0x100530f80
mov rax, rbp
mov dword [rsp + 0x20], 1
shl rax, 4
lea r9, [r8 + rax]
lea r8, [rcx + rax]
mov rcx, r12
call fcn.10052f720
mov rax, qword [rbx - 0xd0]
mov rdx, r14
mov rcx, r12
mov r8, qword [rax + r15]
call sub.msys_2.0.dll_fprintf
add rbp, 1
cmp dword [rbx - 0xe0], ebp
jle 0x100530f80
mov rax, qword [rbx - 0xd0]
lea r15, [rbp*8]
cmp qword [rax + rbp*8], 0
je 0x100530f0d
mov rax, qword [rbx - 0x80]
mov r8, qword [rbx - 0x70]
mov rcx, qword [rbx - 0x78]
mov edx, dword [rax + rbp*4]
test edx, edx
jg 0x100530ed8
mov r9, r12
mov r8d, 0x1c
mov edx, 1
lea rcx, [0x1006cf9e7]
call sub.msys_2.0.dll_fwrite
jmp 0x100530ef7
lea r8, [rbx + 3]
lea rdx, str.FUNCTION___SNR__s___n
mov rcx, r12
call sub.msys_2.0.dll_fprintf
jmp 0x100530de0
mov rdx, r12
mov ecx, 0xa
call sub.msys_2.0.dll_fputc
jmp 0x100530ccb
mov rdx, r8
mov ecx, 1
jmp 0x100530af2
call sym.vim.exe_get_scriptname
xor ecx, ecx
mov rdx, rax
call sym.vim.exe_home_replace_save
mov r15, rax
test rax, rax
je 0x100530deb
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, r15
call sym.vim.exe_vim_free
jmp 0x100530deb
mov r9, r12
mov r8d, 0xe
mov edx, 1
lea rcx, str.Called_1_time_n
call sub.msys_2.0.dll_fwrite
jmp 0x100530e0b
mov rcx, qword [sym.vim.exe_e_cant_open_file_str]
mov r12, qword [0x100724950]
call sub.msys_intl_8.dll_libintl_gettext
mov rdx, r12
mov rcx, rax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.vim.exe_semsg