Function at 0x40ad20
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 0x40ad35
push esi
call fcn.0040b030
jmp 0x40ad3b
push esi
call fcn.0040b4c0
add esp, 4
lea edi, [esi + 0x9272]
cmp edi, dword [esi + 0x28]
jae 0x40afbd
mov ebx, 1
jmp 0x40ad6b
shr ebx, 1
cmp edi, dword [esi + 0x28]
jae 0x40afc3
cmp ebx, 1
jne 0x40ad7a
movzx ebx, byte [edi]
inc edi
or ebx, 0x100
test bl, 1
jne 0x40ade0
movzx edx, byte [edi]
movzx ebp, word [esi + edx*2 + 0x8852]
mov eax, dword [esi + 0x44]
mov ecx, eax
shl ebp, cl
inc edi
movzx ecx, byte [esi + edx + 0x8f12]
mov edx, ebp
or edx, dword [esi + 0x48]
mov dword [esi + 0x48], edx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40adc1
jmp 0x40ad60
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40ad60
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40adb0
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40adb0
movzx ebp, byte [edi]
movzx eax, byte [edi + 1]
mov dword [esp], eax
movzx eax, word [ebp + ebp + 0x44802e]
movzx edx, word [esi + eax*2 + 0x8852]
mov ecx, dword [esi + 0x44]
shl edx, cl
movzx eax, byte [esi + eax + 0x8f12]
or edx, dword [esi + 0x48]
add eax, ecx
movzx ecx, byte [edi + 2]
mov dword [esp + 4], ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], eax
cmp eax, 8
jae 0x40aea5
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edi
movzx edi, byte [ebp + 0x448288]
and ebp, dword [edi*4 + 0x448244]
mov ecx, eax
shl ebp, cl
mov ebx, ebp
xor ebx, edx
add ebx, edx
not ebp
and ebp, edx
sub ebx, ebp
mov dword [esi + 0x48], ebx
add eax, edi
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x40aec0
mov edi, dword [esp + 4]
jmp 0x40ae71
shr ebx, 8
mov dword [esi + 0x48], ebx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40aec4
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40ae60
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40ae60
shr edx, 8
mov dword [esi + 0x48], edx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x40ae23
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40ae90
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40ae90
mov edi, dword [esp + 4]
mov edx, edi
shl edx, 8
add edx, dword [esp]
cmp edx, 0x200
mov dword [esp], edx
jb 0x40aef0
lea ecx, [edi + 0x447fae]
lea ebp, [edi + 0x448588]
jmp 0x40aefc
lea ecx, [edx + 0x447dae]
lea ebp, [edx + 0x448388]
movzx edi, byte [ecx]
movzx edx, word [esi + edi*2 + 0x8a92]
mov ecx, eax
shl edx, cl
or edx, ebx
movzx ecx, byte [esi + edi + 0x9032]
add ecx, eax
movzx eax, byte [ebp]
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x40af60
mov ebx, dword [esp + 8]
jmp 0x40af41
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40af64
mov edi, dword [esi + 0x30]
cmp edi, dword [esi + 0x34]
jae 0x40af30
lea ecx, [edi + 1]
mov dword [esi + 0x30], ecx
mov byte [edi], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40af30
mov ebx, dword [esp + 8]
mov edi, dword [esp + 0xc]
add edi, 3
mov ebp, dword [esp]
and ebp, dword [eax*4 + 0x448244]
shl ebp, cl
or ebp, edx
mov edx, ebp
mov dword [esi + 0x48], ebp
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x40afa5
jmp 0x40ad60
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40ad60
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40af90
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40af90
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
movzx eax, word [esi + 0x8a52]
mov edi, edx
movzx edx, byte [esi + 0x9012]
shl eax, cl
or eax, edi
mov dword [esi + 0x48], eax
add edx, ecx
mov dword [esi + 0x44], edx
cmp edx, 8
jae 0x40b011
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 edx, 0xfffffff8
mov dword [esi + 0x44], edx
cmp edx, 7
jbe 0x40afe4
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40b000
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x40b000