Function at 0x10012180
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x1005b008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [0x1006ef44]
xor edx, edx
push edi
xor edi, edi
mov eax, dword [esi + 0x3e64]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x100121c6
test dword [eax + 0xc], 0x200
cmove edx, eax
cmp byte [esi + 0x4a], 0
lea eax, [esi + 0x3e50]
vmovss xmm6, dword [esi + 0x37e4]
vmovss xmm7, dword [esi + 0x37e8]
vmovss dword [ebp - 0xc], xmm6
vmovss dword [ebp - 8], xmm7
jne 0x100121ef
lea eax, [ebp - 0xc]
mov ecx, dword [esi + 0x3e10]
vmovss xmm2, dword [eax]
vmovss xmm5, dword [eax + 4]
sub ecx, 1
vmovss dword [ebp - 0x14], xmm2
vmovss dword [ebp - 0x18], xmm5
mov dword [ebp - 0x10], ecx
js 0x100123ae
mov eax, dword [esi + 0x3e18]
lea ecx, [eax + ecx*4]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], ecx
nop dword [eax]
nop word [eax + eax]
mov ecx, dword [ecx]
cmp byte [ecx + 0xaa], 0
je 0x10012399
cmp byte [ecx + 0xb1], 0
jne 0x10012399
mov eax, dword [ecx + 0xc]
test eax, 0x200
jne 0x10012396
vmovdqu xmm0, xmmword [ecx + 0x1c0]
vmovdqu xmmword [ebp - 0x30], xmm0
vmovss xmm0, dword [ebp - 0x30]
test eax, 0x1000042
je 0x1001228c
vaddss xmm3, xmm6, dword [ebp - 0x28]
vaddss xmm5, xmm7, dword [ebp - 0x24]
vsubss xmm1, xmm0, xmm6
vmovss xmm0, dword [ebp - 0x2c]
vsubss xmm4, xmm0, xmm7
jmp 0x100122a3
vaddss xmm3, xmm2, dword [ebp - 0x28]
vsubss xmm1, xmm0, xmm2
vmovss xmm0, dword [ebp - 0x2c]
vsubss xmm4, xmm0, xmm5
vaddss xmm5, xmm5, dword [ebp - 0x24]
vmovss xmm2, dword [esi + 0xdb8]
vcomiss xmm2, xmm1
jb 0x1001238c
vmovss xmm0, dword [esi + 0xdbc]
vcomiss xmm0, xmm4
jb 0x1001238c
vcomiss xmm3, xmm2
jbe 0x1001238c
vcomiss xmm5, xmm0
jbe 0x1001238c
movzx eax, word [ecx + 0x230]
test ax, ax
je 0x10012356
movsx eax, word [ecx + 0x234]
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, eax
vaddss xmm1, xmm0, dword [ecx + 0x14]
vcomiss xmm2, xmm1
movsx eax, word [ecx + 0x236]
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, eax
vaddss xmm3, xmm0, dword [ecx + 0x18]
movzx eax, word [ecx + 0x230]
vxorps xmm0, xmm0, xmm0
cwde
vcvtsi2ss xmm0, xmm0, eax
movsx eax, word [ecx + 0x232]
vaddss xmm4, xmm0, xmm1
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, eax
vaddss xmm5, xmm0, xmm3
jb 0x10012356
vmovss xmm0, dword [esi + 0xdbc]
vcomiss xmm0, xmm3
jb 0x10012356
vcomiss xmm4, xmm2
jbe 0x10012356
vcomiss xmm5, xmm0
ja 0x1001238c
test edx, edx
mov eax, ecx
cmovne eax, edx
mov edx, eax
test edi, edi
jne 0x10012384
cmp dword [esi + 0x3e64], edi
je 0x10012382
mov esi, dword [ebp - 0x34]
mov eax, dword [ecx + 0x300]
cmp eax, dword [esi + 0x300]
mov esi, dword [0x1006ef44]
je 0x10012384
mov edi, ecx
test edx, edx
je 0x1001238c
test edi, edi
jne 0x100123ae
vmovss xmm5, dword [ebp - 0x18]
vmovss xmm2, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
dec eax
sub ecx, 4
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], ecx
test eax, eax
jns 0x10012230
mov ecx, dword [ebp - 4]
mov dword [esi + 0x3e60], edi
xor ecx, ebp
pop edi
mov dword [esi + 0x3e5c], edx
pop esi
call fcn.1004c44e
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret