Function at 0x4386a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
add ecx, esi
sub ecx, dword [esp + 0x44]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 0x1c], ecx
cmp ecx, esi
jbe 0x4389c9
mov ebp, dword [esp + 0x48]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp + 0x10], 0
jmp 0x438709
add esi, ecx
dec esi
mov eax, dword [esp + 0x34]
inc esi
cmp esi, dword [esp + 0x1c]
jae 0x4389c9
test ebp, ebp
je 0x438759
movzx ecx, byte [ebp]
mov byte [esp + 0x14], 0xb7
lea eax, [esp + 0x15]
mov word [eax + 4], 0
mov dword [eax], 0
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, edx
and ebx, 4
mov eax, edx
and eax, 3
xor eax, 0xeb
sub eax, ebx
xor al, byte [esp + edx + 0x14]
mov ch, 0x9b
sub ch, al
mov byte [esp + edx + 0x14], ch
inc edx
cmp edx, 7
jne 0x438730
cmp cl, byte [esp + 0x14]
je 0x438764
movzx eax, byte [esi]
mov ecx, dword [esp + 0x40]
cmp al, byte [ecx]
jne 0x4386fa
cmp dword [esp + 0x44], 2
jb 0x438800
mov ecx, 1
jmp 0x4387a2
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x40]
cmp al, byte [edx + ecx]
jne 0x4386f7
mov eax, ecx
and eax, 1
xor ecx, 1
lea ecx, [ecx + eax*2]
cmp ecx, dword [esp + 0x44]
jae 0x438800
test ebp, ebp
je 0x438780
movzx edx, byte [ebp + ecx]
mov byte [esp + 0x14], 0x85
lea eax, [esp + 0x15]
mov byte [eax + 4], 0
mov dword [eax], 0
xor ebx, ebx
movzx edi, byte [esp + ebx + 0x14]
lea eax, [ebx + 0x19e11c51]
xor eax, edi
mov edi, eax
and edi, 1
or eax, 1
add eax, edi
add al, 0x6a
mov byte [esp + ebx + 0x14], al
mov eax, ebx
not eax
or eax, 1
add eax, ebx
xor ebx, 1
lea ebx, [ebx + eax*2]
add ebx, 2
cmp ebx, 6
jb 0x4387c0
cmp dl, byte [esp + 0x14]
jne 0x438780
jmp 0x438791
mov eax, dword [esp + 8]
mov ebp, eax
mov ecx, dword [esp + 4]
sub ebp, ecx
cmp eax, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
je 0x43881f
mov edx, dword [esp + 8]
jmp 0x4389ac
mov ecx, ebp
sar ecx, 2
lea eax, [ecx + 1]
mov ebx, ecx
shr ebx, 1
add ebx, ecx
cmp ebx, eax
ja 0x438833
mov ebx, eax
mov eax, ebx
and eax, 0xfffffffb
mov ecx, ebx
and ecx, 4
mov edx, ebx
or edx, 4
imul edx, ecx
xor ecx, 4
imul ecx, eax
add edx, ecx
push edx
call fcn.00408230
add esp, 4
mov edi, eax
mov eax, dword [esp + 4]
test eax, eax
mov dword [esp], edi
je 0x43898a
mov dword [esp + 0x10], ebx
cmp edi, eax
mov eax, dword [esp + 8]
mov dword [esp + 0xc], ebp
jbe 0x43892f
cmp eax, edi
jbe 0x43892f
test ebp, ebp
je 0x438973
mov eax, dword [esp + 4]
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 0x4388c4
neg edi
xor edx, edx
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 0x4388b0
add eax, edx
add ecx, edx
add edx, dword [esp + 0xc]
mov edi, dword [esp + 4]
sub edi, dword [esp + 8]
cmp edi, 0xfffffff8
ja 0x438973
neg edx
xor edi, edi
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 0x4388e0
jmp 0x438973
mov ecx, ebp
shr ecx, 2
mov ebx, dword [esp + 4]
mov eax, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov edx, ebp
and edx, 0xfffffffc
mov ecx, dword [esp]
lea edi, [ecx + edx]
add edx, ebx
mov ebx, ebp
and ebx, 3
mov ecx, ebx
shr ecx, 1
mov eax, edx
mov dword [esp + 8], edi
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
test byte [esp + 0xc], 1
je 0x438973
movzx eax, byte [edx + ebx - 1]
mov ecx, dword [esp + 8]
mov byte [ecx + ebx - 1], al
push dword [esp + 4]
call fcn.00408240
add esp, 4
mov ebp, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
mov edi, dword [esp]
mov eax, dword [esp + 0x34]
mov dword [eax], edi
mov ecx, dword [esp]
lea ecx, [ecx + ebx*4]
mov edx, dword [esp]
add edx, ebp
mov dword [esp + 0x10], ecx
mov dword [eax + 8], ecx
mov ecx, dword [esp]
mov dword [esp + 4], ecx
mov ecx, dword [esp]
mov dword [ecx + ebp], esi
add edx, 4
mov dword [esp + 8], edx
mov dword [eax + 4], edx
mov ecx, dword [esp + 0x44]
add esi, ecx
dec esi
mov ebp, dword [esp + 0x48]
jmp 0x4386fe
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret