Function at 0x474a10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x474d22
sub esp, 0x34
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
xor edx, edx
xor ebx, ebx
mov ebp, edx
mov esi, ebp
xor edi, edi
jmp 0x474a54
dec ecx
mov dword [esp + 0x3c], ecx
neg ecx
sar ecx, 0x1f
and ecx, 1
add ecx, esi
mov esi, eax
mov eax, ecx
mov ecx, dword [esp + 0x3c]
test ecx, ecx
jle 0x474cdb
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
xchg edi, eax
mov byte [esp + 0x22], al
xchg edi, eax
movzx eax, byte [eax]
mov byte [esp + 0x23], al
cmp al, 0x20
jbe 0x474c75
cmp al, 0x22
je 0x474b1a
cmp al, 0x5c
jne 0x474a99
lea eax, [esi + 1]
mov esi, dword [esp + 0x38]
cmp ecx, 1
jae 0x474a3d
jmp 0x474d1b
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call fcn.00474970
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea ebx, [ecx + 1]
cmp ebx, edx
jg 0x474ae3
movzx ebp, byte [esp + 0x23]
xchg ebp, ebx
mov byte [eax + ecx], bl
xchg ebp, ebx
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov ebp, edx
mov edx, ebx
mov ebx, eax
xor eax, eax
movzx edi, byte [esp + 0x22]
jmp 0x474a8f
mov dword [esp + 0x28], ecx
lea ebp, [0x5cdaa0]
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebx
call fcn.004350a0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebx, [ecx + 1]
mov ecx, dword [esp + 0x28]
jmp 0x474ac0
mov dword [esp + 0x24], esi
mov eax, esi
sar esi, 0x1f
shr esi, 0x1f
lea ecx, [eax + esi]
sar ecx, 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0xc], ecx
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
call fcn.00474970
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x2c]
shl ebx, 1
mov ebp, dword [esp + 0x24]
sub ebp, ebx
test ebp, ebp
jne 0x474c1b
movzx ebx, byte [esp + 0x22]
test bl, bl
je 0x474c11
mov ebp, dword [esp + 0x3c]
cmp ebp, 1
jle 0x474c0b
mov esi, dword [esp + 0x38]
movzx edi, byte [esi + 1]
lea ebx, [esi + 1]
xchg edi, eax
cmp al, 0x22
xchg edi, eax
jne 0x474c01
lea esi, [ecx + 1]
cmp esi, edx
jg 0x474bc2
movzx edi, byte [esp + 0x23]
xchg edi, ebx
mov byte [eax + ecx], bl
xchg edi, ebx
lea ecx, [ebp - 1]
movzx ebp, byte [esp + 0x22]
xor ebp, 1
mov edi, ebp
mov ebp, edx
mov edx, esi
mov esi, ebx
mov ebx, eax
xor eax, eax
jmp 0x474a8f
mov dword [esp + 0x30], ebx
lea ebx, [0x5cdaa0]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], esi
call fcn.004350a0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea esi, [ecx + 1]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x3c]
jmp 0x474b9a
mov ebx, esi
mov ecx, ebp
mov esi, dword [esp + 0x28]
jmp 0x474ba9
mov esi, dword [esp + 0x38]
jmp 0x474c01
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
jmp 0x474c01
lea ebx, [ecx + 1]
cmp ebx, edx
jg 0x474c42
movzx edi, byte [esp + 0x23]
xchg edi, ebx
mov byte [eax + ecx], bl
xchg edi, ebx
mov ecx, dword [esp + 0x3c]
mov esi, ebx
movzx ebp, byte [esp + 0x22]
mov ebx, dword [esp + 0x38]
jmp 0x474bb1
lea ebp, [0x5cdaa0]
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebx
call fcn.004350a0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebx, [ecx + 1]
mov ecx, dword [esp + 0x28]
jmp 0x474c22
cmp al, 9
jne 0x474cd1
xchg edi, eax
test al, al
xchg edi, eax
jne 0x474a99
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call fcn.00474970
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x3c]
dec eax
mov ecx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov edx, dword [esp + 0x38]
add eax, edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
add esp, 0x34
ret
cmp al, 0x20
je 0x474c7a
jmp 0x474a99
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call fcn.00474970
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
add esp, 0x34
ret
call fcn.004243c0
ud2
call fcn.00446b60
jmp fcn.00474a10