Function at 0x40a7b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, ecx
test edx, edx
je 0x40a7c5
push esi
call fcn.0040aab0
jmp 0x40a7cb
push esi
call fcn.0040af70
add esp, 4
lea edi, [esi + 0x9272]
cmp edi, dword [esi + 0x28]
jae 0x40aa3d
mov ebx, 1
jmp 0x40a7ff
mov ebx, dword [esp + 4]
shr ebx, 1
cmp edi, dword [esi + 0x28]
jae 0x40aa43
cmp ebx, 1
jne 0x40a80e
movzx ebx, byte [edi]
inc edi
or ebx, 0x100
mov ebp, dword [esi + 0x48]
test bl, 1
jne 0x40a870
movzx eax, byte [edi]
inc edi
movzx edx, word [esi + eax*2 + 0x8852]
movzx eax, byte [esi + eax + 0x8f12]
mov ecx, dword [esi + 0x44]
shl edx, cl
or edx, ebp
mov dword [esi + 0x48], edx
add eax, ecx
mov dword [esi + 0x44], eax
cmp eax, 8
jae 0x40a851
jmp 0x40a7f4
shr edx, 8
mov dword [esi + 0x48], edx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40a7f4
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40a840
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40a840
mov dword [esp + 4], ebx
movzx eax, byte [edi]
mov dword [esp], edi
movzx edi, word [eax + eax + 0x44602e]
movzx edx, word [esi + edi*2 + 0x8852]
mov ebx, dword [esi + 0x44]
mov ecx, ebx
shl edx, cl
or edx, ebp
mov ecx, dword [esp]
movzx ebp, byte [ecx + 2]
movzx ecx, byte [esi + edi + 0x8f12]
add ecx, ebx
mov edi, dword [esp]
movzx edi, byte [edi + 1]
mov dword [esp + 8], edi
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40a911
movzx edi, byte [eax + 0x446288]
and eax, dword [edi*4 + 0x446244]
shl eax, cl
or eax, edx
mov dword [esi + 0x48], eax
add ecx, edi
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40a94a
mov edx, ebp
shl edx, 8
add edx, dword [esp + 8]
cmp edx, 0x200
jb 0x40a970
lea ebx, [ebp + 0x445fae]
lea ebp, [ebp + 0x446588]
jmp 0x40a97c
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40a8ba
mov ebx, dword [esi + 0x30]
cmp ebx, dword [esi + 0x34]
jae 0x40a900
lea ecx, [ebx + 1]
mov dword [esi + 0x30], ecx
mov byte [ebx], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40a900
shr eax, 8
mov dword [esi + 0x48], eax
mov edx, ecx
xor edx, 8
and ecx, 0xfffffff7
add ecx, ecx
sub ecx, edx
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40a8d9
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x40a930
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x40a930
lea ebx, [edx + 0x445dae]
lea ebp, [edx + 0x446388]
movzx edi, byte [ebx]
movzx ebx, word [esi + edi*2 + 0x8a92]
shl ebx, cl
or ebx, eax
movzx eax, byte [esi + edi + 0x9032]
add eax, ecx
movzx ebp, byte [ebp]
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x40a9e0
mov edi, dword [esp]
jmp 0x40a9c1
shr ebx, 8
mov dword [esi + 0x48], ebx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40a9e3
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40a9b0
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40a9b0
mov edi, dword [esp]
add edi, 3
and edx, dword [ebp*4 + 0x446244]
mov ecx, eax
shl edx, cl
or edx, ebx
mov dword [esi + 0x48], edx
add eax, ebp
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x40a7f0
mov ebx, dword [esp + 4]
jmp 0x40aa25
shr edx, 8
mov dword [esi + 0x48], edx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40a7f4
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40aa10
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40aa10
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
movzx ebx, word [esi + 0x8a52]
movzx edi, byte [esi + 0x9012]
mov ecx, eax
shl ebx, cl
or ebx, edx
mov dword [esi + 0x48], ebx
add edi, eax
mov dword [esi + 0x44], edi
cmp edi, 8
jae 0x40aa91
mov ecx, dword [esi + 0x30]
xor eax, eax
cmp ecx, dword [esi + 0x34]
setb al
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
shr ebx, 8
mov dword [esi + 0x48], ebx
add edi, 0xfffffff8
mov dword [esi + 0x44], edi
cmp edi, 7
jbe 0x40aa64
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40aa80
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov edi, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40aa80