Function at 0x40aa00
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov esi, ecx
test edx, edx
je 0x40aa15
push esi
call fcn.0040ad00
jmp 0x40aa1b
push esi
call fcn.0040b190
add esp, 4
lea ebp, [esi + 0x9272]
cmp ebp, dword [esi + 0x28]
jae 0x40ac8a
mov ebx, 1
jmp 0x40aa4f
mov ebx, dword [esp + 4]
shr ebx, 1
cmp ebp, dword [esi + 0x28]
jae 0x40ac90
cmp ebx, 1
jne 0x40aa5f
movzx ebx, byte [ebp]
inc ebp
or ebx, 0x100
test bl, 1
jne 0x40aad0
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 0x40aab1
jmp 0x40aa44
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40aa44
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40aaa0
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40aaa0
mov dword [esp + 4], ebx
movzx eax, byte [ebp]
mov dword [esp], eax
movzx eax, word [eax + eax + 0x44902e]
movzx ebx, word [esi + eax*2 + 0x8852]
mov ecx, dword [esi + 0x44]
mov edi, ebp
mov ebp, dword [esi + 0x48]
shl ebx, cl
mov edx, ebp
xor edx, ebx
not ebx
and ebx, ebp
add edx, ebp
sub edx, ebx
movzx ebx, byte [edi + 1]
mov dword [esp + 8], ebx
movzx eax, byte [esi + eax + 0x8f12]
add eax, ecx
mov dword [esp + 0xc], edi
movzx ebp, byte [edi + 2]
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], eax
cmp eax, 8
jae 0x40ab81
mov edi, dword [esp]
movzx ebx, byte [edi + 0x449288]
and edi, dword [ebx*4 + 0x449244]
mov ecx, eax
shl edi, cl
or edi, edx
mov edx, edi
mov dword [esi + 0x48], edi
add eax, ebx
mov dword [esi + 0x44], eax
cmp eax, 8
jae 0x40abb1
mov dword [esp], edx
mov edx, ebp
shl edx, 8
add edx, dword [esp + 8]
cmp edx, 0x200
jb 0x40abd0
lea ecx, [ebp + 0x448fae]
lea ebp, [ebp + 0x449588]
jmp 0x40abdc
shr edx, 8
mov dword [esi + 0x48], edx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40ab26
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40ab70
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40ab70
shr edx, 8
mov dword [esi + 0x48], edx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40ab4c
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40aba0
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40aba0
lea ecx, [edx + 0x448dae]
lea ebp, [edx + 0x449388]
movzx edi, byte [ecx]
movzx ebx, word [esi + edi*2 + 0x8a92]
mov ecx, eax
shl ebx, cl
or ebx, dword [esp]
movzx ecx, byte [esi + edi + 0x9032]
add ecx, eax
movzx eax, byte [ebp]
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40ac71
mov ebp, dword [esp + 0xc]
add ebp, 3
and edx, dword [eax*4 + 0x449244]
shl edx, cl
or edx, ebx
mov dword [esi + 0x48], edx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x40aa40
mov ebx, dword [esp + 4]
jmp 0x40ac45
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40aa44
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40ac30
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40ac30
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40ac07
mov ebp, dword [esi + 0x30]
cmp ebp, dword [esi + 0x34]
jae 0x40ac60
lea ecx, [ebp + 1]
mov dword [esi + 0x30], ecx
mov byte [ebp], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40ac60
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
add edi, ecx
mov dword [esi + 0x44], edi
cmp edi, 8
jae 0x40ace1
mov ecx, dword [esi + 0x30]
xor eax, eax
cmp ecx, dword [esi + 0x34]
setb al
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
shr eax, 8
mov dword [esi + 0x48], eax
add edi, 0xfffffff8
mov dword [esi + 0x44], edi
cmp edi, 7
jbe 0x40acaf
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40acd0
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov edi, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x40acd0