Function at 0x404a10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx]
ja 0x4048f9
xor edx, edx
mov eax, 0xc
call fcn.00417120
sub esp, 0x48
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
movzx eax, byte [ecx + 4]
add eax, 4
mov dword [esp + 0x44], eax
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], 0
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x40]
mov dword [esp], eax
mov eax, dword [edx + 0x28]
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], eax
mov eax, dword [edx + 0x28]
mov eax, dword [eax + 0x14]
mov eax, dword [eax]
call eax
mov edi, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
and dword [esp + 0x40], 0xffffffc0
cmp dword [esp + 0x40], 0x40
jae 0x404afd
mov eax, 1
shl eax, 6
add dword [esp + 0x40], eax
movzx eax, byte [ebp]
mov ecx, edi
add ecx, eax
mov ebx, 0x20
sub ebx, ecx
movzx ecx, byte [ebp]
mov eax, 1
shl eax, cl
dec eax
mov edx, eax
mov ecx, ebx
mov eax, dword [esp + 0x40]
shr eax, cl
and eax, edx
mov ecx, dword [esp + 0x44]
imul ecx, eax
mov edx, ebp
lea eax, [edx + ecx]
add eax, 0xc
mov ebx, eax
mov eax, dword [eax]
mov esi, eax
and eax, 0x3f
cmp eax, 0x3f
je 0x404aef
mov dword [esp + 0x3c], ebp
movsx ecx, word [ebp + 4]
lea eax, [ebx + ecx]
mov ebp, eax
cmp ebx, ebp
je 0x4049d0
mov esi, dword [ebx]
cmp esi, 0
jne 0x404ad7
cmp ebx, ebp
mov dword [esp + 0x2c], ebp
je 0x4049e9
mov esi, dword [ebx]
mov eax, esi
mov dword [esp + 0x34], esi
xor eax, dword [esp + 0x40]
cmp eax, 0x3f
jb 0x4049ef
xor eax, eax
add esp, 0x48
ret
mov ecx, ebx
mov dword [esp + 0x30], ebx
add ecx, 4
mov eax, dword [esp + 0x50]
movzx eax, byte [eax + 5]
and eax, 2
cmp eax, 0
je 0x404a0b
mov ecx, dword [ebx + 4]
mov byte [esp + 0x2b], 0
lea eax, [esp + 0x2b]
mov dword [esp], eax
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 0x28]
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 4]
call eax
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x34]
cmp byte [esp + 0x2b], 0
je 0x404ac5
mov eax, dword [esp + 0x50]
movzx eax, byte [eax + 5]
and eax, 8
cmp eax, 0
je 0x404a6f
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00414380
mov eax, dword [esp + 0x50]
movzx eax, byte [eax + 5]
and eax, 1
cmp eax, 0
je 0x404a99
mov ecx, dword [esp + 0x50]
movzx ecx, byte [ecx + 6]
mov edx, dword [esp + 0x30]
lea eax, [edx + ecx]
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.00414380
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, 1
mov dword [esp + 8], eax
call fcn.004040d0
mov eax, dword [esp + 0x50]
dec dword [eax]
mov eax, 1
add esp, 0x48
ret
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
lea eax, [edx + ecx]
mov ebx, eax
jmp 0x4049d0
cmp esi, dword [esp + 0x40]
jae 0x4049d0
mov edx, dword [esp + 0x44]
lea eax, [edx + ebx]
mov ebx, eax
jmp 0x4049c1
movzx eax, byte [ebp]
add edi, eax
mov ebp, dword [ebx + 4]
jmp 0x40496c
xor eax, eax
jmp 0x404965