Function at 0x479870
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov ebp, dword [esp + 0x28]
mov eax, dword [0x8e4a3c]
xor eax, esp
mov dword [esp + 0x10], eax
movzx eax, word [ebp + 0x22]
test eax, 0x1f8
je 0x4798b6
movzx ecx, word [esp + 0x2c]
not ecx
mov dword [esp + 8], ecx
movzx ecx, word [esp + 0x30]
not ecx
mov dword [esp + 4], ecx
mov dword [esp], 0
lea esi, [esp + 0xc]
xor edi, edi
jmp 0x4798e1
mov dword [esp], 0
jmp 0x479b97
mov ecx, 2
movzx eax, word [ebp + 0x22]
mov dword [esp], ecx
nop
inc edi
mov ecx, eax
shr ecx, 3
and ecx, 0x3f
cmp edi, ecx
jae 0x479b97
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + edi*8 + 4]
test edx, 0x2000000
jne 0x4798d0
movzx edx, dx
test dword [esp + 8], edx
setne bl
test dword [esp + 4], edx
sete dl
xor dl, bl
jne 0x4798d0
mov ebx, dword [ecx + edi*8]
push esi
push 0x10
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x11
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x12
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x13
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x15
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x14
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0xa
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x6a
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x6b
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 1
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 4
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 2
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 3
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 5
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 6
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x32
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x6d
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x6c
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x479b90
push esi
push 0x68
push ebx
call fcn.004b0860
add esp, 0xc
mov ecx, 2
test al, al
jne 0x4798c7
push esi
push 0x69
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x6d
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x6c
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x37
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x38
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x35
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x40
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x45
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x41
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x42
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x43
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
jne 0x4798c2
push esi
push 0x49
push ebx
call fcn.004b0860
add esp, 0xc
test al, al
mov ecx, 2
jne 0x4798c7
mov ecx, dword [esp]
test ecx, ecx
mov eax, 1
cmove ecx, eax
jmp 0x4798c7
mov dword [esp], 3
mov ecx, dword [esp + 0x10]
xor ecx, esp
call fcn.004c0e60
mov eax, dword [esp]
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret