Function at 0x438140
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
add eax, esi
sub eax, dword [esp + 0x40]
mov dword [ebx + 8], 0
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [esp + 0x18], eax
cmp eax, esi
jbe 0x4383e6
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
lea ebp, [eax - 1]
mov dword [esp], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
jmp 0x4381d6
mov edi, dword [esp]
mov ecx, edi
mov eax, dword [esp + 8]
sub ecx, eax
cmp edi, dword [esp + 0x10]
je 0x438229
mov edi, dword [esp]
mov ebx, dword [esp + 0x30]
mov dword [eax + ecx], esi
add edi, 4
mov dword [esp], edi
mov dword [ebx + 4], edi
mov eax, dword [esp + 0x40]
add esi, eax
dec esi
inc esi
cmp esi, dword [esp + 0x18]
jae 0x4383e6
test edx, edx
je 0x4381df
cmp byte [edx], 0x3f
je 0x4381ea
movzx ecx, byte [esi]
mov eax, dword [esp + 0x3c]
cmp cl, byte [eax]
jne 0x4381cb
cmp dword [esp + 0x40], 2
jb 0x4381a0
xor ecx, ecx
jmp 0x43821c
movzx edx, byte [esi + ecx + 1]
mov eax, dword [esp + 0x3c]
cmp dl, byte [eax + ecx + 1]
mov edx, dword [esp + 0x44]
jne 0x43832f
inc ecx
cmp ebp, ecx
je 0x4381a0
test edx, edx
je 0x438200
cmp byte [edx + ecx + 1], 0x3f
jne 0x438200
jmp 0x438217
mov dword [esp + 4], ecx
sar ecx, 2
lea eax, [ecx + 1]
mov edi, ecx
shr edi, 1
add edi, ecx
cmp edi, eax
ja 0x43823f
mov edi, eax
lea eax, [edi*4]
push eax
call fcn.00408130
add esp, 4
mov edx, dword [esp + 8]
test edx, edx
mov dword [esp + 0xc], eax
je 0x4383b9
mov dword [esp + 0x10], edi
cmp eax, edx
mov ecx, dword [esp + 4]
mov ebx, eax
mov eax, dword [esp]
jbe 0x438336
cmp eax, ebx
jbe 0x438336
test ecx, ecx
je 0x4383a5
mov eax, dword [esp + 8]
mov edx, dword [esp + 4]
add eax, edx
dec eax
mov ecx, dword [esp + 0xc]
add ecx, edx
dec ecx
mov edi, edx
and edi, 7
je 0x4382c4
neg edi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
dec edx
cmp edi, edx
jne 0x4382b0
add eax, edx
add ecx, edx
add edx, dword [esp + 4]
mov edi, dword [esp + 8]
sub edi, dword [esp]
cmp edi, 0xfffffff8
ja 0x4383a5
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edi]
mov byte [ecx + edi], bl
movzx ebx, byte [eax + edi - 1]
mov byte [ecx + edi - 1], bl
movzx ebx, byte [eax + edi - 2]
mov byte [ecx + edi - 2], bl
movzx ebx, byte [eax + edi - 3]
mov byte [ecx + edi - 3], bl
movzx ebx, byte [eax + edi - 4]
mov byte [ecx + edi - 4], bl
movzx ebx, byte [eax + edi - 5]
mov byte [ecx + edi - 5], bl
movzx ebx, byte [eax + edi - 6]
mov byte [ecx + edi - 6], bl
movzx ebx, byte [eax + edi - 7]
mov byte [ecx + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x4382e0
jmp 0x4383a5
add esi, ecx
jmp 0x4381cb
shr ecx, 2
mov eax, edx
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
mov ecx, dword [esp + 4]
mov edx, ecx
and edx, 0xfffffffc
lea edi, [ebx + edx]
mov dword [esp + 0x14], edi
add edx, eax
mov eax, ecx
and eax, 3
mov ecx, eax
shr ecx, 1
mov dword [esp], edx
mov ebx, dword [esp]
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ebx, dword [esp + 0x14]
mov ecx, eax
or ecx, 1
xor eax, 0xfffffffe
and eax, ecx
je 0x4383a5
mov edi, dword [esp + 4]
and edi, 2
movzx ecx, byte [edx + edi]
mov byte [ebx + edi], cl
cmp eax, 1
je 0x4383a5
movzx ecx, byte [edx + edi + 1]
mov byte [ebx + edi + 1], cl
cmp eax, 2
je 0x4383a5
movzx eax, byte [edx + edi + 2]
mov byte [ebx + edi + 2], al
push dword [esp + 8]
call fcn.00408140
add esp, 4
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
mov ebx, dword [esp + 0x30]
mov dword [ebx], eax
lea edx, [eax + edi*4]
mov edi, eax
mov ecx, dword [esp + 4]
add edi, ecx
mov dword [esp + 0x10], edx
mov dword [ebx + 8], edx
mov eax, dword [esp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x44]
jmp 0x4381b8
mov eax, ebx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret