Function at 0x40a730
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
mov esi, ebx
shl esi, 4
mov ecx, dword [eax + esi + 4]
dec ecx
cmp ecx, 0x47
ja case.0x40a75d.8
movzx ecx, byte [ecx + 0x40a9fc]
jmp dword [ecx*4 + 0x40a9d4]
mov ecx, dword [eax + esi + 8]
test ecx, ecx
je 0x40a930
cmp ecx, dword [eax + esi + 0xc]
je case.0x40a75d.8
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
push edx
mov edx, dword [ebp + 8]
shl ebx, 4
mov ecx, dword [ebx + eax + 0xc]
push esi
push ecx
push edx
mov ecx, edi
call fcn.0040a730
cmp eax, 0xffffffff
jne 0x40a8f5
mov eax, dword [ebp + 0x14]
mov ecx, dword [edi]
mov edx, dword [ebx + ecx + 8]
push eax
mov eax, dword [ebp + 8]
push esi
push edx
push eax
mov ecx, edi
call fcn.0040a730
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [eax + esi + 8]
mov ecx, dword [eax + esi + 0xc]
inc ebx
mov esi, ebx
shl esi, 4
cmp dword [eax + esi + 4], 1
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
je 0x40a82c
cmp byte [edi + 0x10], 0
je 0x40a7f5
mov edx, dword [edi + 4]
mov eax, dword [ebp + 8]
movzx edx, word [edx + eax*2]
jmp 0x40a80b
mov ecx, dword [edi + 4]
mov edx, dword [ebp + 8]
movzx eax, word [ecx + edx*2]
push eax
call fcn.0041054a
add esp, 4
movzx edx, ax
mov eax, dword [edi]
mov ecx, dword [eax + esi + 4]
cmp ecx, 0x32
jne 0x40a85e
movzx ecx, dx
cmp ecx, dword [eax + esi]
jl 0x40a86b
cmp ecx, dword [eax + esi + 8]
jg 0x40a86b
mov dword [esp + 0xc], 1
mov eax, dword [esp + 0x10]
xor eax, dword [esp + 0xc]
je 0x40a8f2
mov edx, dword [edi + 4]
mov eax, dword [ebp + 8]
cmp word [edx + eax*2], 0
je 0x40a8f2
inc dword [ebp + 8]
mov ebx, dword [esp + 0x14]
mov dword [ebp + 0x14], 0
jmp 0x40a741
cmp ecx, 0x33
jne 0x40a86b
movzx ecx, dx
cmp ecx, dword [eax + esi]
je 0x40a824
inc ebx
mov esi, ebx
shl esi, 4
cmp dword [eax + esi + 4], 1
jne 0x40a7e3
jmp 0x40a82c
mov ecx, dword [ebp + 8]
mov eax, edi
call fcn.0040aa50
mov edx, dword [edi]
movzx ecx, ax
cmp ecx, dword [esi + edx]
jne 0x40a8f2
mov ecx, dword [edi]
inc dword [ebp + 8]
mov ebx, dword [esi + ecx + 8]
mov dword [ebp + 0x14], 0
jmp 0x40a741
mov eax, dword [edi + 4]
mov ecx, dword [ebp + 8]
movzx eax, word [eax + ecx*2]
test ax, ax
je 0x40a8f2
cmp ax, 0xa
je 0x40a8f2
mov ecx, dword [edi]
inc dword [ebp + 8]
mov ebx, dword [esi + ecx + 8]
mov dword [ebp + 0x14], 0
jmp 0x40a741
mov edx, dword [eax + esi]
mov eax, dword [ebp + 8]
mov ecx, dword [edi + 4]
mov edx, dword [edx*8 + 0x43ef84]
push eax
push ecx
call edx
add esp, 8
sub eax, 0
je 0x40a892
sub eax, 2
jne case.0x40a75d.8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [edi + 4]
mov ecx, dword [ebp + 8]
cmp word [eax + ecx*2 - 2], 0xa
je case.0x40a75d.8
test ecx, ecx
jmp 0x40a923
mov edx, dword [edi + 4]
mov eax, dword [ebp + 8]
movzx eax, word [edx + eax*2]
cmp ax, 0xa
je case.0x40a75d.8
test ax, ax
jne 0x40a8f2
mov ecx, dword [edi]
mov ebx, dword [esi + ecx + 8]
jmp 0x40a741
cmp dword [edi + 8], 0
je 0x40a940
mov eax, dword [ebp + 0x10]
mov ebx, edi
call fcn.0040ab50
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [edi]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x18], ecx
shl ebx, 4
add ebx, edx
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], eax
mov ecx, dword [ebx]
mov dword [esp + 0x20], ecx
push edx
mov edx, dword [ebx + 8]
lea ecx, [esp + 0x1c]
push ecx
push edx
push eax
mov ecx, edi
call fcn.0040a730
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x10]
mov edx, dword [edi]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
lea ecx, [eax - 1]
mov dword [esp + 0x24], ecx
shl ebx, 4
add ebx, edx
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x1c], 1
mov ecx, dword [ebx]
mov dword [esp + 0x20], ecx
push edx
mov edx, dword [ebx + 8]
lea ecx, [esp + 0x1c]
push ecx
push edx
push eax
mov ecx, edi
call fcn.0040a730
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10