Function at 0x47b4f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xdc
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ecx, dword [0x798490]
test ecx, ecx
je 0x47bad0
movsx eax, word [0x4e3b10]
dec eax
je 0x47b98a
sub eax, 2
je 0x47b98a
dec eax
jne 0x47bad0
mov ebx, dword [esp + 0xf0]
xor eax, eax
mov ecx, ebx
mov ax, word [ebx + 0x79c]
mov dword [esp + 0x14], eax
call fcn.00487990
mov ecx, dword [0x798490]
call fcn.004a04c0
mov ecx, dword [0x798490]
push 0
call fcn.004a07a0
mov esi, dword [esp + 0xf4]
mov ebp, eax
push str.NONE
push esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], 0
mov byte [esp + 0x1b], 1
call fcn.004bcb20
add esp, 8
test eax, eax
je 0x47b6d3
push 0
push esi
mov ecx, edi
mov byte [esp + 0x1b], 0
call fcn.004795f0
mov esi, eax
mov ecx, esi
mov dword [esp + 0x20], esi
call fcn.00487990
mov eax, dword [esi + 0x780]
push 0
push eax
push 1
push str.Dune2000Lobby
call fcn.0048dc10
add esp, 4
push eax
call fcn.0048dcc0
add esp, 8
mov ecx, esi
push eax
call fcn.00486d20
test ebp, ebp
je 0x47b689
mov ecx, dword [ebp + 8]
push ecx
call fcn.00491660
add esp, 4
test al, al
je 0x47b67e
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 + 0x24]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x24]
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
mov ecx, dword [esp + 0x28]
add esp, 4
lea edx, [esp + 0x28]
push eax
push edx
call fcn.00486d20
mov esi, dword [esp + 0x20]
mov ebp, dword [ebp]
test ebp, ebp
jne 0x47b5d8
mov ax, word [esi + 0x78a]
cmp ax, word [esi + 0x7e8]
jae 0x47b6a0
mov word [esi + 0x7e8], ax
mov ecx, esi
call fcn.0040b7c0
mov ax, word [esi + 0x7e8]
mov dword [esi + 0x18], 1
test ax, ax
jbe 0x47b6cd
mov ecx, dword [esi + 0x794]
dec eax
and eax, 0xffff
mov edx, dword [ecx + eax*4]
mov dword [esp + 0x18], edx
mov ebp, dword [esp + 0x1c]
jmp 0x47b6ea
mov eax, dword [0x798490]
add eax, 0x418
push eax
call fcn.004916b0
add esp, 4
mov dword [esp + 0x18], eax
test ebp, ebp
je 0x47b7d1
mov ecx, dword [ebp + 8]
push ecx
call fcn.004916b0
mov ecx, dword [esp + 0x1c]
add esp, 4
cmp eax, ecx
jne 0x47b7c6
mov al, byte [esp + 0x13]
test al, al
je 0x47b754
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 + 0x24]
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 0x47b7a3
test ecx, ecx
jne 0x47b768
mov ecx, dword [ebp + 8]
push ecx
call fcn.00491660
add esp, 4
test al, al
jne 0x47b7c6
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 + 0x24]
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
add esp, 4
mov ecx, ebx
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.00486d20
mov ebp, dword [ebp]
test ebp, ebp
jne 0x47b6f2
mov si, word [ebx + 0x78a]
cmp si, word [ebx + 0x7e8]
jae 0x47b7e8
mov word [ebx + 0x7e8], si
test si, si
jbe 0x47b869
mov ebp, dword [ebx + 0x7b8]
mov eax, dword [ebx + 0x7b0]
xor edi, edi
mov ecx, ebp
mov di, word [ebx + 0x788]
sub ecx, eax
mov eax, edi
and esi, 0xffff
imul eax, ecx
cdq
idiv esi
mov dword [esp + 0x1c], esi
mov esi, eax
cmp esi, ecx
jbe 0x47b822
mov esi, ecx
jmp 0x47b82c
cmp esi, 5
jae 0x47b82c
mov esi, 5
xor eax, eax
xor edx, edx
mov ax, word [ebx + 0x79e]
sub eax, edi
inc eax
imul eax, ecx
div dword [esp + 0x1c]
lea ecx, [eax + esi]
cmp ecx, ebp
jbe 0x47b84c
sub ebp, esi
mov eax, ebp
mov ecx, dword [ebx + 0x7b0]
mov dword [ebx + 0x18], 1
add eax, ecx
add esi, eax
mov dword [ebx + 0x7c8], eax
mov dword [ebx + 0x7d0], esi
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x18], 1
test ax, ax
jge 0x47b87d
xor eax, eax
jmp 0x47b8a8
mov cx, word [ebx + 0x788]
mov dx, word [ebx + 0x78a]
mov esi, edx
mov edi, ecx
and esi, 0xffff
and edi, 0xffff
sub esi, edi
movsx edi, ax
cmp edi, esi
jle 0x47b8a8
mov eax, edx
sub eax, ecx
test ax, ax
jge 0x47b8af
xor eax, eax
movsx edx, ax
xor ecx, ecx
mov cx, word [ebx + 0x79c]
cmp ecx, edx
je 0x47bad0
mov di, word [ebx + 0x788]
mov bp, word [ebx + 0x78a]
cmp bp, di
mov word [ebx + 0x79c], ax
mov dword [ebx + 0x18], 1
jbe 0x47b8f1
lea edx, [eax + edi - 1]
mov word [ebx + 0x79e], dx
jmp 0x47b8fb
lea eax, [ebp - 1]
mov word [ebx + 0x79e], ax
test bp, bp
jbe 0x47bad0
mov ecx, dword [ebx + 0x7b8]
mov eax, dword [ebx + 0x7b0]
mov dword [esp + 0x14], ecx
and edi, 0xffff
sub ecx, eax
mov eax, edi
imul eax, ecx
cdq
and ebp, 0xffff
idiv ebp
mov esi, eax
cmp esi, ecx
jbe 0x47b934
mov esi, ecx
jmp 0x47b93e
cmp esi, 5
jae 0x47b93e
mov esi, 5
xor eax, eax
xor edx, edx
mov ax, word [ebx + 0x79e]
sub eax, edi
inc eax
imul eax, ecx
div ebp
mov ecx, dword [esp + 0x14]
lea edx, [eax + esi]
cmp edx, ecx
jbe 0x47b960
sub ecx, esi
mov eax, ecx
mov ecx, dword [ebx + 0x7b0]
mov dword [ebx + 0x18], 1
add eax, ecx
add esi, eax
mov dword [ebx + 0x7c8], eax
mov dword [ebx + 0x7d0], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdc
ret 8
call fcn.004a04c0
mov ecx, dword [0x798490]
push 0
call fcn.004a07a0
mov ebx, eax
xor ebp, ebp
test ebx, ebx
je 0x47ba1f
mov ecx, dword [esp + 0xf0]
mov ebp, ecx
call fcn.00487990
test ebx, ebx
je 0x47ba1f
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 + 0x24]
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 + 0x2c]
push eax
call fcn.00486d20
mov ebx, dword [ebx]
test ebx, ebx
jne 0x47b9b6
test ebp, ebp
je 0x47bad0
mov cx, word [ebp + 0x78a]
cmp cx, word [ebp + 0x7e8]
jae 0x47ba41
mov dx, cx
mov word [ebp + 0x7e8], dx
mov si, word [ebp + 0x78a]
test si, si
jbe 0x47bac9
mov ebx, dword [ebp + 0x7b8]
mov edi, dword [ebp + 0x7b0]
mov ecx, ebx
and esi, 0xffff
sub ecx, edi
xor edi, edi
mov di, word [ebp + 0x788]
mov dword [esp + 0x14], esi
mov eax, edi
imul eax, ecx
cdq
idiv esi
mov esi, eax
cmp esi, ecx
jbe 0x47ba82
mov esi, ecx
jmp 0x47ba8c
cmp esi, 5
jae 0x47ba8c
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 0x47baac
sub ebx, esi
mov eax, ebx
mov edx, dword [ebp + 0x7b0]
add eax, edx
add esi, eax
mov dword [ebp + 0x7c8], eax
mov dword [ebp + 0x7d0], esi
mov dword [ebp + 0x18], 1
mov dword [ebp + 0x18], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdc
ret 8