Function at 0x412030
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x88
mov eax, dword [0x42e00c]
xor eax, esp
mov dword [esp + 0x84], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [esp + 0x44], ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
mov dword [esp + 0x10], eax
mov eax, ecx
and eax, 0xf
shr esi, 4
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], eax
push edi
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x18], edi
cmp edx, 1
je 0x41209c
test edx, edx
je 0x41209c
mov eax, 0xffffffdf
pop edi
pop esi
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.00412408
mov esp, ebp
pop ebp
ret
cmp ecx, 0x10
jb 0x4123ef
cmp ecx, 0x1000000
ja 0x4123ef
mov ecx, dword [esp + 0x48]
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x30]
add ecx, 0x118
mov edx, 1
call fcn.00411d10
add esp, 8
test eax, eax
jne 0x4123f4
test esi, esi
je 0x4122d9
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x50]
mov eax, ecx
sub eax, edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0x44], eax
add ecx, 0xf
mov eax, dword [esp + 0x58]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x30], edx
nop dword [eax]
dec esi
cmp dword [esp + 0x24], 0
mov dword [esp + 0x4c], esi
je 0x412195
cmp dword [esp + 0x28], 0
jne 0x412195
test esi, esi
jne 0x412195
mov esi, dword [esp + 0x30]
mov eax, ecx
movaps xmm0, xmmword [esp + 0x50]
mov ecx, 8
shr eax, 0x1c
and eax, 8
movaps xmmword [esp + 0x70], xmm0
sub ecx, eax
mov eax, 0x87
sar eax, cl
mov ecx, dword [esp + 0x10]
shr dword [esp + 0x10], 0x1f
shld ecx, esi, 1
cdq
add esi, esi
xor edx, ecx
mov ecx, dword [esp + 0x2c]
xor eax, esi
mov esi, dword [esp + 0x1c]
shld esi, ecx, 1
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x20]
add ecx, ecx
or ecx, dword [esp + 0x10]
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], esi
lea ecx, [esp + 0x60]
xor edx, edx
cmp ecx, eax
mov eax, dword [esp + 0x14]
ja 0x4121cb
lea ecx, [esp + 0x6f]
cmp ecx, eax
jb 0x4121cb
mov edi, dword [esp + 0x44]
nop
lea eax, [esp + 0x50]
add eax, edx
mov cl, byte [edi + eax]
xor cl, byte [eax]
mov byte [esp + edx + 0x60], cl
inc edx
cmp edx, 0x10
jb 0x4121b0
mov edi, dword [esp + 0x18]
jmp 0x4121d9
movups xmm0, xmmword [eax]
pxor xmm0, xmmword [esp + 0x50]
movups xmmword [esp + 0x60], xmm0
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x60]
mov ecx, dword [esp + 0x48]
push eax
push eax
call fcn.00411d10
add esp, 8
test eax, eax
jne 0x4123f4
lea ecx, [esp + 0x5f]
cmp edi, ecx
ja 0x41220a
lea ecx, [edi + 0xf]
lea edx, [esp + 0x50]
cmp ecx, edx
jae 0x412220
lea ecx, [esp + 0x6f]
cmp edi, ecx
ja 0x412233
lea ecx, [edi + 0xf]
lea edx, [esp + 0x60]
cmp ecx, edx
jb 0x412233
nop dword [eax]
mov cl, byte [esp + eax + 0x60]
xor cl, byte [esp + eax + 0x50]
mov byte [edi + eax], cl
inc eax
cmp eax, 0x10
jb 0x412220
jmp 0x412241
movups xmm0, xmmword [esp + 0x60]
pxor xmm0, xmmword [esp + 0x50]
movups xmmword [edi], xmm0
mov esi, dword [esp + 0x5c]
mov ecx, 8
mov eax, esi
add dword [esp + 0x14], 0x10
shr eax, 0x1c
add edi, 0x10
and eax, 8
add dword [esp + 0x44], 0x10
sub ecx, eax
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x54]
mov eax, 0x87
sar eax, cl
mov ecx, esi
cdq
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x50]
shld ecx, edx, 1
shr esi, 0x1f
xor dword [esp + 0x10], ecx
add edx, edx
mov ecx, dword [esp + 0x1c]
xor eax, edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x30]
shld ecx, eax, 1
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x10]
add eax, eax
or eax, esi
mov dword [esp + 0x1c], ecx
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x20]
add eax, 0x10
mov dword [esp + 0x54], edx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], eax
test esi, esi
jne 0x412120
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x4123d9
cmp dword [esp + 0x28], 0
lea eax, [esp + 0x50]
lea esi, [esp + 0x70]
mov dword [esp + 0x18], 0
cmovne esi, eax
lea eax, [edi - 0x10]
mov dword [esp + 0x4c], eax
test ecx, ecx
je 0x412324
mov edx, eax
mov eax, ecx
sub edx, edi
mov dword [esp + 0x18], eax
mov al, byte [edi + edx]
lea edi, [edi + 1]
mov byte [edi - 1], al
sub ecx, 1
jne 0x412312
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
push ecx
push esi
lea ecx, [esp + 0x68]
call fcn.00408110
mov ecx, dword [esp + 0x20]
mov eax, 0x10
mov edi, dword [esp + 0x54]
sub eax, ecx
push eax
lea eax, [ecx + esi]
push eax
lea eax, [esp + 0x70]
lea edx, [ecx + edi]
add ecx, eax
call fcn.00408110
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x70]
mov ecx, dword [esp + 0x58]
push eax
push eax
call fcn.00411d10
add esp, 0x18
test eax, eax
jne 0x4123f4
lea eax, [esp + 0x6f]
xor edx, edx
lea ecx, [edi + 0xf]
cmp edi, eax
ja 0x412388
lea eax, [esp + 0x60]
cmp ecx, eax
jae 0x412393
lea eax, [esi + 0xf]
cmp edi, eax
ja 0x4123ca
cmp ecx, esi
jb 0x4123ca
lea eax, [esp + 0x60]
sub esi, eax
sub edi, eax
nop dword [eax + eax]
lea ecx, [esp + 0x60]
add ecx, edx
inc edx
mov al, byte [ecx + esi]
xor al, byte [ecx]
mov byte [ecx + edi], al
cmp edx, 0x10
jb 0x4123a0
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.00412408
mov esp, ebp
pop ebp
ret
movups xmm1, xmmword [esi]
movups xmm0, xmmword [esp + 0x60]
pxor xmm1, xmm0
movups xmmword [edi], xmm1
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.00412408
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffde
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
xor ecx, esp
call fcn.00412408
mov esp, ebp
pop ebp
ret