Function at 0x438610
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
add edx, esi
sub edx, ebx
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
cmp edx, esi
jbe 0x438977
mov ecx, dword [esp + 0x44]
xor eax, eax
xor ebp, ebp
mov dword [esp], 0
mov dword [esp + 0x14], edx
jmp 0x438689
mov edi, dword [esp + 8]
mov esi, dword [esp + 0x18]
mov dword [edi + ebp], esi
add edx, 4
mov eax, dword [esp + 0x30]
mov dword [eax + 4], edx
add esi, ebx
dec esi
mov eax, edx
mov edx, dword [esp + 0x14]
inc esi
mov ebp, edi
cmp esi, edx
jae 0x438977
mov dword [esp + 4], eax
test ecx, ecx
je 0x438696
cmp byte [ecx], 0x3f
je 0x4386a5
movzx eax, byte [esi]
mov edi, dword [esp + 0x3c]
cmp al, byte [edi]
jne 0x438824
cmp ebx, 2
jb 0x4386f0
mov eax, 1
jmp 0x4386da
movzx ecx, byte [esi + eax]
mov edi, dword [esp + 0x3c]
cmp cl, byte [edi + eax]
mov ecx, dword [esp + 0x44]
jne 0x438812
inc eax
cmp ebx, eax
je 0x4386f0
test ecx, ecx
je 0x4386c0
cmp byte [ecx + eax], 0x3f
jne 0x4386c0
jmp 0x4386d5
mov dword [esp + 0x18], esi
mov edi, dword [esp + 4]
mov esi, edi
sub esi, ebp
mov dword [esp + 8], ebp
mov edx, edi
cmp edi, dword [esp]
jne 0x438934
mov dword [esp], ebp
mov ecx, esi
sar ecx, 2
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
add edx, ecx
cmp edx, eax
mov edi, esi
ja 0x438724
mov edx, eax
mov esi, edx
lea eax, [edx*4]
push eax
call fcn.00408000
add esp, 4
mov ebp, dword [esp]
test ebp, ebp
mov dword [esp + 8], eax
je 0x438915
cmp eax, ebp
mov ecx, dword [esp + 4]
mov dword [esp + 0xc], edi
jbe 0x43882f
cmp ecx, eax
jbe 0x43882f
test edi, edi
je 0x4388fd
mov eax, dword [esp + 8]
mov edx, dword [esp + 0xc]
add eax, edx
dec eax
mov ecx, dword [esp]
add ecx, edx
dec ecx
mov edi, edx
and edi, 7
je 0x4387a4
neg edi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [ecx + edx]
mov byte [eax + edx], bl
dec edx
cmp edi, edx
jne 0x438790
add ecx, edx
add eax, edx
add edx, dword [esp + 0xc]
mov edi, dword [esp]
sub edi, dword [esp + 4]
cmp edi, 0xfffffff8
ja 0x4388fd
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [ecx + edi]
mov byte [eax + edi], bl
movzx ebx, byte [ecx + edi - 1]
mov byte [eax + edi - 1], bl
movzx ebx, byte [ecx + edi - 2]
mov byte [eax + edi - 2], bl
movzx ebx, byte [ecx + edi - 3]
mov byte [eax + edi - 3], bl
movzx ebx, byte [ecx + edi - 4]
mov byte [eax + edi - 4], bl
movzx ebx, byte [ecx + edi - 5]
mov byte [eax + edi - 5], bl
movzx ebx, byte [ecx + edi - 6]
mov byte [eax + edi - 6], bl
movzx ebx, byte [ecx + edi - 7]
mov byte [eax + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x4387c0
jmp 0x4388fd
mov ecx, eax
not ecx
and ecx, 1
and eax, 0xfffffffe
sub eax, ecx
mov ecx, dword [esp + 0x44]
add esi, eax
mov edi, ebp
mov eax, dword [esp + 4]
jmp 0x43867e
mov ecx, edi
shr ecx, 2
mov edx, ebp
mov ebx, edi
mov edi, eax
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
mov edx, ebx
and edx, 0xfffffffc
add eax, edx
add edx, ebp
mov ecx, ebx
and ecx, 3
mov ebx, ecx
not ebx
or ebx, 1
add ebx, ecx
shr ecx, 1
mov ebp, edx
mov edi, eax
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
mov ebp, ebx
inc ebp
je 0x4388fd
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0xc]
and ecx, 2
add edx, ecx
add eax, ecx
mov ebx, ebp
and ebx, 7
je 0x4388a2
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [edx + edi]
mov byte [eax + edi], cl
inc edi
cmp ebx, edi
jne 0x438890
add edx, edi
add eax, edi
sub ebp, edi
cmp dword [esp + 0x10], 7
jb 0x4388fd
xor edi, edi
nop
nop
nop
nop
nop
movzx ecx, byte [edx + edi]
mov byte [eax + edi], cl
movzx ecx, byte [edx + edi + 1]
mov byte [eax + edi + 1], cl
movzx ecx, byte [edx + edi + 2]
mov byte [eax + edi + 2], cl
movzx ecx, byte [edx + edi + 3]
mov byte [eax + edi + 3], cl
movzx ecx, byte [edx + edi + 4]
mov byte [eax + edi + 4], cl
movzx ecx, byte [edx + edi + 5]
mov byte [eax + edi + 5], cl
movzx ecx, byte [edx + edi + 6]
mov byte [eax + edi + 6], cl
movzx ecx, byte [edx + edi + 7]
mov byte [eax + edi + 7], cl
add edi, 8
cmp ebp, edi
jne 0x4388b0
mov ebp, dword [esp]
push ebp
call fcn.00408010
add esp, 4
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 8]
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x30]
mov dword [ecx], eax
lea edx, [eax + edi]
mov dword [ecx + 4], edx
lea eax, [eax + esi*4]
mov dword [esp], eax
mov dword [ecx + 8], eax
mov ecx, dword [esp + 0x44]
mov esi, edi
mov edi, dword [esp + 4]
mov eax, ebp
xor eax, edi
not ebp
and ebp, edi
add ebp, ebp
sub ebp, eax
cmp ebp, esi
jae 0x438660
mov eax, dword [esp + 8]
lea ebx, [eax + ebp]
lea esi, [eax + ebp]
add esi, 4
mov eax, ebx
mov edi, esi
xor ecx, ecx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov edi, esi
xor ecx, ecx
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ecx, dword [esp + 0x44]
mov ebx, dword [esp + 0x40]
jmp 0x438660
mov eax, dword [esp + 0x30]
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret