Function at 0x40ac90
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 0x40aca5
push esi
call fcn.0040afa0
jmp 0x40acab
push esi
call fcn.0040b430
add esp, 4
lea ebp, [esi + 0x9272]
cmp ebp, dword [esi + 0x28]
jae 0x40af29
mov ebx, 1
jmp 0x40ace2
mov ebp, dword [esp]
mov ebx, dword [esp + 8]
shr ebx, 1
cmp ebp, dword [esi + 0x28]
jae 0x40af2f
cmp ebx, 1
jne 0x40acf2
movzx ebx, byte [ebp]
inc ebp
or ebx, 0x100
test bl, 1
jne 0x40ad60
movzx edi, byte [ebp]
movzx edx, word [esi + edi*2 + 0x8852]
mov eax, dword [esi + 0x44]
mov ecx, eax
shl edx, cl
inc ebp
movzx ecx, byte [esi + edi + 0x8f12]
or edx, dword [esi + 0x48]
mov dword [esi + 0x48], edx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40ad41
jmp 0x40acd7
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40acd7
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40ad30
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40ad30
mov dword [esp + 8], ebx
movzx edx, byte [ebp]
movzx eax, word [edx + edx + 0x44c02e]
movzx ebx, word [esi + eax*2 + 0x8852]
mov ecx, dword [esi + 0x44]
shl ebx, cl
movzx eax, byte [esi + eax + 0x8f12]
add eax, ecx
movzx ecx, byte [ebp + 1]
mov dword [esp + 4], ecx
or ebx, dword [esi + 0x48]
movzx edi, byte [ebp + 2]
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], eax
cmp eax, 8
jae 0x40ae11
mov dword [esp], edi
movzx edi, byte [edx + 0x44c288]
and edx, dword [edi*4 + 0x44c244]
mov ecx, eax
shl edx, cl
or edx, ebx
mov dword [esi + 0x48], edx
add eax, edi
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x40ae30
mov edi, dword [esp]
jmp 0x40ade1
shr edx, 8
mov dword [esi + 0x48], edx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40ae33
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40add0
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40add0
shr ebx, 8
mov dword [esi + 0x48], ebx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40ada1
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40ae00
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40ae00
mov edi, dword [esp]
mov dword [esp], ebp
mov ebp, edi
shl ebp, 8
add ebp, dword [esp + 4]
cmp ebp, 0x200
jb 0x40ae60
lea ecx, [edi + 0x44bfae]
lea edi, [edi + 0x44c588]
jmp 0x40ae6c
lea ecx, [ebp + 0x44bdae]
lea edi, [ebp + 0x44c388]
mov dword [esp + 4], edi
movzx edi, byte [ecx]
movzx ebx, word [esi + edi*2 + 0x8a92]
mov ecx, eax
shl ebx, cl
or ebx, edx
movzx ecx, byte [esi + edi + 0x9032]
add ecx, eax
mov eax, dword [esp + 4]
movzx eax, byte [eax]
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40af11
add dword [esp], 3
mov edx, ebp
not edx
or edx, dword [eax*4 + 0x44c244]
add edx, ebp
inc edx
shl edx, cl
or edx, ebx
mov dword [esi + 0x48], edx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x40acd0
mov ebp, dword [esp]
mov ebx, dword [esp + 8]
jmp 0x40aee5
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40acd7
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40aed0
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40aed0
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40ae9d
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x40af00
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40af00
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
movzx eax, word [esi + 0x8a52]
movzx edi, byte [esi + 0x9012]
shl eax, cl
or eax, edx
mov dword [esi + 0x48], eax
mov edx, ecx
and edx, edi
xor ecx, edi
lea ecx, [ecx + edx*2]
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40af81
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 eax, 8
mov dword [esi + 0x48], eax
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40af55
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x40af70
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x40af70