Function at 0x40965a
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x2c
mov al, byte [esp + 0x30]
mov ecx, dword [esp + 0x40]
dec al
push ebx
mov ebx, dword [0x67a3b4]
movzx eax, al
dec ebx
mov dword [esp + 0xc], eax
mov dword [0x67a3b4], ebx
push ebp
movzx eax, byte [ecx + ebx*4]
imul eax, eax, 0xa2
push esi
mov esi, dword [0x67a380]
mov ebp, dword [esp + 0x44]
push edi
mov dword [esp + 0x24], eax
mov edi, ebx
mov eax, dword [0x67a3c4]
mov dword [esp + 0x2c], ebp
mov eax, dword [ecx + eax*4 + 0x64]
mov ecx, dword [0x67a384]
mov dword [esp + 0x30], eax
movzx eax, word [0x67a390]
cdq
idiv dword [esi + ecx*4 + 0x20]
mov edx, eax
lea eax, [ebp + 0x1cbc]
mov dword [esp + 0x1c], eax
mov eax, dword [0x67a3c8]
mov dword [esp + 0x48], edx
mov dword [esp + 0x38], eax
cmp edi, 0x12
je 0x409812
mov eax, dword [esp + 0x24]
mov ebx, ebp
mov esi, dword [esp + 0x44]
mov ecx, edi
movzx eax, al
add esi, 0x14
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
shl ebx, 4
add eax, 0x1c
shl ecx, 4
lea esi, [esi + edi*8]
add ebx, edx
mov dword [esp + 0x20], esi
add eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [0x67a3b4]
inc ebp
add ebx, 0x10
lea ecx, [edx + ebp*4]
xor edx, edx
div dword [ecx]
xor edx, edx
mov dword [ecx], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
sub eax, dword [ecx]
mov ecx, 0x600
sub eax, edi
div ecx
mov dword [ebx], eax
cmp dword [esi], 0xddd
ja 0x4097f8
movzx esi, byte [esp + 0x40]
xor edx, edx
mov eax, dword [esp + 0x44]
add ebx, 0x20
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x28], esi
mov eax, dword [eax + 0x2a68]
div dword [ecx + esi*4]
mov esi, dword [esp + 0x10]
xor edx, edx
mov ecx, dword [esp + 0x48]
or eax, 0x1cd0
div dword [ecx + esi*4 + 0x20]
mov ecx, dword [0x67a3c4]
mov eax, dword [esp + 0x50]
mov dword [eax + ecx*8 + 0x18], edx
mov ecx, esi
mov esi, dword [esp + 0x1c]
xor edx, edx
mov eax, dword [esp + 0x28]
div dword [esi + ecx*4]
xor edx, edx
dec byte [esp + 0x40]
mov byte [esp + 0x34], al
mov eax, dword [esp + 0x18]
mov esi, dword [0x67a3c4]
or esi, ebp
mov ecx, dword [eax + ebp*4 + 4]
add ebp, 2
mov eax, dword [esp + 0x50]
mov eax, dword [eax + 0x30d0]
add eax, 0x12
push eax
push dword [esp + 0x30]
mov eax, dword [esp + 0x38]
movzx eax, word [eax + edi*2]
push eax
mov eax, dword [esp + 0x50]
mov eax, dword [eax + edi*4]
div dword [0x67a384]
push eax
movzx eax, byte [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x30]
push esi
push dword [ecx + eax*8]
push dword [esp + 0x50]
call fcn.00409bce
mov esi, dword [esp + 0x40]
add esp, 0x20
add dword [esp + 0x14], 0x10
inc edi
mov edx, dword [esp + 0x48]
add esi, 8
mov dword [esp + 0x20], esi
cmp edi, 0x12
jne 0x409710
mov eax, dword [0x67a3c4]
mov ebp, 0x1e71
movzx esi, byte [esp + 0x40]
add eax, eax
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
mov eax, dword [edx + eax*8]
xor edx, edx
or eax, edi
mov dword [ecx + esi*4 + 0x14], eax
mov eax, dword [0x67a384]
mov ecx, dword [0x67a3b4]
mov eax, dword [ebx + eax*4]
div esi
xor edx, edx
div ebp
mov eax, dword [esp + 0x4c]
mov ebp, dword [esp + 0x44]
add dword [eax + ecx*8 + 0x3c], edx
mov ecx, dword [ebx + esi*4 + 0x14]
mov eax, dword [0x67a3c4]
mov edx, dword [0x67a384]
mov ebx, dword [esp + 0x48]
imul ecx, dword [ebp + eax*4]
lea eax, [edi - 0xf44]
add dword [ebp + edx*4], ecx
xor edx, edx
dec dword [0x67a3c4]
mov dword [ebx + esi*8], eax
mov al, byte [esp + 0x40]
dec al
mov ecx, dword [0x67a3b8]
movzx eax, al
lea edi, [eax*4]
mov eax, dword [esp + 0x24]
movzx esi, al
mov eax, esi
div dword [edi + ebp]
add dword [ecx + esi*8], edx
xor edx, edx
mov eax, dword [ebp + 0x446c]
imul eax, esi
movzx ecx, byte [0x67a392]
div dword [ebx + esi*4]
add dword [0x67a3b0], edx
xor dword [0x67a3cc], ecx
mov eax, dword [edi + ebp]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret