Function at 0x639aa0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x639cf1
sub esp, 0x1c
mov eax, dword [esp + 0x20]
test eax, eax
je 0x639c7c
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x639c80
movzx edx, byte [eax]
cmp byte [ecx], dl
jne 0x639c73
cmp dl, 0xd
ja 0x639bb4
lea ebx, [edx - 3]
cmp bl, 1
ja 0x639b0b
mov edx, dword [eax + 0x18]
mov eax, dword [eax + 0x14]
mov ebx, dword [ecx + 0x14]
cmp dword [ecx + 0x18], edx
jne 0x639b02
xor ecx, ecx
jmp 0x639cda
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
cmp dl, 0xa
jne 0x639b35
movzx eax, word [eax + 2]
and eax, 0x100
movzx ecx, word [ecx + 2]
and ecx, 0x100
cmp cx, ax
je 0x639c8d
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
cmp dl, 0xd
jne 0x639c8d
mov edx, dword [eax + 0x30]
cmp dword [ecx + 0x30], edx
je 0x639b4d
mov edx, 1
jmp 0x639b84
mov edx, dword [eax + 0x38]
mov ebx, dword [eax + 0x34]
mov ebp, dword [ecx + 0x34]
cmp dword [ecx + 0x38], edx
je 0x639b62
mov edx, 1
jmp 0x639b84
mov dword [esp], ebx
mov dword [esp + 4], ebp
mov dword [esp + 8], edx
call fcn.00402870
movzx eax, byte [esp + 0xc]
xor eax, 1
mov ecx, dword [esp + 0x24]
mov edx, eax
mov eax, dword [esp + 0x20]
test dl, dl
jne 0x639bab
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00639aa0
movzx eax, byte [esp + 8]
test al, al
jne 0x639c8d
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
cmp dl, 0x10
jbe 0x639c38
cmp dl, 0x11
je 0x639bed
add edx, 0xffffffee
cmp dl, 1
ja 0x639c8d
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
cmp dword [ecx + 8], edx
jne 0x639be4
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
xor ebx, ebx
jmp 0x639ca9
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
movzx edx, word [eax + 2]
and edx, 0x20
movzx ebx, word [ecx + 2]
and ebx, 0x20
cmp bx, dx
jne 0x639c2f
mov edx, dword [eax + 0x28]
cmp dword [ecx + 0x28], edx
jne 0x639c2f
mov edx, dword [eax + 0x2c]
cmp dword [ecx + 0x2c], edx
jne 0x639c2f
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00639aa0
movzx eax, byte [esp + 8]
test al, al
jne 0x639c8d
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
movzx edx, word [eax + 2]
and edx, 0x20
movzx ebx, word [ecx + 2]
and ebx, 0x20
cmp bx, dx
jne 0x639c6a
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00639aa0
movzx eax, byte [esp + 8]
test al, al
jne 0x639c8d
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
mov ecx, dword [esp + 0x24]
cmp ecx, eax
sete al
mov byte [esp + 0x28], al
add esp, 0x1c
ret
mov byte [esp + 0x28], 1
add esp, 0x1c
ret
mov ebp, dword [esp + 0x10]
lea ebx, [ebp + 1]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
cmp ebx, edx
jge 0x639c8d
mov dword [esp + 0x10], ebx
mov edx, dword [eax + ebx*4]
mov ebp, dword [ecx + 4]
mov ebp, dword [ebp + ebx*4]
mov dword [esp], edx
mov dword [esp + 4], ebp
call fcn.00639aa0
movzx eax, byte [esp + 8]
test al, al
jne 0x639c96
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
inc ecx
cmp ecx, edx
jge 0x639c8d
mov ebp, dword [eax + ecx*4]
lea esi, [ebx + ecx*4]
cmp dword [esi], ebp
je 0x639cd9
mov byte [esp + 0x28], 0
add esp, 0x1c
ret
call fcn.0045e260
jmp fcn.00639aa0