Function at 0x100580030
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov edi, dword [rcx + 0x10]
mov ebx, dword [rcx + 0x38]
mov rbp, qword [rcx + 0x30]
mov dword [rsp + 0x88], edx
mov rsi, rcx
test edi, edi
je 0x1005802a0
mov rax, qword [sym.vim.exe_KeyStuffed]
mov r14d, 1
mov r9d, dword [rax]
test r9d, r9d
je 0x100580228
mov rax, qword [rsi]
xor edx, edx
cmp ebx, 0xffffffff
setne dl
mov dword [rax + 0x14], edx
call sym.vim.exe_ml_get_curline
mov r12, rax
mov rax, qword [sym.vim.exe_curwin]
mov rcx, r12
mov rax, qword [rax]
mov r15d, dword [rax + 0x40]
call sub.msys_2.0.dll_strlen
mov esi, eax
test rbp, rbp
je 0x10058013a
mov qword [rsp + 0x28], rbp
mov rax, qword [sym.vim.exe_has_mbyte]
mov ecx, dword [rax]
test ecx, ecx
je 0x1005801d8
lea rbp, [0x100726470]
nop dword [rax]
test ebx, ebx
jle 0x100580190
mov rax, qword [sym.vim.exe_mb_ptr2len]
movsxd rcx, r15d
add rcx, r12
call qword [rax]
add r15d, eax
cmp esi, r15d
jle 0x100580211
movsxd r8, dword [0x100698804]
movsxd rcx, r15d
mov r13d, r14d
add rcx, r12
and r13d, 1
cmp r8d, 1
je 0x1005801b8
mov rdx, rbp
mov r14d, 1
call sub.msys_2.0.dll_strncmp
test eax, eax
jne 0x1005800d0
test r13b, r13b
je 0x1005800d0
sub qword [rsp + 0x28], 1
mov r14d, 1
jne 0x1005800b1
mov edx, dword [rsp + 0x88]
test edx, edx
je 0x100580172
mov rax, qword [sym.vim.exe_has_mbyte]
sub r15d, ebx
mov eax, dword [rax]
test eax, eax
je 0x100580172
test ebx, ebx
js 0x100580320
mov rax, qword [sym.vim.exe_mb_head_off]
movsxd rdx, r15d
mov rcx, r12
add rdx, r12
call qword [rax]
sub r15d, eax
mov rax, qword [sym.vim.exe_curwin]
mov rax, qword [rax]
mov dword [rax + 0x40], r15d
mov eax, 1
jmp 0x100580213
test r15d, r15d
je 0x100580211
movsxd rax, r15d
mov rcx, r12
lea rdx, [r12 + rax - 1]
mov rax, qword [sym.vim.exe_mb_head_off]
call qword [rax]
add eax, 1
sub r15d, eax
jmp 0x1005800f3
movzx eax, byte [rcx]
cmp eax, edi
jne 0x1005801c8
test r13b, r13b
jne 0x100580128
mov r14d, 1
jmp 0x1005800d0
add r15d, ebx
movsxd rcx, ebx
movsxd rax, r15d
jmp 0x10058020a
cmp esi, eax
jle 0x100580211
movzx edx, byte [r12 + rax]
cmp edx, edi
sete dl
add rax, rcx
and edx, r14d
mov r14d, 1
test dl, dl
jne 0x100580128
mov r15d, eax
test eax, eax
jns 0x1005801e8
xor eax, eax
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r12, qword [sym.vim.exe_mb_char2bytes]
lea r13, [0x100726470]
mov dword [0x100698808], edx
mov ecx, edi
mov byte [0x100726486], dil
mov rdx, r13
mov dword [0x10069880c], ebx
call qword [r12]
mov ecx, dword [rsi + 0x14]
mov dword [0x100698804], eax
test ecx, ecx
je 0x100580075
cdqe
lea rdx, [rax + r13]
call qword [r12]
mov ecx, dword [rsi + 0x18]
add eax, dword [0x100698804]
mov dword [0x100698804], eax
test ecx, ecx
je 0x100580075
cdqe
lea rdx, [rax + r13]
call qword [r12]
add dword [0x100698804], eax
jmp 0x100580075
movzx edi, byte [0x100726486]
test dil, dil
jne 0x1005802b9
cmp dword [0x100698804], 1
je 0x100580211
mov eax, dword [0x10069880c]
mov r14d, 1
mov edx, eax
neg edx
test ebx, ebx
cmovne eax, edx
mov edx, 0x3b
mov ebx, eax
mov eax, dword [0x100698808]
mov dword [rsp + 0x88], eax
mov rax, qword [sym.vim.exe_p_cpo]
mov rcx, qword [rax]
call sym.vim.exe_vim_strchr
test rax, rax
jne 0x100580075
mov r8d, dword [rsp + 0x88]
cmp rbp, 1
sete r10b
test r8d, r8d
setne al
and r10d, eax
xor r10d, 1
movzx r14d, r10b
jmp 0x100580075
mov eax, dword [0x100698804]
lea r15d, [r15 + rax - 1]
jmp 0x100580172