Function at 0x401826
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
mov eax, dword [rbp + 0x20]
cmp eax, 0
jbe 0x401858
mov eax, dword [rbp + 0x20]
cmp eax, 0x80
ja 0x401858
mov eax, 1
jmp 0x40185d
mov eax, 0
cmp eax, 0
je 0x40186b
jmp 0x401897
mov eax, 0x31
mov r8, rax
lea rax, [0x0040314f]
mov r11, rax
lea rax, [0x00403139]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll__assert
jmp 0x40189c
mov eax, 0
mov eax, dword [rbp + 0x28]
cmp eax, 0x400
mov eax, 0
setbe al
cmp eax, 0
je 0x4018bb
jmp 0x4018e7
mov eax, 0x32
mov r8, rax
lea rax, str.rc2.c
mov r11, rax
lea rax, str.bits___1024
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll__assert
jmp 0x4018ec
mov eax, 0
mov eax, dword [rbp + 0x28]
cmp eax, 0
je 0x4018fd
jmp 0x401905
mov eax, 0x400
mov dword [rbp + 0x28], eax
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp + 0x20]
mov r8, rcx
mov rcx, qword [rbp + 0x18]
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memcpy
mov eax, dword [rbp + 0x20]
cmp eax, 0x80
jae 0x4019ab
mov eax, 0
mov dword [rbp - 8], eax
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp + 0x20]
sub ecx, 1
add rax, rcx
movzx ecx, byte [rax]
mov byte [rbp - 1], cl
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp - 8]
mov rdx, rcx
add ecx, 1
mov dword [rbp - 8], ecx
add rax, rdx
movzx ecx, byte [rbp - 1]
movzx edx, byte [rax]
add ecx, edx
and ecx, 0xff
movsxd rcx, ecx
lea rax, [0x00403039]
add rax, rcx
movzx ecx, byte [rax]
mov byte [rbp - 1], cl
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp + 0x20]
mov rdx, rcx
add ecx, 1
mov dword [rbp + 0x20], ecx
add rax, rdx
movzx ecx, byte [rbp - 1]
mov byte [rax], cl
mov eax, dword [rbp + 0x20]
cmp eax, 0x80
jb 0x40194e
mov eax, dword [rbp + 0x28]
add eax, 7
shr eax, 3
mov dword [rbp + 0x20], eax
mov eax, pe_nt_image_headers64
mov ecx, dword [rbp + 0x20]
sub eax, ecx
mov dword [rbp - 8], eax
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp - 8]
add rax, rcx
mov ecx, 0
mov edx, dword [rbp + 0x28]
sub ecx, edx
and ecx, 7
mov edx, 0xff
sar edx, cl
movzx ecx, byte [rax]
and ecx, edx
movsxd rcx, ecx
lea rax, [0x00403039]
add rax, rcx
movzx ecx, byte [rax]
mov byte [rbp - 1], cl
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp - 8]
add rax, rcx
movzx ecx, byte [rbp - 1]
mov byte [rax], cl
mov eax, dword [rbp - 8]
mov rcx, rax
add eax, 0xffffffff
mov dword [rbp - 8], eax
cmp ecx, 0
je 0x401a5c
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp - 8]
mov edx, dword [rbp + 0x20]
add ecx, edx
add rax, rcx
movzx ecx, byte [rbp - 1]
movzx edx, byte [rax]
xor ecx, edx
movsxd rcx, ecx
lea rax, [0x00403039]
add rax, rcx
movzx ecx, byte [rax]
mov byte [rbp - 1], cl
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp - 8]
add rax, rcx
movzx ecx, byte [rbp - 1]
mov byte [rax], cl
jmp 0x401a0a
mov eax, 0x3f
mov dword [rbp - 8], eax
mov rax, qword [rbp + 0x10]
mov ecx, dword [rbp - 8]
shl rcx, 1
add rax, rcx
mov rcx, qword [rbp + 0x10]
mov edx, dword [rbp - 8]
shl edx, 1
add rcx, rdx
mov rdx, qword [rbp + 0x10]
mov qword [rbp - 0x10], rax
mov eax, dword [rbp - 8]
shl eax, 1
add eax, 1
add rdx, rax
movzx eax, byte [rdx]
shl eax, 8
movzx edx, byte [rcx]
add edx, eax
mov rax, qword [rbp - 0x10]
mov word [rax], dx
mov eax, dword [rbp - 8]
mov rcx, rax
add eax, 0xffffffff
mov dword [rbp - 8], eax
cmp ecx, 0
jne 0x401a64
leave
ret