Function at 0x40514a
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x41ace0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x20]
push ebx
push esi
push edi
mov dword [ebp - 0x228], ecx
lea edi, [ebp - 0x208]
mov dword [ebp - 0x224], eax
mov ecx, 0x81
mov eax, 0x4000400
mov dword [ebp - 0x22c], edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x1c]
xor ebx, ebx
mov edi, dword [ebp + 0x18]
mov esi, ebx
add eax, edi
mov dword [ebp - 0x214], ebx
or dword [ebp - 0x210], 0xffffffff
mov dl, bl
mov dword [ebp - 0x220], eax
mov ecx, ebx
cmp edi, eax
je 0x4053ee
movzx eax, byte [edi]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp - 0x220]
inc edi
mov dword [ebp - 0x218], ecx
inc ebx
mov dword [ebp + 0x18], edi
cmp ebx, 5
jl 0x4051aa
cmp dword [ebp + 0x24], esi
jne 0x4051dc
xor eax, eax
jmp 0x4053f1
mov ebx, dword [ebp - 0x22c]
sub ebx, dword [ebp - 0x214]
mov eax, dword [ebp + 0x24]
sub eax, esi
cmp eax, ebx
cmovb ebx, eax
test ebx, ebx
je 0x4053e4
mov edi, dword [ebp - 0x214]
mov ecx, dword [ebp - 0x224]
mov eax, dword [ebp - 0x228]
mov ah, byte [eax + edi]
mov al, ah
mov byte [ecx + esi], ah
and al, 0xfe
inc esi
cmp al, 0xe8
je 0x40522e
cmp dl, 0xf
jne 0x405228
mov al, ah
and al, 0xf0
cmp al, 0x80
je 0x40522e
inc edi
mov dl, ah
dec ebx
jne 0x405206
mov ecx, dword [ebp - 0x218]
mov dword [ebp - 0x214], edi
mov edi, dword [ebp + 0x18]
test ebx, ebx
je 0x4053e4
cmp esi, dword [ebp + 0x24]
je 0x4053e4
mov ebx, dword [ebp - 0x214]
mov eax, dword [ebp - 0x228]
mov al, byte [eax + ebx]
inc ebx
mov byte [ebp - 0x209], al
mov dword [ebp - 0x214], ebx
cmp al, 0xe8
jne 0x40527c
movzx eax, dl
lea ebx, [ebp - 0x208]
lea ebx, [ebx + eax*2]
jmp 0x405287
cmp al, 0xe9
lea ebx, [ebp - 8]
lea edx, [ebp - 6]
cmovne ebx, edx
mov edx, dword [ebp - 0x210]
movzx eax, word [ebx]
shr edx, 0xb
imul edx, eax
mov dword [ebp - 0x21c], eax
cmp ecx, edx
jae 0x4052f9
mov eax, 0x800
mov dword [ebp - 0x210], edx
sub eax, dword [ebp - 0x21c]
shr eax, 5
add eax, dword [ebp - 0x21c]
mov word [ebx], ax
cmp edx, 0x1000000
jae 0x4052ee
cmp edi, dword [ebp - 0x220]
je 0x4053ee
mov eax, edx
shl ecx, 8
shl eax, 8
mov dword [ebp - 0x210], eax
movzx eax, byte [edi]
or ecx, eax
inc edi
mov dword [ebp - 0x218], ecx
mov dword [ebp + 0x18], edi
mov dl, byte [ebp - 0x209]
jmp 0x4051dc
sub dword [ebp - 0x210], edx
sub ecx, edx
mov edx, dword [ebp - 0x21c]
shr eax, 5
sub edx, eax
mov dword [ebp - 0x218], ecx
mov eax, dword [ebp - 0x210]
mov word [ebx], dx
cmp eax, 0x1000000
jae 0x405349
cmp edi, dword [ebp - 0x220]
je 0x4053ee
shl eax, 8
mov dword [ebp - 0x210], eax
movzx eax, byte [edi]
shl ecx, 8
or ecx, eax
inc edi
mov dword [ebp - 0x218], ecx
mov dword [ebp + 0x18], edi
cmp byte [ebp - 0x209], 0xe8
jne 0x405371
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov ebx, edx
cmp eax, 4
jb 0x4053ee
add edx, 4
sub eax, 4
mov dword [ebp + 8], edx
mov dword [ebp + 0xc], eax
jmp 0x40538a
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov ebx, edx
cmp eax, 4
jb 0x4053ee
add edx, 4
sub eax, 4
mov dword [ebp + 0x10], edx
mov dword [ebp + 0x14], eax
movzx edx, byte [ebx]
movzx eax, byte [ebx + 1]
shl edx, 8
or edx, eax
movzx eax, byte [ebx + 2]
shl edx, 8
or edx, eax
movzx eax, byte [ebx + 3]
mov ebx, dword [ebp - 0x224]
shl edx, 8
or edx, eax
sub edx, esi
sub edx, 4
mov byte [ebx + esi], dl
inc esi
cmp esi, dword [ebp + 0x24]
je 0x4053e4
mov eax, edx
shr eax, 8
mov byte [ebx + esi], al
inc esi
cmp esi, dword [ebp + 0x24]
je 0x4053e4
mov eax, edx
shr eax, 0x10
mov byte [ebx + esi], al
inc esi
cmp esi, dword [ebp + 0x24]
je 0x4053e4
shr edx, 0x18
mov byte [ebx + esi], dl
inc esi
jmp 0x4051dc
xor eax, eax
cmp esi, dword [ebp + 0x24]
setne al
jmp 0x4053f1
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408990
mov esp, ebp
pop ebp
ret