Function at 0x409710
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x78
mov eax, dword [ebp + 8]
add eax, dword [ecx + 0x60]
mov word [esp + 0x18], 0x1b21
mov byte [esp + 0x1a], 0x10
mov dword [esp + 0x1b], 0
mov dword [esp + 0x1f], 0
mov dword [esp + 0x22], 0
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
cmp edx, 0xd
ja 0x4097a4
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + 8]
mov esi, dword [esp + 8]
movzx esi, byte [esp + esi + 0x18]
lea edi, [edx + 0x83]
and edi, esi
mov ebx, 0xfffec87c
sub ebx, edx
or ebx, esi
not ebx
add ebx, esi
sub ebx, edi
mov dword [esp + 0x28], ebx
mov edx, dword [esp + 0x28]
add dl, 0x6b
mov esi, dword [esp + 8]
mov byte [esp + esi + 0x18], dl
inc dword [esp + 8]
mov edx, dword [esp + 8]
cmp edx, 0xe
jb 0x409760
mov dword [esp + 8], 0x545a5664
mov word [esp + 0xc], 0x5d58
mov dword [esp + 0xe], 0
mov dword [esp + 0x11], 0
mov dword [esp], 0
mov edx, dword [esp]
cmp edx, 0xc
ja 0x40981c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp]
mov esi, dword [esp]
movzx esi, byte [esp + esi + 8]
lea edi, [edx + 0xcb]
and edi, esi
add edx, esi
add edi, edi
sub edx, edi
add edx, 0x894e80cb
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x28]
add dl, 0x73
mov esi, dword [esp]
mov byte [esp + esi + 8], dl
inc dword [esp]
mov edx, dword [esp]
cmp edx, 0xd
jb 0x4097e0
mov dword [esp + 0x28], 0xc8ca3635
mov dword [esp + 0x2c], 0xc4cc3a3a
mov dword [esp + 0x30], 0xc7fcfa35
mov dword [esp + 0x34], 0xfcffc4fb
mov dword [esp + 0x38], 0xcffcbc8
mov dword [esp + 0x3c], 0xce1d2721
mov dword [esp + 0x40], 0xc9f7c1cc
mov dword [esp + 0x44], 0xd0140ac6
mov dword [esp + 0x48], 0xded5d5db
mov dword [esp + 0x4c], 0xded7ddd5
mov dword [esp + 0x50], 0xe12c0bdc
mov dword [esp + 0x54], 0xe4dbd7db
mov dword [esp + 0x58], 0x1c281a1a
mov dword [esp + 0x5c], 0x1022d1f7
mov dword [esp + 0x60], 0xd5ff162d
mov byte [esp + 0x64], 0xba
mov dword [esp + 0x65], 0
mov dword [esp + 4], 0
mov edx, dword [esp + 4]
cmp edx, 0x40
ja 0x409905
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, dword [esp + 4]
mov esi, dword [esp + 4]
movzx esi, byte [esp + esi + 0x28]
lea edi, [edx - 0x7d9d2eaf]
mov ebx, esi
not ebx
or ebx, edi
and edi, esi
add edi, ebx
neg edi
add edx, edi
add edx, 0x8262d150
mov dword [esp], edx
mov edx, dword [esp]
add dl, 0xc9
mov esi, dword [esp + 4]
mov byte [esp + esi + 0x28], dl
inc dword [esp + 4]
mov edx, dword [esp + 4]
cmp edx, 0x41
jb 0x4098c0
mov esi, dword [ebp + 0xc]
movzx ebx, byte [esp + 0x28]
mov edx, eax
test bl, bl
je 0x40992b
lea edi, [esp + 0x29]
mov edx, eax
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x409920
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40994b
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x409940
mov esi, dword [ebp + 0x10]
mov byte [edx], 0
movzx ebx, byte [esp + 8]
test bl, bl
je 0x40996b
lea edi, [esp + 9]
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [edi]
inc edi
test bl, bl
jne 0x409960
mov byte [edx], 0
movzx ebx, byte [esi]
test bl, bl
je 0x40998b
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x409980
mov byte [edx], 0
movzx ebx, byte [esp + 0x18]
test bl, bl
je 0x4099ab
lea esi, [esp + 0x19]
nop
nop
nop
nop
nop
mov byte [edx], bl
inc edx
movzx ebx, byte [esi]
inc esi
test bl, bl
jne 0x4099a0
mov byte [edx], 0
mov esi, edx
xor esi, eax
not eax
and eax, edx
add eax, eax
sub eax, esi
add dword [ecx + 0x60], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0xc