Function at 0x4ec5b42f
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.4ec590d0
mov eax, dword [0x4edd770c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
or dword [ebp - 0x100c], 0xffffffff
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x18]
push edi
xor edi, edi
test byte [ebp + 8], 8
mov dword [ebp - 0x1010], eax
mov dword [ebp - 0x1018], edi
je 0x4ec5b4a1
xor ecx, ecx
cmp dword [ebp + 0x14], edi
mov dword [ebp - 0x100c], edi
jbe 0x4ec5b57f
movsx eax, byte [ebx + ecx]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x100c], eax
inc ecx
cmp ecx, dword [ebp + 0x14]
jb 0x4ec5b480
cmp dword [ebp - 0x100c], edi
je 0x4ec5b57f
cmp dword [ebp + 0x14], esi
jbe 0x4ec5b50a
test byte [ebp + 8], 0x10
je 0x4ecd79a9
xor ecx, ecx
test esi, esi
jbe 0x4ec5b4cb
cmp ecx, dword [ebp + 0x14]
jae 0x4ec5b4ef
movsx eax, byte [ebx + ecx]
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc ecx
cmp ecx, esi
jb 0x4ec5b4b6
cmp ecx, dword [ebp + 0x14]
jae 0x4ec5b4ef
cmp edi, dword [ebp - 0x100c]
jae 0x4ec5b50a
mov dl, byte [ebx + ecx]
mov eax, ebx
sub eax, esi
sub dl, byte [eax + ecx]
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc ecx
jmp 0x4ec5b4cb
cmp edi, dword [ebp - 0x100c]
jae 0x4ec5b50a
xor eax, eax
inc eax
test edi, edi
mov dword [ebp - 0x100c], edi
mov dword [ebp - 0x1018], eax
je 0x4ec5b56e
xor edi, edi
cmp dword [ebp - 0x1010], edi
jne 0x4ecd79bf
cmp dword [ebp + 0x14], esi
jbe 0x4ec5b568
test byte [ebp + 8], 0x40
je 0x4ec5b568
xor ecx, ecx
test esi, esi
jbe 0x4ec5b561
cmp ecx, dword [ebp + 0x14]
jae 0x4ec5b583
movsx eax, byte [ebx + ecx]
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc ecx
cmp ecx, esi
jb 0x4ec5b529
jmp 0x4ec5b561
cmp edi, dword [ebp - 0x100c]
jae 0x4ec5b568
mov dl, byte [ebx + ecx]
mov eax, ebx
sub eax, esi
mov al, byte [eax + ecx]
shr al, 1
sub dl, al
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add edi, eax
inc ecx
cmp ecx, dword [ebp + 0x14]
jb 0x4ec5b540
jmp 0x4ec5b583
mov al, byte [ebp - 0x1018]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.4ec515ae
leave
ret 0x14
xor al, al
jmp 0x4ec5b56e
cmp edi, dword [ebp - 0x100c]
jb 0x4ecd7c5a
jmp 0x4ec5b568
test byte [ebp + 8], 0x80
je 0x4ec5b50a
cmp dword [ebp - 0x1010], edi
je 0x4ec5b4b0
test byte [ebp + 8], 0x20
jne 0x4ecd79d0
cmp dword [ebp + 0x14], esi
ja 0x4ecd7a43
test byte [ebp + 8], 0x80
je 0x4ecd7a43
cmp dword [ebp + 0x14], edi
mov dword [ebp - 0x1008], edi
mov dword [ebp - 0x1014], edi
jbe 0x4ecd7a1e
mov ecx, dword [ebp - 0x1010]
mov edi, ebx
sub edi, ecx
mov eax, dword [ebp - 0x100c]
cmp dword [ebp - 0x1008], eax
jae 0x4ecd7a43
mov al, byte [edi + ecx]
sub al, byte [ecx]
movsx eax, al
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1008], eax
inc dword [ebp - 0x1014]
mov eax, dword [ebp - 0x1014]
inc ecx
cmp eax, dword [ebp + 0x14]
jb 0x4ecd79eb
mov ecx, dword [ebp - 0x1008]
cmp ecx, dword [ebp - 0x100c]
jae 0x4ecd7a43
test ecx, ecx
push 2
pop eax
mov dword [ebp - 0x100c], ecx
mov dword [ebp - 0x1018], eax
je 0x4ec5b56e
test byte [ebp + 8], 0x40
je 0x4ecd7b09
xor ecx, ecx
cmp esi, ecx
mov dword [ebp - 0x1008], ecx
jbe 0x4ecd7a91
mov eax, dword [ebp - 0x1010]
sub eax, ebx
mov dword [ebp - 0x1014], eax
cmp ecx, dword [ebp + 0x14]
jae 0x4ecd7ae4
mov eax, dword [ebp - 0x1014]
lea edi, [ebx + ecx]
mov al, byte [edi + eax]
mov dl, byte [edi]
shr al, 1
sub dl, al
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1008], eax
inc ecx
cmp ecx, esi
jb 0x4ecd7a67
cmp ecx, dword [ebp + 0x14]
jae 0x4ecd7ae4
mov eax, dword [ebp - 0x1010]
sub eax, ebx
lea edi, [ebx + ecx]
mov dword [ebp - 0x1014], eax
mov eax, dword [ebp - 0x1008]
cmp eax, dword [ebp - 0x100c]
jae 0x4ecd7b09
mov edx, dword [ebp - 0x1014]
movzx edx, byte [edx + edi]
mov eax, ebx
sub eax, esi
movzx eax, byte [eax + ecx]
add eax, edx
mov dl, byte [edi]
sar eax, 1
sub dl, al
movsx eax, dl
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1008], eax
inc ecx
inc edi
cmp ecx, dword [ebp + 0x14]
jb 0x4ecd7aa7
mov ecx, dword [ebp - 0x1008]
cmp ecx, dword [ebp - 0x100c]
jae 0x4ecd7b09
test ecx, ecx
push 3
pop eax
mov dword [ebp - 0x100c], ecx
mov dword [ebp - 0x1018], eax
je 0x4ec5b56e
cmp dword [ebp + 0x14], esi
jbe 0x4ec5b568
test byte [ebp + 8], 0x80
je 0x4ec5b568
mov eax, dword [ebp + 0x14]
shl eax, 4
cmp dword [ebp - 0x100c], eax
jbe 0x4ec5b568
mov edi, 0x1000
cmp esi, edi
ja 0x4ec5b57f
push esi
lea eax, [ebp - 0x1004]
push ebx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push esi
push dword [ebp - 0x1010]
lea eax, [ebp - 0x1004]
push eax
call fcn.4edc76b6
sub dword [ebp + 0x14], esi
mov eax, dword [ebp + 0x14]
add dword [ebp - 0x1010], esi
shl eax, 2
add ebx, esi
xor ecx, ecx
test esi, esi
mov dword [ebp - 0x1008], eax
jbe 0x4ecd7b94
movsx eax, byte [ebp + ecx - 0x1004]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1008], eax
inc ecx
cmp ecx, esi
jb 0x4ecd7b7c
cmp dword [ebp + 0x14], 0
jbe 0x4ecd7c39
mov dword [ebp - 0x1014], edi
sub dword [ebp - 0x1014], esi
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp - 0x1014]
cmp edi, eax
jbe 0x4ecd7bb9
mov edi, eax
lea eax, [esi + edi]
push eax
mov eax, ebx
sub eax, esi
push eax
lea eax, [ebp - 0x1004]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push esi
push edi
push dword [ebp - 0x1010]
lea eax, [ebp + esi - 0x1004]
push eax
call fcn.4edc7747
xor ecx, ecx
test edi, edi
jbe 0x4ecd7c15
mov eax, dword [ebp - 0x1008]
cmp eax, dword [ebp - 0x100c]
jae 0x4ecd7c15
lea eax, [ebp + esi - 0x1004]
movsx eax, byte [eax + ecx]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x1008], eax
inc ecx
cmp ecx, edi
jb 0x4ecd7bec
sub dword [ebp + 0x14], edi
je 0x4ecd7c39
mov eax, dword [ebp - 0x100c]
cmp dword [ebp - 0x1008], eax
jae 0x4ec5b568
add ebx, edi
add dword [ebp - 0x1010], edi
jmp 0x4ecd7baa
mov eax, dword [ebp - 0x1008]
cmp eax, dword [ebp - 0x100c]
jae 0x4ec5b568
mov dword [ebp - 0x1018], 4
jmp 0x4ec5b568
mov dword [ebp - 0x1018], 3
jmp 0x4ec5b568