Function at 0x1012ec70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x5c
movzx edx, word [ecx + 0x14]
movzx ecx, word [ecx + 0x16]
add edx, 0xfffffffc
push ebx
mov ebx, dword [esp + 0x68]
push ebp
mov ebp, dword [esp + 0x74]
push esi
mov esi, dword [esp + 0x6c]
push edi
push 0x80000
push 0
lea eax, [esi + 0x1fe]
cmp eax, edx
push ebp
cmovl edx, eax
add ecx, 0xfffffffc
lea eax, [ebx + 0x1fe]
mov dword [esp + 0x7c], edx
cmp eax, ecx
cmovl ecx, eax
mov dword [esp + 0x2c], ecx
call fcn.101dfee0
lea edi, [esi + 2]
add esp, 0xc
cmp edi, dword [esp + 0x70]
jge 0x1012ef46
add ebx, 2
lea eax, [ebp + 2]
mov edx, edi
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x78]
sub edx, esi
mov ebp, dword [esp + 0x14]
add ebx, 0x180006
imul ecx, edx, 0xc00
shl edx, 0xa
add eax, edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x18], eax
add ebx, ecx
sub edx, edi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x70], edx
nop word [eax + eax]
mov ecx, eax
mov dword [esp + 0x28], ebx
lea eax, [ebx - 0x180000]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
cmp ebp, eax
jge 0x1012ef22
sub eax, ebp
mov dword [esp + 0x78], eax
add ecx, 2
xor edx, edx
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x74], edx
mov ebp, dword [ecx]
add ebp, 6
mov dword [ecx], ebp
movzx eax, word [ebp]
movsx esi, ax
movsx eax, word [ebp - 6]
mov ecx, esi
sub ecx, eax
movsx ebx, word [ebp + 4]
movsx edi, word [ebp + 2]
mov eax, ecx
sar eax, 0x1f
xor ecx, eax
sub ecx, eax
movsx eax, word [ebp - 2]
mov dword [esp + edx + 0x2c], ecx
mov edx, ebx
sub edx, eax
mov ecx, edi
movsx eax, word [ebp - 4]
sub ecx, eax
imul edx, edx
movsx eax, word [ebp + 6]
imul ecx, ecx
add ecx, edx
mov edx, dword [esp + 0x74]
mov dword [esp + edx + 0x4c], ecx
mov ecx, esi
sub ecx, eax
mov eax, ecx
sar eax, 0x1f
xor ecx, eax
sub ecx, eax
movsx eax, word [ebp + 0xa]
mov dword [esp + edx + 0x30], ecx
mov edx, ebx
sub edx, eax
mov ecx, edi
movsx eax, word [ebp + 8]
sub ecx, eax
imul edx, edx
movsx eax, word [ebp - 0xc00]
imul ecx, ecx
add ecx, edx
mov edx, dword [esp + 0x74]
mov dword [esp + edx + 0x50], ecx
mov ecx, esi
sub ecx, eax
mov eax, ecx
sar eax, 0x1f
xor ecx, eax
sub ecx, eax
movsx eax, word [ebp - 0xbfc]
mov dword [esp + edx + 0x34], ecx
mov edx, ebx
sub edx, eax
mov ecx, edi
movsx eax, word [ebp - 0xbfe]
sub ecx, eax
imul edx, edx
movsx eax, word [ebp + 0xc00]
sub esi, eax
imul ecx, ecx
mov eax, esi
sar eax, 0x1f
xor esi, eax
sub esi, eax
movsx eax, word [ebp + 0xc04]
sub ebx, eax
add ecx, edx
movsx eax, word [ebp + 0xc02]
mov edx, dword [esp + 0x74]
sub edi, eax
imul edi, edi
imul ebx, ebx
mov dword [esp + edx + 0x54], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + edx + 0x38], esi
add edi, ebx
add ecx, 4
mov dword [esp + edx + 0x58], edi
add edx, 0x10
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x74], edx
cmp edx, 0x20
jl 0x1012ed47
mov edx, dword [esp + 0x30]
mov ecx, edx
mov esi, dword [esp + 0x2c]
cmp esi, edx
mov edi, dword [esp + 0x48]
mov eax, edi
mov ebx, dword [esp + 0x44]
cmova ecx, esi
cmp ebx, edi
cmova eax, ebx
cmp ecx, eax
jae 0x1012ee7d
cmp esi, edx
cmova edx, esi
jmp 0x1012ee84
cmp ebx, edi
mov edx, edi
cmova edx, ebx
mov esi, dword [esp + 0x50]
mov ecx, esi
mov edi, dword [esp + 0x4c]
cmp edi, esi
mov ebx, dword [esp + 0x68]
mov eax, ebx
mov ebp, dword [esp + 0x64]
cmova ecx, edi
cmp ebp, ebx
cmova eax, ebp
cmp ecx, eax
jae 0x1012eead
cmp edi, esi
cmova esi, edi
jmp 0x1012eeb4
cmp ebp, ebx
mov esi, ebx
cmova esi, ebp
mov ebx, dword [esp + 0x10]
xor edi, edi
xor ecx, ecx
nop dword [eax]
xor eax, eax
cmp dword [esp + ecx + 0x2c], edx
ja 0x1012eed4
cmp dword [esp + ecx + 0x4c], esi
mov ebp, 1
cmovbe eax, ebp
cmp dword [esp + ecx + 0x30], edx
ja 0x1012eee1
cmp dword [esp + ecx + 0x50], esi
ja 0x1012eee1
inc eax
cmp dword [esp + ecx + 0x34], edx
ja 0x1012eeee
cmp dword [esp + ecx + 0x54], esi
ja 0x1012eeee
inc eax
cmp dword [esp + ecx + 0x38], edx
ja 0x1012eefb
cmp dword [esp + ecx + 0x58], esi
ja 0x1012eefb
inc eax
mov byte [edi + ebx], al
add ecx, 0x10
inc edi
cmp ecx, 0x20
jl 0x1012eec0
sub dword [esp + 0x78], 1
mov ecx, dword [esp + 0x10]
jne 0x1012ed32
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x70]
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add ebx, 0xc00
add eax, 0x400
mov dword [esp + 0x1c], ebx
sub edx, 1
mov dword [esp + 0x18], eax
mov dword [esp + 0x70], edx
jne 0x1012ed10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret 0x10