Function at 0x47a6f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
movsx eax, word [0x4e3b10]
sub esp, 0xd4
dec eax
cmp eax, 3
push ebx
push ebp
push esi
push edi
mov edi, ecx
ja case.default.0x47a70d
jmp dword [eax*4 + 0x47abf4]
mov eax, dword [0x798490]
test eax, eax
je case.default.0x47a70d
mov ecx, dword [esp + 0xe8]
call fcn.00487990
mov ecx, dword [0x798490]
call fcn.004a04c0
mov ecx, dword [0x798490]
push 0
call fcn.004a07a0
mov esi, dword [esp + 0xec]
mov ebp, eax
push str.NONE
push esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], 0
mov bl, 1
call fcn.004bcb20
add esp, 8
test eax, eax
je 0x47a8ba
mov eax, dword [esp + 0xf0]
mov ecx, edi
push eax
push esi
mov byte [esp + 0x1b], 0
call fcn.004795f0
mov ebx, eax
mov ecx, ebx
call fcn.00487990
mov ecx, dword [ebx + 0x780]
push 0
push ecx
push 1
push str.Dune2000Lobby
call fcn.0048dc10
add esp, 4
push eax
call fcn.0048dcc0
add esp, 8
mov ecx, ebx
push eax
call fcn.00486d20
test ebp, ebp
je 0x47a86c
mov edx, dword [ebp + 8]
push edx
call fcn.00491660
add esp, 4
test al, al
je 0x47a861
mov eax, dword [ebp + 8]
push eax
call fcn.00491720
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1c]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.s_Game
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 8]
push eax
call fcn.004916b0
mov ecx, dword [ebp + 8]
add esp, 4
push eax
push ecx
call fcn.00491560
add esp, 4
push eax
call fcn.0048db90
add esp, 4
lea edx, [esp + 0x20]
mov ecx, ebx
push eax
push edx
call fcn.00486d20
mov ebp, dword [ebp]
test ebp, ebp
jne 0x47a7c1
mov ax, word [ebx + 0x78a]
cmp ax, word [ebx + 0x7e8]
jae 0x47a883
mov word [ebx + 0x7e8], ax
mov ecx, ebx
call fcn.0040b7c0
mov ax, word [ebx + 0x7e8]
mov dword [ebx + 0x18], 1
test ax, ax
jbe 0x47a8b0
mov ecx, dword [ebx + 0x794]
dec eax
and eax, 0xffff
mov edx, dword [ecx + eax*4]
mov dword [esp + 0x18], edx
mov ebp, dword [esp + 0x14]
mov bl, byte [esp + 0x13]
jmp 0x47a8d1
mov eax, dword [0x798490]
add eax, 0x418
push eax
call fcn.004916b0
add esp, 4
mov dword [esp + 0x18], eax
test ebp, ebp
je 0x47a9b9
mov ecx, dword [ebp + 8]
push ecx
call fcn.004916b0
mov ecx, dword [esp + 0x1c]
add esp, 4
cmp eax, ecx
jne 0x47a9ae
test bl, bl
je 0x47a937
mov edx, dword [ebp + 8]
push edx
call fcn.00491720
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
push ecx
call fcn.004916f0
add esp, 4
and eax, 0xff
jmp 0x47a986
test ecx, ecx
jne 0x47a94b
mov ecx, dword [ebp + 8]
push ecx
call fcn.00491660
add esp, 4
test al, al
jne 0x47a9ae
mov edx, dword [ebp + 8]
push edx
call fcn.00491720
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
push ecx
call fcn.004916b0
add esp, 4
mov edx, dword [ebp + 8]
push eax
push edx
call fcn.00491560
add esp, 4
push eax
call fcn.0048db90
mov ecx, dword [esp + 0xf0]
add esp, 4
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00486d20
mov ebp, dword [ebp]
test ebp, ebp
jne 0x47a8d9
mov eax, dword [esp + 0xe8]
mov bp, word [eax + 0x78a]
cmp bp, word [eax + 0x7e8]
jae 0x47a9d7
mov word [eax + 0x7e8], bp
test bp, bp
jbe 0x47aa76
mov ecx, dword [esp + 0xe8]
mov ebx, dword [eax + 0x7b8]
mov edx, dword [esp + 0xe8]
xor edi, edi
mov eax, dword [ecx + 0x7b0]
mov ecx, ebx
mov di, word [edx + 0x788]
mov dword [esp + 0x14], eax
sub ecx, eax
mov eax, edi
imul eax, ecx
cdq
and ebp, 0xffff
idiv ebp
mov esi, eax
cmp esi, ecx
jbe 0x47aa23
mov esi, ecx
jmp 0x47aa2d
cmp esi, 5
jae 0x47aa2d
mov esi, 5
mov edx, dword [esp + 0xe8]
xor eax, eax
mov ax, word [edx + 0x79e]
xor edx, edx
sub eax, edi
inc eax
imul eax, ecx
div ebp
lea ecx, [eax + esi]
cmp ecx, ebx
jbe 0x47aa52
sub ebx, esi
mov eax, ebx
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0xe8]
add eax, edx
add esi, eax
mov dword [ecx + 0x7c8], eax
mov dword [ecx + 0x7d0], esi
mov dword [ecx + 0x18], 1
mov eax, ecx
mov dword [eax + 0x18], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 0xc
mov eax, dword [0x798490]
test eax, eax
je case.default.0x47a70d
mov ebp, dword [esp + 0xe8]
mov ecx, ebp
call fcn.00487990
mov ecx, dword [0x798490]
call fcn.004a04c0
mov ecx, dword [0x798490]
push 0
call fcn.004a07a0
mov ebx, eax
test ebx, ebx
je 0x47ab2c
mov eax, dword [ebx + 8]
push eax
call fcn.00491720
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 8]
push ecx
call fcn.004916f0
mov edx, dword [ebx + 8]
add esp, 4
and eax, 0xff
push eax
push edx
call fcn.00491560
add esp, 4
push eax
call fcn.0048db90
add esp, 4
mov ecx, ebp
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00486d20
mov ebx, dword [ebx]
test ebx, ebx
jne 0x47aac3
mov si, word [ebp + 0x78a]
cmp si, word [ebp + 0x7e8]
jae 0x47ab43
mov word [ebp + 0x7e8], si
test si, si
jbe 0x47abc4
mov ebx, dword [ebp + 0x7b8]
mov eax, dword [ebp + 0x7b0]
xor edi, edi
mov ecx, ebx
mov di, word [ebp + 0x788]
sub ecx, eax
mov eax, edi
and esi, 0xffff
imul eax, ecx
cdq
idiv esi
mov dword [esp + 0x14], esi
mov esi, eax
cmp esi, ecx
jbe 0x47ab7d
mov esi, ecx
jmp 0x47ab87
cmp esi, 5
jae 0x47ab87
mov esi, 5
xor eax, eax
xor edx, edx
mov ax, word [ebp + 0x79e]
sub eax, edi
inc eax
imul eax, ecx
div dword [esp + 0x14]
lea ecx, [eax + esi]
cmp ecx, ebx
jbe 0x47aba7
sub ebx, esi
mov eax, ebx
mov ecx, dword [ebp + 0x7b0]
mov dword [ebp + 0x18], 1
add eax, ecx
add esi, eax
mov dword [ebp + 0x7c8], eax
mov dword [ebp + 0x7d0], esi
mov dword [ebp + 0x18], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 0xc
push 0x4f3d58
call fcn.00413d50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 0xc