Function at 0x408f80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
cmp dword [ebp + 8], 0
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x10], ecx
js 0x4094fd
mov eax, dword [ebp - 0x2c]
xor ebx, ebx
mov ecx, 7
mov edx, 4
movzx eax, word [eax + 2]
test ax, ax
mov dword [ebp - 0x28], eax
mov eax, 0x8a
sete bl
cmove ecx, eax
sub edx, ebx
xor edi, edi
xor esi, esi
xor ebx, ebx
dec edi
mov dword [ebp - 0x14], edx
jmp 0x409080
mov ecx, edi
movzx edi, word [esi + edi*4 + 0xa7e]
movzx esi, word [esi + ecx*4 + 0xa7c]
mov ecx, eax
mov dword [ebp - 0x18], esi
shl esi, cl
mov ecx, 0x10
or edx, esi
mov esi, dword [ebp - 0x10]
sub ecx, edi
cmp eax, ecx
mov word [esi + 0x16b8], dx
jg 0x409012
add eax, edi
mov edi, dword [ebp - 0x1c]
dec ebx
mov dword [esi + 0x16bc], eax
je 0x409159
jmp 0x408fce
mov eax, dword [esi + 8]
mov ecx, edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
lea esi, [edx + 1]
mov dword [eax + 0x14], esi
mov eax, dword [ebp - 0x14]
mov byte [eax + edx], cl
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov al, byte [eax + 0x16b9]
mov edx, dword [edx + 0x14]
mov ecx, dword [ecx + 8]
mov byte [ebp - 0x14], al
mov eax, dword [ebp - 0x10]
lea esi, [edx + 1]
mov dword [eax + 0x14], esi
mov al, byte [ebp - 0x14]
mov esi, dword [ebp - 0x10]
mov byte [ecx + edx], al
mov edx, dword [ebp - 0x18]
mov cl, 0x10
mov eax, dword [esi + 0x16bc]
sub cl, al
lea eax, [edi + eax - 0x10]
shr edx, cl
mov word [esi + 0x16b8], dx
jmp 0x409000
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x24], esi
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x18], ebx
inc ebx
cmp ebx, ecx
movzx esi, word [eax + esi*4 + 6]
mov dword [ebp - 0x28], esi
jge 0x4090ad
cmp edx, esi
jne 0x4090ad
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp + 8]
lea esi, [edx + 1]
jne 0x409080
jmp 0x4094fd
cmp ebx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], edx
jge 0x4090cd
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x1c]
mov eax, dword [esi + 0x16bc]
movzx edx, word [esi + 0x16b8]
jmp 0x408fce
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x40918d
cmp dword [ebp - 0x18], 9
jg 0x409257
mov edi, dword [ebp - 0x10]
mov ebx, 0x10
movzx esi, word [edi + 0xac0]
mov ecx, dword [edi + 0x16bc]
movzx edx, word [edi + 0xac2]
mov eax, esi
sub ebx, edx
shl eax, cl
or ax, word [edi + 0x16b8]
cmp ecx, ebx
mov word [edi + 0x16b8], ax
jg 0x40931b
add ecx, edx
mov ebx, ecx
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
add ecx, 0xfffe
movzx edx, cx
mov ecx, ebx
mov esi, edx
shl esi, cl
or eax, esi
mov esi, dword [ebp - 0x10]
cmp ebx, 0xe
mov dword [esi + 0x16bc], ebx
mov word [esi + 0x16b8], ax
jge 0x40944d
mov edx, ebx
add edx, 3
mov dword [esi + 0x16bc], edx
mov eax, dword [ebp - 0x28]
xor ebx, ebx
test ax, ax
je 0x40917c
xor ecx, ecx
cmp edi, eax
mov eax, 4
sete cl
sub eax, ecx
xor ecx, 7
mov dword [ebp - 0x14], eax
jmp 0x40909d
mov ecx, 0x8a
mov dword [ebp - 0x14], 3
jmp 0x40909d
cmp eax, edi
je 0x409505
mov ebx, dword [ebp - 0x10]
mov edi, 0x10
movzx ecx, word [ebx + eax*4 + 0xa7e]
movzx esi, word [ebx + eax*4 + 0xa7c]
mov edx, dword [ebx + 0x16bc]
mov dword [ebp - 0x20], ecx
sub edi, ecx
mov eax, esi
mov ecx, edx
shl eax, cl
or ax, word [ebx + 0x16b8]
cmp edx, edi
mov word [ebx + 0x16b8], ax
jg 0x409402
add edx, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x18]
mov dword [eax + 0x16bc], edx
movzx ecx, word [eax + 0xabe]
movzx esi, word [eax + 0xabc]
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x18], ecx
mov ecx, edx
mov dword [ebp - 0x20], esi
shl esi, cl
mov ecx, 0x10
or ebx, esi
mov esi, dword [ebp - 0x18]
mov word [eax + 0x16b8], bx
sub ecx, esi
cmp edx, ecx
jg 0x40936c
add edx, esi
mov esi, edx
add edi, 0xfffd
mov ecx, esi
mov dword [eax + 0x16bc], esi
movzx edx, di
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
shl edx, cl
or ebx, edx
mov edx, esi
cmp esi, 0xf
mov esi, eax
mov word [eax + 0x16b8], bx
jge 0x4094a6
add edx, 2
jmp 0x409153
mov edi, dword [ebp - 0x10]
mov ebx, 0x10
movzx esi, word [edi + 0xac4]
mov ecx, dword [edi + 0x16bc]
movzx edx, word [edi + 0xac6]
mov eax, esi
sub ebx, edx
shl eax, cl
or ax, word [edi + 0x16b8]
cmp ecx, ebx
mov word [edi + 0x16b8], ax
jg 0x4093b4
add ecx, edx
mov ebx, ecx
mov ecx, dword [ebp - 0x18]
mov dword [edi + 0x16bc], ebx
add ecx, 0xfff6
movzx edx, cx
mov ecx, ebx
mov esi, edx
shl esi, cl
or eax, esi
cmp ebx, 0xa
mov esi, edi
mov word [edi + 0x16b8], ax
jge 0x4092c8
mov edx, ebx
add edx, 7
mov edi, dword [ebp - 0x1c]
jmp 0x409153
mov ecx, dword [esi + 8]
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
mov esi, dword [esi + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
lea edi, [esi + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov esi, dword [ebp - 0x10]
mov cl, 0x10
mov eax, dword [esi + 0x16bc]
sub cl, al
shr edx, cl
mov word [esi + 0x16b8], dx
mov edx, eax
add edx, 0xfffffff7
jmp 0x4092c0
mov edi, dword [ebp - 0x10]
mov ecx, dword [edi + 8]
mov ebx, dword [edi + 0x14]
mov dword [ebp - 0x14], ecx
lea ecx, [ebx + 1]
mov dword [edi + 0x14], ecx
mov ecx, dword [ebp - 0x14]
mov byte [ecx + ebx], al
mov al, byte [edi + 0x16b9]
mov ebx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov byte [ebp - 0x14], al
lea eax, [ebx + 1]
mov dword [edi + 0x14], eax
mov al, byte [ebp - 0x14]
mov byte [ecx + ebx], al
mov cl, 0x10
mov eax, dword [edi + 0x16bc]
sub cl, al
lea ebx, [edx + eax - 0x10]
shr esi, cl
mov word [edi + 0x16b8], si
mov eax, esi
jmp 0x40911e
mov esi, dword [eax + 0x14]
mov ecx, dword [eax + 8]
mov edx, ebx
lea ebx, [esi + 1]
mov dword [eax + 0x14], ebx
mov byte [ecx + esi], dl
mov ebx, dword [eax + 0x14]
mov dl, byte [eax + 0x16b9]
mov esi, dword [eax + 8]
lea ecx, [ebx + 1]
mov dword [eax + 0x14], ecx
mov byte [esi + ebx], dl
mov edx, dword [ebp - 0x18]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
lea esi, [edx + ebx - 0x10]
mov ebx, dword [ebp - 0x20]
shr ebx, cl
mov word [eax + 0x16b8], bx
jmp 0x409220
mov ecx, dword [edi + 8]
mov ebx, dword [edi + 0x14]
mov dword [ebp - 0x14], ecx
lea ecx, [ebx + 1]
mov dword [edi + 0x14], ecx
mov ecx, dword [ebp - 0x14]
mov byte [ecx + ebx], al
mov al, byte [edi + 0x16b9]
mov ebx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov byte [ebp - 0x14], al
lea eax, [ebx + 1]
mov dword [edi + 0x14], eax
mov al, byte [ebp - 0x14]
mov byte [ecx + ebx], al
mov cl, 0x10
mov eax, dword [edi + 0x16bc]
sub cl, al
lea ebx, [edx + eax - 0x10]
shr esi, cl
mov word [edi + 0x16b8], si
mov eax, esi
jmp 0x409293
mov edx, eax
mov eax, dword [ebp - 0x10]
mov edi, dword [eax + 0x14]
mov ecx, dword [eax + 8]
lea ebx, [edi + 1]
mov dword [eax + 0x14], ebx
mov byte [ecx + edi], dl
mov ebx, dword [eax + 0x14]
mov dl, byte [eax + 0x16b9]
mov edi, dword [eax + 8]
lea ecx, [ebx + 1]
mov dword [eax + 0x14], ecx
mov byte [edi + ebx], dl
mov edx, dword [ebp - 0x20]
mov cl, 0x10
mov ebx, dword [eax + 0x16bc]
sub cl, bl
lea edx, [edx + ebx - 0x10]
shr esi, cl
mov word [eax + 0x16b8], si
mov dword [ebp - 0x14], esi
jmp 0x4091da
mov ecx, dword [esi + 8]
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
mov esi, dword [esi + 0x14]
mov al, byte [eax + 0x16b9]
mov ecx, dword [ecx + 8]
lea edi, [esi + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov esi, dword [ebp - 0x10]
mov cl, 0x10
mov edi, dword [ebp - 0x1c]
mov eax, dword [esi + 0x16bc]
sub cl, al
shr edx, cl
mov word [esi + 0x16b8], dx
mov edx, eax
add edx, 0xfffffff3
jmp 0x409153
mov edx, dword [esi + 0x14]
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 8]
lea esi, [edx + 1]
mov dword [eax + 0x14], esi
mov eax, dword [ebp - 0x10]
mov byte [ecx + edx], bl
mov cl, byte [eax + 0x16b9]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x10]
mov esi, dword [eax + 0x14]
mov eax, dword [ebp - 0x10]
lea edi, [esi + 1]
mov dword [eax + 0x14], edi
mov byte [edx + esi], cl
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov cl, 0x10
mov edx, dword [esi + 0x16bc]
sub cl, dl
add edx, 0xfffffff2
shr eax, cl
mov word [esi + 0x16b8], ax
jmp 0x409153
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x10]
mov edi, ebx
movzx ecx, word [eax + 0x16b8]
mov edx, dword [eax + 0x16bc]
mov dword [ebp - 0x14], ecx
jmp 0x4091e6