Function at 0x10124620
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x30
cmp dword [ebp + 0xc], 0
je 0x1012487f
mov eax, dword [ebp + 0x1c]
lea edi, [eax + 4]
mov ecx, edi
mov dword [ebp - 0x10], edi
not ecx
shr ecx, 0x1f
cmp eax, 0xfffffffb
mov dword [ebp - 0x20], ecx
ja 0x1012489c
mov eax, dword [ebp + 8]
mov esi, dword [0x1044eff8]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1c], 0
lea ecx, [eax + 1]
add eax, 0x10
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], eax
jmp 0x1012469c
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 0xc]
jae 0x1012487f
test edi, edi
je 0x101246d0
js 0x10124895
mov eax, dword [esi]
test eax, eax
jne 0x101246bb
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x10124887
mov dword [esi], eax
push edi
push 8
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
jne 0x101246d5
jmp 0x10124887
mov eax, 1
mov ebx, dword [ebp + 0x1c]
push ebx
push dword [ebp + 0x18]
push eax
mov esi, edi
mov edi, eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
movzx eax, byte [ebp - 0x2c]
movzx ecx, byte [ebp - 0x18]
movzx edx, byte [ebp - 0x24]
shl eax, 0x18
shl ecx, 0x10
or ecx, eax
movzx eax, byte [ebp - 0x28]
shl eax, 8
or eax, ecx
or edx, eax
mov dword [edi + ebx], edx
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx + 0xc]
push esi
mov dword [ebp - 0x14], edi
push edi
mov esi, dword [ebp + 0x10]
push esi
call eax
add esp, 0xc
mov eax, dword [ebx + 0x10]
push esi
call eax
add esp, 4
mov edi, dword [ebp - 0x10]
test edx, edx
mov dword [ebp - 0x30], edx
je 0x10124770
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
cmp ecx, edx
jae 0x10124817
mov edi, ecx
not edi
add edi, edx
mov edx, dword [ebp - 0x30]
lea esi, [edx - 1]
cmp edi, esi
mov ebx, esi
cmovb ebx, edi
xor edx, edx
inc ebx
cmp ebx, 0x20
jae 0x10124780
mov edi, dword [ebp - 0x10]
jmp 0x101247f0
mov ecx, dword [ebp - 0x1c]
jmp 0x10124817
mov dword [ebp - 0x3c], ebx
mov ebx, dword [ebp + 8]
cmp edi, esi
cmovb esi, edi
lea edi, [eax + esi + 1]
add ebx, ecx
cmp ebx, edi
jae 0x101247a3
mov edi, dword [ebp - 0x38]
add edi, ecx
add esi, edi
mov edi, dword [ebp - 0x10]
cmp eax, esi
jb 0x101247f0
mov ebx, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x34]
xor edi, edi
mov edx, ebx
add esi, ecx
and edx, 0xffffffe0
add ecx, edx
nop word cs:[eax + eax]
nop
movups xmm0, xmmword [eax + edi]
movups xmm2, xmmword [esi + edi - 0x10]
movups xmm1, xmmword [eax + edi + 0x10]
movups xmm3, xmmword [esi + edi]
xorps xmm2, xmm0
xorps xmm3, xmm1
movups xmmword [esi + edi - 0x10], xmm2
movups xmmword [esi + edi], xmm3
add edi, 0x20
cmp edx, edi
jne 0x101247c0
mov edi, dword [ebp - 0x10]
cmp ebx, edx
je 0x10124817
nop
inc edx
nop word cs:[eax + eax]
nop dword [eax + eax]
movzx ebx, byte [eax + edx - 1]
mov esi, dword [ebp + 8]
xor byte [esi + ecx], bl
inc ecx
cmp edx, dword [ebp - 0x30]
jae 0x10124817
inc edx
cmp ecx, dword [ebp + 0xc]
jb 0x10124800
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x2c]
inc cl
mov dword [ebp - 0x2c], ecx
jne 0x10124850
mov ecx, dword [ebp - 0x18]
mov esi, dword [0x1044eff8]
inc cl
mov dword [ebp - 0x18], ecx
jne 0x10124856
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x18], 0
add cl, 1
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x24]
adc cl, 0
mov dword [ebp - 0x24], ecx
jmp 0x10124856
mov esi, dword [0x1044eff8]
cmp dword [ebp - 0x30], 0
je 0x10124866
push eax
push 0
push dword [esi]
call sub.KERNEL32.dll_HeapFree
test edi, edi
je 0x10124690
push dword [ebp - 0x14]
push 0
push dword [esi]
call sub.KERNEL32.dll_HeapFree
jmp 0x10124690
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
push edi
push dword [ebp - 0x20]
call fcn.1001ac80
add esp, 8
ud2
call fcn.1001ac40
ud2
test edi, edi
mov dword [ebp - 0x14], 1
je 0x101248cc
push dword [ebp - 0x20]
push dword [ebp - 0x10]
call fcn.10001630
add esp, 8
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x101248cc
push dword [ebp - 0x10]
push dword [ebp - 0x20]
call fcn.1001ac80
add esp, 8
ud2
push 0x103853d0
push dword [ebp - 0x10]
push dword [ebp + 0x1c]
call fcn.1002ac30
add esp, 0xc
ud2