Function at 0x4018a1
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
and dword [ebp - 4], 0
jmp 0x401a8c
cmp dword [ebp + 0xc], 0
jne 0x40198e
add dword [eax], eax
add byte [ebx - 0x6c4eb83], cl
je 0x401a01
mov eax, ebx
mov esi, dword [ebp + 8]
mov dword [ebp - 4], ecx
mov word [ebx], cx
mov word [edx], cx
cmp edi, 1
jbe 0x4018ee
mov word [ebx + edi*2 - 2], cx
mov word [edx + edi*2 - 2], cx
movzx ecx, word [esi]
mov word [eax], cx
cmp cx, 0x23
jne 0x4018fd
mov dword [ebp - 0x1c], eax
inc eax
inc eax
mov dword [ebp - 0x28], eax
inc esi
inc esi
mov dword [ebp - 0x2c], esi
inc dword [ebp - 0x20]
cmp dword [ebp - 0x20], edi
jae 0x4019f5
movzx ecx, word [esi]
test cx, cx
leave
je 0x401921
cmp cx, 0x2f
jne 0x4018ee
cmp dword [ebp - 0x20], edi
jae 0x4019f5
xor ecx, ecx
cmp word [esi], 0x2f
jne 0x401978
mov word [eax], cx
inc esi
inc esi
mov dword [ebp - 0x2c], esi
push ebx
push edi
push edx
call 0x3ff9c1
mov eax, ebx
mov dword [ebp - 0x28], eax
xor edx, edx
mov dword [ebp - 0x20], edx
movzx ecx, word [esi]
mov word [eax], cx
cmp cx, 0x23
jne 0x40195b
mov dword [ebp - 0x1c], eax
inc eax
inc eax
mov dword [ebp - 0x28], eax
inc esi
inc esi
mov dword [ebp - 0x2c], esi
inc dword [ebp - 0x20]
cmp dword [ebp - 0x20], edi
jae 0x4019f5
cmp word [esi], dx
je 0x40197d
jmp 0x40194c
mov word [edx], cx
xor edx, edx
cmp dword [ebp - 0x20], edi
jae 0x4019f5
xor ecx, ecx
mov word [eax], cx
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0x1c], edx
je 0x401918
mov eax, esi
add eax, 0xc8
mov dword [ebp - 8], eax
mov edi, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x14], edx
mov eax, esi
mov dword [ebp - 0x10], eax
mov ecx, edi
or cl, 1
cdq
idiv ecx
mov dword [ebp - 0x18], eax
mov edx, eax
add edi, eax
mov edx, dword [ebp - 8]
mov ecx, esi
sar edx, cl
add edi, edx
mov edx, dword [ebp - 0x14]
mov ecx, edx
mov edx, esi
sar edx, cl
mov ecx, dword [ebp - 0x14]
sub ecx, edx
cmp edi, ecx
jle 0x4019e9
invalid
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
xor edx, esi
mov ecx, eax
or cl, 1
mov edi, esi
imul edi, ecx
sub eax, edi
sub edx, eax
mov dword [ebp - 8], edx
mov eax, esi
add eax, 0x7e8
mov dword [ebp - 0xc], eax
jmp 0x401a70
push esi
call fcn.00401893
mov dword [ebp - 0x28], eax
mov edi, dword [ebp - 8]
mov ecx, esi
inc ecx
cdq
idiv ecx
mov dword [ebp - 0x30], eax
mov eax, esi
mov ecx, edi
or cl, 1
cdq
idiv ecx
mov edx, eax
add edx, edi
mov ecx, edx
mov eax, dword [ebp - 0x30]
cdq
idiv ecx
mov dword [ebp - 0x1c], edx
mov edi, edx
mov ecx, esi
movzx edi, byte [ebx + edi]
shl edi, cl
mov edx, edi
mov byte [ebp - 0x29], dl
push esi
call fcn.00401ab0
add esp, 8
mov dword [ebp - 0x20], eax
mov edi, eax
mov ecx, edi
mov edx, esi
shl edx, cl
mov eax, edi
add eax, edx
mov edi, dword [ebp - 8]
mov ecx, edi
add ecx, esi
cdq
idiv ecx
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x1c]
mov dl, byte [ebx + edx]
mov byte [ebx + eax], dl
mov eax, dword [ebp - 0x24]
movzx edx, byte [ebp - 0x29]
mov ecx, esi
inc ecx
imul edx, ecx
mov byte [ebx + eax], dl
mov eax, dword [ebp - 0xc]
mov edx, eax
dec edx
mov dword [ebp - 0xc], edx
or eax, eax
jne 0x4019f5
mov eax, dword [ebp - 8]
lea ebx, [ebx + eax]
or eax, esi
add dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 4]
mov ecx, esi
dec ecx
and edx, ecx
mov ecx, eax
or cl, 1
mov edi, esi
imul edi, ecx
sub eax, edi
cmp edx, eax
jl 0x4018b9
pop edi
pop esi
pop ebx
leave
ret