Function at 0x4068e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
push edi
mov dword [ebp - 4], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
mov edx, dword [ebp - 4]
movzx eax, byte [edx + 0x20471]
test eax, eax
je 0x406ab1
mov ecx, dword [ebp - 0x38]
movzx edx, word [ecx + 2]
and edx, 0x7fff
shl edx, 2
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x2008e]
and ecx, 0x7fff
shl ecx, 2
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x24]
jle 0x406952
mov ecx, dword [ebp - 0x18]
add ecx, 0x16800
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x18]
shl eax, 8
cdq
mov ecx, 0x28
idiv ecx
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x1c]
shl edx, 8
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], 0
jmp 0x40697e
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x28
jae 0x406aaf
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
movzx eax, word [edx + ecx*2 + 0x20090]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
shl ecx, 2
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x14]
sar edx, 0xa
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x20]
cdq
mov ecx, 0x1680000
idiv ecx
mov eax, dword [ebp - 0x20]
shl eax, 1
cmp edx, eax
jge 0x4069cb
mov dword [ebp - 0x28], 1
jmp 0x4069d2
mov dword [ebp - 0x28], 0
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
xor edx, dword [0x4783d8]
and edx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edx
je 0x4069f0
mov eax, dword [ebp - 4]
mov byte [eax + 0x28], 1
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x20]
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 8], 0
jge 0x406a0b
mov edx, dword [ebp - 8]
add edx, 0x5a00
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0x5a00
jl 0x406a1f
mov eax, dword [ebp - 8]
sub eax, 0x5a00
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
shl eax, 8
cdq
mov ecx, 0x5a
idiv ecx
mov word [ebp - 0x44], ax
cmp dword [ebp - 0xc], 0
jne 0x406a40
mov dword [ebp - 0x2c], 1
jmp 0x406a47
mov dword [ebp - 0x2c], 0
mov edx, dword [ebp - 0x2c]
shl edx, 1
or edx, dword [ebp - 0xc]
mov byte [ebp - 0x3d], dl
cmp dword [ebp - 0x34], 0
je 0x406a61
mov dword [ebp - 0x30], 0xbc
jmp 0x406a68
mov dword [ebp - 0x30], 0
mov al, byte [ebp - 0x30]
mov byte [ebp - 0x3e], al
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x42], ecx
mov edx, dword [ebp - 4]
movzx eax, byte [edx + 0x28]
test eax, eax
je 0x406aa1
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x40]
mov dword [eax + edx*8], ecx
mov dword [eax + edx*8 + 4], esi
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov edx, dword [ebp - 0xc]
mov dword [0x4783d8], edx
jmp 0x406975
jmp 0x406ab8
mov eax, dword [ebp - 4]
mov byte [eax + 0x28], 0
mov edi, dword [ebp - 4]
add edi, 0x2008c
mov ecx, 0x15
mov esi, dword [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x20471], 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc