Function at 0x468650
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, ecx
mov dword [ebp - 0x1c], edx
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [eax]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], eax
push edi
test esi, esi
je 0x4687ad
test dword [ebp + 0x18], 0x40000
jne 0x4687ad
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x1a], 0
jne 0x4687ad
mov edx, dword [esi]
xor ebx, ebx
mov dword [ebp - 0x14], edx
xor edi, edi
mov edx, dword [esi + 0xc]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], edx
cmp dword [ebp - 0x14], ebx
jle 0x468829
nop dword [eax]
cmp edi, dword [ecx + 4]
jg 0x468829
mov esi, dword [edx]
mov edx, dword [ebp + 0xc]
cmp byte [esi], 0x98
jne 0x46882c
cmp dword [esi + 0x18], edx
jne 0x46882c
mov ecx, dword [ebp - 0x20]
mov edx, esi
call fcn.00436250
mov ebx, eax
test ebx, ebx
jne 0x4686e6
mov eax, dword [ebp - 0x24]
mov ebx, dword [eax + 0x2c]
mov edx, dword [ebp + 8]
cmp dword [edx], 0
je 0x468731
cmp edi, dword [edx + 4]
jge 0x468731
mov eax, dword [edx + 8]
lea ecx, [edi*4]
mov eax, dword [ecx + eax]
mov dword [ebp - 4], eax
mov eax, dword [edx + 0x10]
mov ecx, dword [ebp - 4]
cmp ecx, dword [eax + 4]
mov eax, ecx
mov ecx, 0xffffffff
cmove eax, ecx
lea ecx, [edi*4]
mov dword [ebp - 4], eax
mov eax, dword [edx + 0x28]
mov edx, dword [edx + 0x2c]
add edx, ecx
movzx eax, byte [eax + edi]
mov dword [ebp - 0x18], eax
jmp 0x468741
mov dword [ebp - 4], 0xffffffff
mov edx, ebx
mov dword [ebp - 0x18], 0
movsx eax, word [esi + 0x1c]
mov edx, dword [edx]
cmp eax, dword [ebp - 4]
jne 0x4687ed
mov esi, dword [ebx]
mov bl, byte [esi]
test bl, bl
je 0x468781
mov al, bl
sub esi, edx
nop dword [eax]
movzx ecx, byte [edx]
mov bl, al
movzx eax, al
mov al, byte [eax + 0x479a68]
cmp al, byte [ecx + 0x479a68]
jne 0x468781
mov al, byte [esi + edx + 1]
inc edx
mov bl, al
test al, al
jne 0x468760
movzx eax, bl
movzx ecx, byte [eax + 0x479a68]
movzx eax, byte [edx]
movzx eax, byte [eax + 0x479a68]
sub ecx, eax
jne 0x4687ed
mov edx, dword [ebp - 8]
movzx eax, byte [edx + 0xc]
xor eax, dword [ebp - 0x18]
cmp edi, dword [ebp + 0x14]
jle 0x4687b6
cmp eax, dword [ebp - 0x10]
je 0x4687b9
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0xc]
add edx, 0x14
inc ebx
mov dword [ebp - 8], edx
cmp dword [ebp - 4], 0
mov dword [ebp - 0xc], ebx
jge 0x4687f8
push dword [ebp + 0xc]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0x10]
push ebx
call fcn.004684b0
mov edx, dword [ebp - 8]
add esp, 8
test eax, eax
jne 0x4687f8
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0xc], ebx
jmp 0x4687f8
cmp edi, dword [ebp + 0x14]
jge 0x46881e
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp + 8]
inc edi
cmp ebx, dword [ebp - 0x14]
jl 0x4686b0
mov ecx, dword [ebp + 0x1c]
xor eax, eax
cmp dword [ebp - 0x10], eax
setne al
mov dword [ecx], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
cmp edi, dword [ecx + 4]
jne 0x4687ad
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x1c]
xor eax, eax
cmp dword [ebp - 0x10], eax
setne al
mov dword [esi], eax
mov esi, dword [ebp + 0x10]
cmp ebx, dword [ebp - 0x14]
jge 0x468878
cmp byte [ecx + 0x18], 0
je 0x4687ad
cmp edi, dword [ecx + 4]
jne 0x4687ad
test dword [ebp + 0x18], 0x80000
jne 0x4687ad
push edx
mov edx, dword [ebp - 0x1c]
mov ecx, esi
push ebx
call fcn.004684b0
add esp, 8
test eax, eax
jne 0x4687ad
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret