Function at 0x4019ff
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 4
mov edi, ecx
call fcn.00d723fd
mov esi, eax
push 4
mov dword [ebp - 0xc], esi
call fcn.00d723fd
mov ebx, dword [edi + 4]
mov edx, eax
and dword [ebp - 0x10], 0
pop ecx
pop ecx
mov ecx, ebx
mov dword [ebp - 8], edx
shl ecx, 2
test ecx, ecx
jle 0x401a58
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub edx, ecx
mov esi, dword [ebp - 0x10]
mov al, byte [ecx + edx]
inc esi
mov byte [ecx], al
inc ecx
mov ebx, dword [edi + 4]
mov eax, ebx
shl eax, 2
cmp esi, eax
jl 0x401a3f
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [edi + 8]
shl ebx, 2
inc eax
imul eax, dword [edi]
shl eax, 2
cmp ebx, eax
jge 0x401bcc
mov eax, dword [ebp + 0xc]
add eax, 0xfffffffd
add eax, ebx
mov ecx, eax
mov dword [ebp - 0x10], ecx
mov dl, byte [ecx - 1]
mov byte [esi], dl
mov al, byte [eax]
mov byte [esi + 1], al
mov byte [ebp + 0xb], al
mov al, byte [ecx + 1]
mov byte [esi + 2], al
mov cl, byte [ecx + 2]
mov byte [ebp - 1], al
mov eax, ebx
mov byte [ebp - 2], dl
cdq
and edx, 3
mov byte [esi + 3], cl
add eax, edx
sar eax, 2
cdq
idiv dword [edi + 4]
test edx, edx
jne 0x401b35
mov al, byte [ebp + 0xb]
mov byte [esi], al
mov al, byte [ebp - 1]
mov byte [esi + 1], al
mov al, byte [ebp - 2]
push esi
mov byte [esi + 2], cl
mov byte [esi + 3], al
call fcn.004019cb
mov ecx, dword [edi + 4]
mov eax, ebx
shl ecx, 2
cdq
idiv ecx
mov byte [ebp + 0xb], 1
dec eax
mov dword [ebp - 0x14], eax
test eax, eax
jle 0x401b06
mov dh, byte [ebp + 0xb]
mov esi, eax
mov dl, dh
add dl, dl
mov al, dl
xor al, 0x1b
test dh, dh
movzx ecx, al
movzx eax, dl
cmovns ecx, eax
mov dh, cl
sub esi, 1
jne 0x401ae6
mov esi, dword [ebp - 0xc]
mov byte [ebp + 0xb], dh
mov edx, dword [ebp - 8]
mov ecx, esi
mov al, byte [ebp + 0xb]
push 4
mov byte [edx], al
xor eax, eax
mov word [edx + 2], ax
mov byte [edx + 1], al
mov eax, edx
sub eax, esi
mov dword [ebp + 8], eax
mov esi, eax
pop edx
mov al, byte [esi + ecx]
xor byte [ecx], al
inc ecx
sub edx, 1
jne 0x401b25
mov esi, dword [ebp - 0xc]
jmp 0x401b46
cmp dword [edi + 4], 6
jle 0x401b46
cmp edx, 4
jne 0x401b46
push esi
call fcn.004019cb
mov ecx, dword [edi + 4]
mov eax, ebx
shl ecx, 2
sub eax, ecx
mov edx, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx]
xor al, byte [esi]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + 3], al
lea eax, [ecx + 4]
mov ecx, dword [edi + 4]
mov dword [ebp + 8], eax
mov eax, ebx
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx + 1]
xor al, byte [esi + 1]
mov ecx, dword [ebp + 8]
mov byte [ecx], al
mov eax, ebx
mov ecx, dword [edi + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx + 2]
xor al, byte [esi + 2]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + 5], al
mov eax, ebx
mov ecx, dword [edi + 4]
add ebx, 4
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
mov al, byte [eax + ecx + 3]
xor al, byte [esi + 3]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + 6], al
mov eax, dword [edi + 8]
inc eax
imul eax, dword [edi]
shl eax, 2
cmp ebx, eax
mov eax, dword [ebp + 8]
jl 0x401a75
push edx
call fcn.00d721bd
push esi
call fcn.00d721bd
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 8