Function at 0x4197f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, eax
push edi
mov edi, dword [ebp + 8]
mov ax, word [edi + 0x36]
xor ax, word [edi + 0x34]
mov ecx, 0xff
xor ax, word [edi + 0x38]
xor ax, cx
jne 0x41981a
cmp dword [edi + 0x5c], 0
jne 0x419825
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [edi + 0x54]
mov eax, dword [edx + 0xe0b8]
cmp dword [edi + 0x50], eax
je 0x41983e
mov eax, edi
call fcn.004184a0
test eax, eax
je 0x41981a
mov ecx, dword [edi + 0x18]
mov ebx, dword [esi + 4]
xor edx, edx
mov eax, ebx
div ecx
mov eax, dword [esi + 0xc]
sub ebx, edx
xor edx, edx
div ecx
mov eax, dword [esi + 0xc]
mov dword [esi + 4], ebx
sub eax, edx
lea eax, [eax + ecx - 1]
mov dword [esi + 0xc], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
xor edx, edx
div ecx
mov eax, dword [esi]
sub eax, edx
mov dword [esi], eax
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 8]
xor edx, edx
div ecx
mov eax, dword [esi + 8]
sub eax, edx
lea eax, [eax + ecx - 1]
mov dword [esi + 8], eax
mov dword [ebp - 0x20], eax
xor edx, edx
mov eax, ebx
div ecx
xor edx, edx
mov esi, dword [edi + 4]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x1c]
div ecx
xor edx, edx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x14]
div ecx
xor edx, edx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x20]
div ecx
movzx ecx, byte [edi + 0x30]
mov dword [ebp - 0x2c], eax
mov eax, ecx
imul eax, dword [ebp - 0x14]
cdq
and edx, 7
add eax, edx
mov edx, esi
imul edx, ebx
sar eax, 3
add eax, edx
add eax, dword [edi + 0x50]
mov dword [ebp - 0xc], eax
mov eax, ecx
imul eax, dword [ebp - 0x34]
cdq
and edx, 7
add eax, edx
mov edx, dword [ebp - 0x30]
imul esi, edx
sar eax, 3
shr ecx, 3
add eax, esi
add eax, dword [edi + 0x1c]
mov ebx, ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ebx
cmp edx, ecx
jge 0x419a9d
mov esi, dword [ebp - 0x2c]
sub esi, dword [ebp - 0x34]
sub ecx, edx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], ecx
jmp 0x419917
mov esi, dword [ebp - 0x24]
xor edx, edx
cmp esi, edx
jle 0x419a83
mov dword [ebp - 8], edx
mov dword [ebp - 0x1c], esi
jmp 0x419932
xor edx, edx
xor eax, eax
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], edx
cmp ebx, 2
jl 0x41997c
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
xor esi, esi
lea edi, [ecx + edi + 1]
jmp 0x419950
movzx ebx, byte [edi + eax - 1]
mov ecx, esi
shl ebx, cl
lea ecx, [esi + 8]
add eax, 2
add esi, 0x10
add dword [ebp - 4], ebx
movzx ebx, byte [edi + eax - 2]
shl ebx, cl
add dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 0x18]
lea ecx, [ebx - 1]
cmp eax, ecx
jb 0x419950
mov edi, dword [ebp + 8]
cmp eax, ebx
jae 0x419995
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
add edx, eax
movzx edx, byte [edx + ecx]
lea ecx, [eax*8]
shl edx, cl
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x10]
movzx ecx, byte [edi + 0x3b]
add edx, eax
mov eax, edx
shr eax, cl
movzx ecx, word [edi + 0x36]
and eax, ecx
movzx ecx, byte [edi + 0x3a]
mov esi, edx
shr esi, cl
movzx ecx, word [edi + 0x34]
and esi, ecx
movzx ecx, byte [edi + 0x3c]
imul esi, esi, 0xb
shr edx, cl
movzx ecx, word [edi + 0x38]
shl eax, 4
and edx, ecx
add eax, esi
lea edx, [edx + edx*4]
add eax, edx
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
cmp eax, 0x20
jg 0x4199e9
mov dword [ebp - 4], 0x101010
jmp 0x419a4f
cmp eax, 0x40
jg 0x4199f7
mov dword [ebp - 4], 0x303030
jmp 0x419a4f
cmp eax, 0x60
jg 0x419a05
mov dword [ebp - 4], 0x505050
jmp 0x419a4f
cmp eax, 0x80
jg 0x419a15
mov dword [ebp - 4], 0x707070
jmp 0x419a4f
cmp eax, 0xa0
jg 0x419a25
mov dword [ebp - 4], 0x909090
jmp 0x419a4f
cmp eax, 0xc0
jg 0x419a35
mov dword [ebp - 4], 0xb0b0b0
jmp 0x419a4f
xor ecx, ecx
cmp eax, 0xe0
setg cl
dec ecx
and ecx, 0xffdfdfe0
add ecx, 0xf0f0f0
mov dword [ebp - 4], ecx
xor eax, eax
test ebx, ebx
je 0x419a74
xor esi, esi
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x14]
mov ecx, esi
shr edx, cl
mov ecx, dword [ebp - 8]
add ecx, eax
inc eax
mov byte [ecx + ebx], dl
mov ebx, dword [ebp - 0x18]
add esi, 8
cmp eax, ebx
jb 0x419a57
add dword [ebp - 8], ebx
dec dword [ebp - 0x1c]
jne 0x419930
mov eax, dword [ebp - 0x14]
mov ecx, dword [edi + 4]
mov edx, dword [edi + 0x18]
imul edx, ecx
add dword [ebp - 0xc], edx
add eax, ecx
dec dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
jne 0x419914
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 4