Function at 0x401d10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov ebx, ecx
push 4
mov dword [ebp - 0x10], ebx
call fcn.00f499e2
mov esi, eax
push 4
mov dword [ebp - 0xc], esi
call fcn.00f499e2
mov edx, eax
add esp, 8
mov eax, dword [ebx + 4]
xor edi, edi
mov dword [ebp - 8], edx
lea ecx, [eax*4]
test ecx, ecx
jle 0x401d72
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub edx, ecx
mov al, byte [edx + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
inc edi
mov esi, dword [ebx + 4]
lea eax, [esi*4]
cmp edi, eax
jl 0x401d51
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 4]
lea edi, [eax*4]
mov eax, dword [ebx + 8]
inc eax
imul eax, dword [ebx]
shl eax, 2
cmp edi, eax
jge 0x401f16
mov ecx, dword [ebp + 0xc]
nop
mov al, byte [ecx + edi - 4]
mov byte [esi], al
mov byte [ebp - 3], al
mov al, byte [ecx + edi - 3]
mov byte [esi + 1], al
mov byte [ebp + 0xb], al
mov al, byte [ecx + edi - 2]
mov byte [esi + 2], al
mov byte [ebp - 1], al
mov al, byte [ecx + edi - 1]
mov byte [esi + 3], al
mov ecx, dword [ebx + 4]
mov byte [ebp - 2], al
mov eax, edi
cdq
and edx, 3
add eax, edx
sar eax, 2
cdq
idiv ecx
test edx, edx
jne 0x401e8d
movzx ecx, byte [ebp + 0xb]
mov bl, 1
mov eax, ecx
and ecx, 0xf
and eax, 0xfffffff0
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [ebp - 1]
mov byte [esi], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [ebp - 2]
mov byte [esi + 1], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
movzx ecx, byte [ebp - 3]
mov byte [esi + 2], al
mov eax, ecx
and eax, 0xfffffff0
and ecx, 0xf
movzx eax, byte [eax + ecx + str.cw]
mov ecx, dword [ebp - 0x10]
mov byte [esi + 3], al
mov eax, edi
cdq
mov ecx, dword [ecx + 4]
shl ecx, 2
idiv ecx
dec eax
mov dword [ebp + 8], eax
test eax, eax
jle 0x401e62
mov esi, eax
mov dl, bl
add dl, dl
mov al, dl
xor al, 0x1b
test bl, bl
movzx ecx, al
movzx eax, dl
cmovns ecx, eax
mov bl, cl
sub esi, 1
jne 0x401e45
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov byte [edx], bl
mov word [edx + 2], 0
mov byte [edx + 1], 0
xor byte [esi], bl
movzx eax, byte [edx + 1]
xor byte [esi + 1], al
movzx eax, byte [edx + 2]
xor byte [esi + 2], al
movzx eax, byte [edx + 3]
xor byte [esi + 3], al
mov ebx, dword [ebp - 0x10]
jmp 0x401ea0
cmp ecx, 6
jle 0x401e9d
cmp edx, 4
jne 0x401e9d
push esi
call fcn.00401ca0
mov edx, dword [ebp - 8]
mov ecx, dword [ebx + 4]
mov eax, edi
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx]
xor al, byte [esi]
mov byte [ecx + edi], al
mov eax, edi
mov ecx, dword [ebx + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 1]
xor al, byte [esi + 1]
mov byte [ecx + edi + 1], al
mov eax, edi
mov ecx, dword [ebx + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 2]
xor al, byte [esi + 2]
mov byte [ecx + edi + 2], al
mov eax, edi
mov ecx, dword [ebx + 4]
shl ecx, 2
sub eax, ecx
mov ecx, dword [ebp + 0xc]
movzx eax, byte [eax + ecx + 3]
xor al, byte [esi + 3]
mov byte [ecx + edi + 3], al
add edi, 4
mov eax, dword [ebx + 8]
inc eax
imul eax, dword [ebx]
shl eax, 2
cmp edi, eax
jl 0x401d90
push edx
call fcn.00f497a4
push esi
call fcn.00f497a4
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8