Function at 0x10014fa0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x50
push ebx
push ebp
push esi
push edi
xor edx, edx
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], dl
xor ebx, ebx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x18], ebx
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ecx]
mov dword [esp + 0x1c], ebx
cmp eax, 2
jl case.0x10014fee.2
cmp eax, 5
jg case.0x10014fee.2
mov ecx, dword [ecx + 4]
lea eax, [ecx - 1]
cmp eax, 4
ja case.0x10014fee.2
jmp dword [eax*4 + 0x100151ec]
mov dword [esp + 0x14], 2
jmp 0x1001501b
mov dword [esp + 0x14], 3
jmp 0x1001501b
mov dword [esp + 0x14], 4
jmp 0x1001501b
mov dword [esp + 0x14], 5
mov esi, dword [esp + 0x68]
push 1
lea eax, [esi + 7]
shr eax, 3
push eax
mov dword [esp + 0x20], eax
call fcn.100356a0
add esp, 8
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x1001508b
mov ebp, 0xbffff43a
mov edx, dword [esp + 0x10]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov al, byte [esp + 0x20]
mov byte [esp + 0x20], al
test edx, edx
je 0x10015081
mov ecx, dword [esp + 0x18]
xor eax, eax
mov esi, ecx
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov cl, byte [edx]
mov byte [edx], cl
push edx
call fcn.1003572d
add esp, 4
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x50
ret
mov ebx, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
lea ecx, [ebx + edx]
lea ecx, [ecx*8 + 9]
cmp esi, ecx
jae 0x100150a8
mov ebp, 0xfffff439
jmp 0x10015041
mov esi, eax
xor ecx, ecx
lea edi, [eax + 8]
push edx
mov dword [esi], ecx
mov dword [esi + 4], ecx
mov esi, dword [esp + 0x70]
mov ecx, ebx
mov ebp, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [ebx + eax + 8]
push esi
call fcn.1000b870
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x10015041
mov edx, dword [esp + 0x78]
mov edi, dword [esp + 0x74]
mov eax, dword [edx]
mov edx, dword [esp + 0x10]
lea ecx, [ebx + edi + 8]
push eax
push ecx
lea eax, [esp + 0x24]
push edx
lea ecx, [esp + 0x2c]
push eax
push ecx
call fcn.1000dc60
mov ebp, eax
add esp, 0x14
test ebp, ebp
jne 0x10015041
mov ebp, dword [esp + 0x18]
sub ebp, ebx
mov edx, ebp
add ebp, 0xfffffffe
sub edx, edi
mov edi, dword [esp + 0x64]
sub edx, 2
mov ecx, edx
mov dword [esp + 0x1c], edx
mov ebx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
inc ebx
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x64]
mov byte [edx + eax], 1
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x64]
mov ecx, eax
lea edi, [ebx + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x10]
and ecx, 3
add ebx, eax
mov eax, dword [esp + 0x14]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x70]
push eax
lea ecx, [esp + 0x24]
push edi
push ecx
push ebp
push edx
call fcn.10014500
mov ebp, eax
add esp, 0x14
test ebp, ebp
jne 0x10015041
mov esi, dword [esp + 0x64]
test ebx, ebx
jbe 0x100151a1
mov ebp, dword [esp + 0x10]
mov eax, esi
sub ebp, esi
mov ecx, ebx
mov dl, byte [eax + ebp]
xor byte [eax], dl
inc eax
dec ecx
jne 0x10015198
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x68]
shl eax, 3
sub eax, ecx
je 0x100151ba
mov dl, byte [esi]
mov cl, al
shl dl, cl
shr dl, cl
mov byte [esi], dl
mov ecx, edi
add ebx, esi
mov eax, ecx
lea esi, [esp + 0x20]
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor ebp, ebp
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x70]
mov byte [ebx + ecx], 0xbc
jmp 0x10015041
mov ebp, 0xfffff43b
jmp 0x10015045