Function at 0x4c0050
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x4ff074]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push dword [0xa92800]
lea eax, [ebp - 0x68]
push str.Num_display_modes__d
push 0x30
push eax
call fcn.0042cda0
add esp, 0x10
lea ecx, [ebp - 0x68]
call fcn.004bfb10
mov edi, dword [0xa9295c]
xor eax, eax
xor edx, edx
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
cmp dword [0xa92800], eax
jbe 0x4c01c8
xor ecx, ecx
mov dword [ebp - 0x74], ecx
mov esi, ecx
add esi, esi
mov eax, dword [edi + esi*8]
cmp eax, dword [0xa92948]
jne 0x4c00f9
mov eax, dword [edi + esi*8 + 4]
cmp eax, dword [0xa9294c]
jne 0x4c00f9
mov eax, dword [ebp - 0x6c]
movzx edx, word [0xa92804]
movzx ecx, ax
mov eax, dword [edi + esi*8 + 8]
cmp eax, dword [0xa92950]
cmove edx, ecx
mov ecx, dword [ebp - 0x74]
mov word [0xa92804], dx
mov edx, dword [ebp - 0x6c]
cmp byte [0x7ea975], 0
jne 0x4c013d
movzx eax, word [0x7ea976]
cmp dword [edi + esi*8], eax
jne 0x4c013d
movzx eax, word [0x7ea978]
cmp dword [edi + esi*8 + 4], eax
jne 0x4c013d
mov al, byte [0x7ea933]
cmp al, 1
jne 0x4c0133
movzx eax, byte [0x7ea934]
cmp dword [edi + esi*8 + 8], eax
je 0x4c0137
jmp 0x4c013d
test al, al
jne 0x4c013d
mov dword [0xa92958], ecx
test dx, dx
je 0x4c0158
mov eax, dword [edi + esi*8]
cmp eax, dword [edi + esi*8 - 0x10]
jne 0x4c0155
mov eax, dword [edi + esi*8 + 4]
cmp eax, dword [edi + esi*8 - 0xc]
je 0x4c0158
inc dword [ebp - 0x70]
mov eax, dword [0xa927fc]
mov edx, dword [ebp - 0x70]
mov word [eax + ecx*2], dx
cmp byte [0x7ea98b], 0
mov edx, dword [ebp - 0x6c]
je 0x4c01af
cmp byte [0xa88c27], 0
jne 0x4c01af
mov eax, dword [ebp - 0x70]
movzx eax, ax
push eax
push dword [edi + esi*8 + 8]
lea eax, [ebp - 0x68]
push dword [edi + esi*8 + 4]
push dword [edi + esi*8]
push str._d_x__d____dHz__ID__d
push 0x30
push eax
call fcn.0042cda0
add esp, 0x1c
lea ecx, [ebp - 0x68]
call fcn.004bfb10
mov edi, dword [0xa9295c]
mov edx, dword [ebp - 0x6c]
inc edx
movzx ecx, dx
mov dword [ebp - 0x6c], edx
mov dword [ebp - 0x74], ecx
cmp ecx, dword [0xa92800]
jb 0x4c00b7
mov eax, dword [ebp - 0x70]
inc eax
mov byte [0xa88c27], 1
cmp byte [0x7ea975], 0
mov word [0xa919cc], ax
jne 0x4c01e8
cmp dword [0xa92958], 0xffffffff
jne 0x4c01f4
movzx eax, word [0xa92804]
mov dword [0xa92958], eax
cmp byte [0x7ea933], 1
jne 0x4c020b
mov eax, dword [0xa92958]
add eax, eax
movzx eax, word [edi + eax*8 + 8]
jmp 0x4c0212
movzx eax, word [0xa92950]
movzx esi, ax
mov eax, dword [0xa92958]
add eax, eax
push esi
push dword [edi + eax*8 + 4]
push dword [edi + eax*8]
lea eax, [ebp - 0x68]
push str.Screen_size__d_x__d____d_Hz
push 0x30
push eax
call fcn.0042cda0
add esp, 0x18
lea ecx, [ebp - 0x68]
call fcn.004bfb10
xor ecx, ecx
movzx eax, cx
movzx eax, word [eax*2 + 0x4ea390]
add eax, 0xa
cmp esi, eax
jbe 0x4c0269
cmp cx, 0xa
je 0x4c0269
inc ecx
cmp cx, 0xb
jb 0x4c0241
mov dx, word [0xa90f74]
jmp 0x4c0281
movzx eax, cx
mov byte [0xa88e4a], cl
mov dx, word [eax*2 + 0x4ea390]
mov word [0xa90f74], dx
movss xmm0, dword [0x4fc830]
movzx eax, dx
mov ecx, dword [0xa90f74]
mov word [0xa90f7c], dx
shr dx, 1
movd xmm1, eax
mov eax, ecx
cvtdq2ps xmm1, xmm1
shl eax, 4
sub eax, ecx
mov word [0xa90f78], dx
shl eax, 2
shr dx, 1
mov word [0xa92808], ax
lea eax, [ecx + ecx]
divss xmm0, xmm1
mov ecx, dword [ebp - 4]
mov word [0xa91e3c], dx
xor ecx, ebp
shr dx, 1
pop edi
mov word [0xa91e1c], ax
mov word [0xa91e24], dx
mov byte [0xa88e4b], 0
mov byte [0xa88bda], 0xf0
pop esi
movss dword [0xa91980], xmm0
movss xmm0, dword [0x4fc870]
divss xmm0, xmm1
movss dword [0xa91e20], xmm0
call fcn.004d66b5
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret