Function at 0x42f470
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x228
mov eax, dword [0x4d7394]
xor eax, esp
mov dword [esp + 0x224], eax
mov eax, dword [esp + 0x22c]
mov dword [esp + 0x10], eax
push ebx
push ebp
mov eax, 0x400
movzx ebp, ax
push esi
mov eax, ebp
push edi
mov dword [esp + 0x2c], ecx
shl ebp, 0x10
or eax, ebp
mov esi, edx
mov ecx, 0x81
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x254]
mov ecx, esi
add esi, eax
xor edx, edx
xor bl, bl
xor edi, edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], 0xffffffff
xor eax, eax
jmp 0x42f4d8
mov edi, dword [esp + 0x18]
cmp ecx, esi
je 0x42f500
movzx ebp, byte [ecx]
shl edi, 8
or edi, ebp
inc eax
inc ecx
cmp eax, 5
mov dword [esp + 0x18], edi
jl 0x42f4d4
mov dword [esp + 0x1c], ecx
cmp dword [esp + 0x258], edx
jne 0x42f507
xor eax, eax
jmp 0x42f568
mov eax, 1
jmp 0x42f568
mov edi, dword [esp + 0x2c]
mov ebp, edx
lea ecx, [ecx]
mov esi, dword [esp + 0x240]
mov eax, dword [esp + 0x258]
sub esi, ebp
sub eax, edx
cmp eax, esi
jae 0x42f528
mov esi, eax
test esi, esi
je 0x42f55c
lea esp, [esp]
mov ecx, dword [esp + 0x20]
mov al, byte [ecx + ebp]
mov cl, al
mov byte [edi + edx], al
and cl, 0xfe
inc edx
cmp cl, 0xe8
je 0x42f581
cmp bl, 0xf
jne 0x42f554
mov cl, al
and cl, 0xf0
cmp cl, 0x80
je 0x42f581
inc ebp
sub esi, 1
mov bl, al
jne 0x42f530
xor eax, eax
cmp edx, dword [esp + 0x258]
setne al
mov ecx, dword [esp + 0x234]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004730dc
add esp, 0x228
ret
test esi, esi
je 0x42f55c
cmp edx, dword [esp + 0x258]
je 0x42f55c
mov eax, dword [esp + 0x20]
mov al, byte [eax + ebp]
inc ebp
mov byte [esp + 0x13], al
cmp al, 0xe8
jne 0x42f5a7
movzx esi, bl
lea esi, [esp + esi*2 + 0x30]
jmp 0x42f5b9
lea esi, [esp + 0x230]
cmp al, 0xe9
je 0x42f5b9
lea esi, [esp + 0x232]
movzx ecx, word [esi]
mov eax, dword [esp + 0x14]
shr eax, 0xb
imul eax, ecx
cmp dword [esp + 0x18], eax
jae 0x42f619
mov ebx, 0x800
sub ebx, ecx
shr ebx, 5
add ebx, ecx
mov dword [esp + 0x14], eax
mov word [esi], bx
cmp eax, 0x1000000
jae 0x42f610
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x24]
je 0x42f500
movzx esi, byte [ecx]
shl eax, 8
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
shl eax, 8
or eax, esi
inc ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov bl, byte [esp + 0x13]
jmp 0x42f510
sub dword [esp + 0x14], eax
sub dword [esp + 0x18], eax
mov eax, ecx
shr eax, 5
sub ecx, eax
cmp dword [esp + 0x14], 0x1000000
mov word [esi], cx
jae 0x42f65d
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x24]
je 0x42f500
mov ecx, dword [esp + 0x18]
movzx esi, byte [eax]
shl dword [esp + 0x14], 8
shl ecx, 8
or ecx, esi
inc eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
cmp byte [esp + 0x13], 0xe8
jne 0x42f68d
mov ecx, dword [esp + 0x244]
mov esi, 4
cmp dword [esp + 0x248], esi
jb 0x42f500
add dword [esp + 0x244], esi
sub dword [esp + 0x248], esi
jmp 0x42f6b6
mov ecx, dword [esp + 0x24c]
mov eax, 4
cmp dword [esp + 0x250], eax
jb 0x42f500
add dword [esp + 0x24c], eax
sub dword [esp + 0x250], eax
mov esi, eax
movzx eax, byte [ecx]
movzx ebx, byte [ecx + 1]
shl eax, 8
or eax, ebx
movzx ebx, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl eax, 8
or eax, ebx
shl eax, 8
or eax, ecx
sub eax, edx
sub eax, esi
mov byte [edi + edx], al
inc edx
cmp edx, dword [esp + 0x258]
je 0x42f55c
mov ecx, eax
shr ecx, 8
mov byte [edi + edx], cl
inc edx
cmp edx, dword [esp + 0x258]
je 0x42f55c
mov ecx, eax
shr ecx, 0x10
mov byte [edi + edx], cl
inc edx
cmp edx, dword [esp + 0x258]
je 0x42f55c
shr eax, 0x18
mov bl, al
mov byte [edi + edx], bl
inc edx
jmp 0x42f510