Function at 0x438e90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add eax, ebp
sub eax, dword [esp + 0x48]
mov dword [ebx + 8], 0
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [esp + 0x20], eax
cmp eax, ebp
jbe 0x439119
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
lea esi, [eax - 1]
xor edi, edi
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0x1c], esi
jmp 0x438f29
mov ebx, edi
mov esi, dword [esp + 4]
sub edi, esi
mov ecx, edi
sar ecx, 2
mov dword [esp + 0xc], ebx
cmp ebx, dword [esp + 8]
je 0x438f79
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0xc]
mov dword [esi + ecx*4], ebp
add edi, 4
mov dword [ebx + 4], edi
mov esi, dword [esp + 0x1c]
add ebp, esi
inc ebp
cmp ebp, dword [esp + 0x20]
jae 0x439119
test edx, edx
je 0x438f32
cmp byte [edx], 0x3f
je 0x438f3e
movzx ecx, byte [ebp]
mov eax, dword [esp + 0x44]
cmp cl, byte [eax]
jne 0x438f1e
cmp dword [esp + 0x48], 2
jb 0x438ef0
xor ecx, ecx
jmp 0x438f6c
movzx edx, byte [ebp + ecx + 1]
mov eax, dword [esp + 0x44]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x4c]
jne 0x43900f
inc ecx
cmp esi, ecx
je 0x438ef0
test edx, edx
je 0x438f50
cmp byte [edx + ecx + 1], 0x3f
jne 0x438f50
jmp 0x438f67
mov dword [esp], edi
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
mov dword [esp + 0x18], ecx
add edx, ecx
cmp edx, eax
ja 0x438f8f
mov edx, eax
mov dword [esp + 8], edx
lea eax, [edx*4]
push eax
call fcn.004090e0
add esp, 4
mov esi, eax
mov edx, dword [esp + 4]
test edx, edx
je 0x4390f1
cmp esi, edx
mov ebx, dword [esp]
mov dword [esp + 0x10], esi
jbe 0x439016
lea eax, [edx + ebx]
cmp eax, esi
jbe 0x439016
test ebx, ebx
je 0x4390e1
mov edx, dword [esp + 4]
lea eax, [edx + ebx]
dec eax
mov ecx, dword [esp + 0x10]
add ecx, ebx
dec ecx
mov esi, edx
not esi
add esi, dword [esp + 0xc]
and ebx, 7
je 0x439080
neg ebx
xor edi, edi
nop
movzx edx, byte [eax + edi]
mov byte [ecx + edi], dl
dec edi
cmp ebx, edi
jne 0x438ff0
mov ebx, dword [esp]
add ebx, edi
add eax, edi
add ecx, edi
cmp esi, 7
jae 0x439088
jmp 0x4390e1
add ebp, ecx
jmp 0x438f1e
mov ecx, ebx
shr ecx, 2
mov eax, edx
mov edi, esi
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov ecx, dword [esp]
xor ecx, 3
mov eax, dword [esp]
or eax, 0xfffffffc
and eax, ecx
add eax, esi
mov ebx, dword [esp]
mov ecx, edx
mov edx, ebx
and edx, 0xfffffffc
add edx, ecx
mov ecx, ebx
and ecx, 3
mov dword [esp + 0x14], ecx
shr ecx, 1
mov edi, edx
mov dword [esp + 0xc], edx
mov edi, eax
mov esi, dword [esp + 0xc]
xchg esi, esi
rep movsw word es:[edi], word [esi]
xchg esi, esi
test bl, 1
je 0x4390e1
mov ecx, ebx
and ecx, 2
not ebx
or ebx, 0xfffffffe
mov esi, dword [esp + 0x14]
add esi, ebx
movzx ecx, byte [edx + ecx]
mov byte [eax + esi + 1], cl
jmp 0x4390e1
mov ebx, dword [esp]
cmp esi, 7
jb 0x4390e1
neg ebx
xor edx, edx
nop
nop
nop
nop
mov edi, ebx
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
movzx ebx, byte [eax + edx - 1]
mov byte [ecx + edx - 1], bl
movzx ebx, byte [eax + edx - 2]
mov byte [ecx + edx - 2], bl
movzx ebx, byte [eax + edx - 3]
mov byte [ecx + edx - 3], bl
movzx ebx, byte [eax + edx - 4]
mov byte [ecx + edx - 4], bl
movzx ebx, byte [eax + edx - 5]
mov byte [ecx + edx - 5], bl
movzx ebx, byte [eax + edx - 6]
mov byte [ecx + edx - 6], bl
movzx ebx, byte [eax + edx - 7]
mov byte [ecx + edx - 7], bl
mov ebx, edi
add edx, 0xfffffff8
cmp edi, edx
jne 0x439090
push dword [esp + 4]
call fcn.004090f0
add esp, 4
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x38]
mov dword [ebx], esi
mov ecx, dword [esp + 0x18]
lea edi, [esi + ecx*4]
mov eax, dword [esp + 8]
lea eax, [esi + eax*4]
mov dword [esp + 8], eax
mov dword [ebx + 8], eax
mov dword [esp + 4], esi
mov edx, dword [esp + 0x4c]
jmp 0x438f0f
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret