Function at 0x40aae0
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 0x40aaf5
push esi
call fcn.0040adf0
jmp 0x40aafb
push esi
call fcn.0040b360
add esp, 4
lea ebp, [esi + 0x9272]
cmp ebp, dword [esi + 0x28]
jae 0x40ad7a
mov ebx, 1
jmp 0x40ab2f
mov ebx, dword [esp + 4]
shr ebx, 1
cmp ebp, dword [esi + 0x28]
jae 0x40ad80
cmp ebx, 1
jne 0x40ab3f
movzx ebx, byte [ebp]
inc ebp
or ebx, 0x100
test bl, 1
jne 0x40abb0
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 0x40ab91
jmp 0x40ab24
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40ab24
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40ab80
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40ab80
mov dword [esp + 4], ebx
movzx eax, byte [ebp]
mov edi, eax
movzx ebx, word [eax + eax + 0x44502e]
movzx edx, word [esi + ebx*2 + 0x8852]
mov eax, dword [esi + 0x44]
mov ecx, eax
shl edx, cl
movzx ecx, byte [esi + ebx + 0x8f12]
add ecx, eax
movzx eax, byte [ebp + 1]
mov dword [esp], eax
or edx, dword [esi + 0x48]
mov dword [esp + 8], ebp
movzx ebp, byte [ebp + 2]
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
mov ebx, edi
cmp ecx, 8
jae 0x40ac61
movzx eax, byte [ebx + 0x445288]
and ebx, dword [eax*4 + 0x445244]
shl ebx, cl
or ebx, edx
mov dword [esi + 0x48], ebx
mov edx, ecx
xor edx, eax
and ecx, eax
lea eax, [edx + ecx*2]
mov dword [esi + 0x44], eax
cmp eax, 8
jae 0x40ac91
mov edx, ebp
shl edx, 8
add edx, dword [esp]
cmp edx, 0x200
jb 0x40acb0
mov edi, ebp
mov ebp, ebx
lea ecx, [edi + 0x444fae]
lea edi, [edi + 0x445588]
jmp 0x40acbe
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40abfa
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40ac50
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40ac50
shr ebx, 8
mov dword [esi + 0x48], ebx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40ac20
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40ac80
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40ac80
mov ebp, ebx
lea ecx, [edx + 0x444dae]
lea edi, [edx + 0x445388]
mov dword [esp], edi
movzx edi, byte [ecx]
movzx ebx, word [esi + edi*2 + 0x8a92]
mov ecx, eax
shl ebx, cl
or ebx, ebp
movzx ecx, byte [esi + edi + 0x9032]
add ecx, eax
mov eax, dword [esp]
movzx eax, byte [eax]
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40ad61
mov ebp, dword [esp + 8]
add ebp, 3
and edx, dword [eax*4 + 0x445244]
shl edx, cl
or edx, ebx
mov dword [esi + 0x48], edx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x40ab20
mov ebx, dword [esp + 4]
jmp 0x40ad35
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40ab24
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40ad20
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40ad20
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40aced
mov ebp, dword [esi + 0x30]
cmp ebp, dword [esi + 0x34]
jae 0x40ad50
lea ecx, [ebp + 1]
mov dword [esi + 0x30], ecx
mov byte [ebp], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40ad50
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 0x40add1
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 edi, 0xfffffff8
mov dword [esi + 0x44], edi
cmp edi, 7
jbe 0x40ad9f
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40adc0
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov edi, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x40adc0