Function at 0x4130b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
mov esi, eax
mov ax, word [edi + 0x36]
xor ax, word [edi + 0x34]
mov ecx, 0xff
xor ax, word [edi + 0x38]
xor ax, cx
jne 0x41336f
cmp dword [edi + 0x5c], 0
je 0x41336f
mov edx, dword [edi + 0x54]
mov eax, dword [edx + 0xe0c0]
test eax, eax
je 0x4130fd
cmp dword [edi + 0x50], eax
je 0x4130fd
mov eax, edi
call fcn.00411b00
test eax, eax
je 0x41336f
mov ecx, dword [edi + 0x18]
mov ebp, dword [esi + 4]
xor edx, edx
mov eax, ebp
div ecx
mov ebx, dword [esi + 0xc]
mov eax, ebx
sub ebp, edx
xor edx, edx
div ecx
mov dword [esi + 4], ebp
sub ebx, edx
xor edx, edx
lea ebx, [ebx + ecx - 1]
mov dword [esi + 0xc], ebx
mov dword [esp + 0x24], ebx
mov ebx, dword [esi]
mov eax, ebx
div ecx
mov eax, dword [esi + 8]
sub ebx, edx
xor edx, edx
div ecx
mov eax, dword [esi + 8]
mov dword [esi], ebx
sub eax, edx
lea eax, [eax + ecx - 1]
mov dword [esi + 8], eax
mov dword [esp + 0x28], eax
xor edx, edx
mov eax, ebp
div ecx
xor edx, edx
mov esi, dword [edi + 4]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x24]
div ecx
xor edx, edx
mov dword [esp + 0x40], eax
mov eax, ebx
div ecx
xor edx, edx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
div ecx
movzx ecx, byte [edi + 0x30]
mov dword [esp + 0x3c], eax
mov eax, ecx
imul eax, ebx
cdq
and edx, 7
add eax, edx
mov edx, esi
imul edx, ebp
mov ebp, dword [esp + 0x34]
sar eax, 3
add eax, edx
add eax, dword [edi + 0x50]
mov dword [esp + 0x18], eax
mov eax, ecx
imul eax, ebp
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x38]
imul esi, edx
sar eax, 3
shr ecx, 3
add eax, esi
add eax, dword [edi + 0x1c]
mov ebx, ecx
mov ecx, dword [esp + 0x40]
cmp edx, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], ebx
jge 0x41336f
mov esi, dword [esp + 0x3c]
sub esi, ebp
sub ecx, edx
mov dword [esp + 0x30], esi
mov dword [esp + 0x28], ecx
lea ecx, [ecx]
test esi, esi
jle 0x413351
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], esi
xor esi, esi
xor ebp, ebp
xor edx, edx
xor eax, eax
cmp ebx, 2
mov dword [esp + 0x1c], esi
jl 0x413240
mov ecx, dword [esp + 0x14]
movzx ebx, byte [ecx + eax - 1]
mov ecx, esi
shl ebx, cl
mov ecx, dword [esp + 0x14]
add eax, 2
add ebp, ebx
movzx ebx, byte [ecx + eax - 2]
lea ecx, [esi + 8]
shl ebx, cl
add esi, 0x10
add dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x2c]
lea ecx, [ebx - 1]
cmp eax, ecx
jb 0x41320e
cmp eax, ebx
jae 0x41325b
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add edx, eax
invalid
mov eax, dword [esp + 0x1c]
movzx ecx, byte [edi + 0x3b]
add ebp, eax
add edx, ebp
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 0x4132ad
mov ebp, 0x101010
jmp 0x413308
cmp eax, 0x40
jg 0x4132b9
mov ebp, 0x303030
jmp 0x413308
cmp eax, 0x60
jg 0x4132c5
mov ebp, 0x505050
jmp 0x413308
cmp eax, 0x80
jg 0x4132d3
mov ebp, 0x707070
jmp 0x413308
cmp eax, 0xa0
jg 0x4132e1
mov ebp, 0x909090
jmp 0x413308
cmp eax, 0xc0
jg 0x4132ef
mov ebp, 0xb0b0b0
jmp 0x413308
xor ecx, ecx
cmp eax, 0xe0
setg cl
dec ecx
and ecx, 0xffdfdfe0
add ecx, 0xf0f0f0
mov ebp, ecx
xor eax, eax
test ebx, ebx
jbe 0x413336
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
xor esi, esi
add edx, ecx
mov dword [esp + 0x1c], edx
mov edi, edi
mov ecx, esi
mov edx, ebp
shr edx, cl
mov ecx, dword [esp + 0x1c]
inc eax
add esi, 8
mov byte [ecx + eax - 1], dl
cmp eax, ebx
jb 0x413320
add dword [esp + 0x10], ebx
add dword [esp + 0x14], ebx
sub dword [esp + 0x24], 1
jne 0x4131fd
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
mov ecx, dword [edi + 4]
mov edx, dword [edi + 0x18]
imul edx, ecx
add dword [esp + 0x18], edx
add eax, ecx
sub dword [esp + 0x28], 1
mov dword [esp + 0x20], eax
jne 0x4131e0
pop esi
pop ebp
pop ebx
add esp, 0x38
ret