Function at 0x4070f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
push edi
mov edi, 1
mov eax, edi
shl ax, cl
mov dword [esi + 0xf6a8], ecx
mov dword [esi + 0xf69c], ecx
dec ecx
sub ax, di
mov word [esi + 0xf6a0], ax
mov eax, edi
shl eax, cl
xor ebx, ebx
mov dword [esi + 0xf6a4], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0xf6ac], eax
mov cx, word [esi + 0xf6ac]
inc eax
mov dword [esi + 0xf6b0], eax
mov eax, dword [esi + 0x18]
add cx, 2
mov dword [esi + 0x1c], ebx
mov word [esi + 0xf6a2], cx
mov dword [esi + 0xf6b4], ebx
cmp eax, ebx
jne 0x407166
mov dword [ebp + 8], 0xffffffff
jmp 0x407194
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 4]
dec eax
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
push edx
push eax
call fcn.00409800
add dword [esi + 0x10], edi
mov edx, dword [esi + 4]
movzx ecx, al
mov eax, dword [esi + 0x10]
cmp eax, dword [edx + 4]
jne 0x407191
add dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov dword [ebp + 8], ecx
xor ecx, ecx
mov ebx, 0x138b
jmp 0x4071a0
add ebx, ebx
add ecx, edi
cmp ebx, 0x10000
jl 0x4071a0
mov eax, 8
sub eax, ecx
push 0x138b
mov ecx, esi
mov dword [ebp - 8], eax
call fcn.00406e70
movzx eax, word [esi + 0xf6ac]
push eax
mov ecx, esi
call fcn.00406f00
cmp dword [ebp + 8], 0xffffffff
je 0x407329
mov edi, dword [ebp + 8]
mov edi, edi
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x40722f
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
push edx
mov ecx, esi
call fcn.00406f00
mov eax, dword [ebp - 4]
mov dword [ebp + 8], eax
movzx eax, word [esi + 0xf6a2]
mov ecx, 0x1000
cmp ax, cx
jge 0x4072e8
mov word [esi + edi*2 + 0xcf84], ax
inc word [esi + 0xf6a2]
mov dword [esi + edi*4 + 0x8158], ebx
jmp 0x40731f
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x10]
push ecx
mov ecx, dword [esi + 4]
dec eax
push edx
mov dword [esi + 0x18], eax
call fcn.00409800
inc dword [esi + 0x10]
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 4]
movzx eax, al
cmp ecx, dword [edx + 4]
jne 0x40725e
inc dword [esi + 0x14]
mov dword [esi + 0x10], 0
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x4071ee
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 8]
movsx edi, ax
shl edi, cl
mov ebx, eax
shl ebx, 0xc
add ebx, edx
xor edi, edx
mov ecx, dword [esi + edi*4 + 0x8158]
lea eax, [esi + edi*4 + 0x8158]
cmp ecx, ebx
jne 0x40729c
movzx eax, word [esi + edi*2 + 0xcf84]
mov dword [ebp + 8], eax
jmp 0x40731f
test ecx, ecx
js 0x4071ee
mov ecx, 0x138b
sub ecx, edi
test edi, edi
jne 0x4072b4
mov ecx, 1
lea edx, [ecx*4]
sub eax, edx
sub edi, ecx
jns 0x4072cc
add edi, 0x138b
add eax, 0x4e2c
mov edx, dword [eax]
cmp edx, ebx
je 0x4072db
test edx, edx
jg 0x4072b4
jmp 0x4071ee
movzx ecx, word [esi + edi*2 + 0xcf84]
mov dword [ebp + 8], ecx
jmp 0x40731f
push 0x138b
mov ecx, esi
call fcn.00406e70
movzx eax, word [esi + 0xf6ac]
mov dx, word [esi + 0xf6ac]
add dx, 2
push eax
mov ecx, esi
mov word [esi + 0xf6a2], dx
mov dword [esi + 0xf6a4], 1
call fcn.00406f00
cmp dword [ebp + 8], 0xffffffff
jne 0x4071e0
movzx ecx, word [esi + 0xf6b0]
push ecx
mov ecx, esi
call fcn.00406f00
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4