Function at 0x101223b6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x38
push esi
push edi
xor edi, edi
mov esi, ecx
cmp byte [ebp + 0x10], 0
je 0x10122434
cmp dword [esi], edi
jle 0x1012261d
mov ecx, edi
mov dword [esp + 0x10], edi
mov edx, dword [ebp + 0xc]
mov eax, dword [esi + 4]
push edi
movss xmm0, dword [edx]
addss xmm0, dword [ecx + eax + 0xc]
movss dword [esp + 0x20], xmm0
movss xmm0, dword [ecx + eax + 0x10]
addss xmm0, dword [edx + 4]
movss dword [esp + 0x24], xmm0
movss xmm0, dword [ecx + eax + 0x14]
lea eax, [esp + 0x20]
addss xmm0, dword [edx + 8]
push eax
mov ecx, esi
movss dword [esp + 0x2c], xmm0
call fcn.10122170
mov ecx, dword [esp + 0x10]
inc edi
add ecx, 0x24
mov dword [esp + 0x10], ecx
cmp edi, dword [esi]
jge 0x1012261d
jmp 0x101223d9
mov al, byte [ebp + 8]
cmp al, 2
je 0x101225ac
cmp al, 1
je 0x101225ac
test al, al
jne 0x101225b7
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0x1c]
and dword [esp + 0x1c], edi
and dword [esp + 0x20], edi
push ecx
movss xmm0, dword [eax + 4]
lea ecx, [esp + 0x2c]
xorps xmm0, xmmword [0x101b8030]
push ecx
lea ecx, [esi + 0x1c]
movss dword [esp + 0x2c], xmm0
call sym.gfx.dll_public:_struct_Gfx::Vector3D___thiscall_Gfx::Quaternion::Rotate_struct_Gfx::Vector3D_const__
mov ecx, dword [ebp + 0xc]
movss xmm0, dword [eax]
addss xmm0, dword [ecx]
movss dword [esp + 0x1c], xmm0
movss xmm0, dword [eax + 4]
addss xmm0, dword [ecx + 4]
movss dword [esp + 0x20], xmm0
movss xmm0, dword [eax + 8]
lea eax, [esp + 0x1c]
addss xmm0, dword [ecx + 8]
push eax
mov ecx, esi
movss dword [esp + 0x28], xmm0
call fcn.10122122
xor ecx, ecx
inc ecx
mov dword [esp + 0x10], ecx
cmp dword [esi + 8], ecx
jle 0x101225b7
mov eax, dword [esi + 0xc]
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], edi
cmp dword [esi], edi
jle 0x10122592
mov edx, edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x14], edx
mov eax, dword [esi + 4]
add eax, edx
mov edx, dword [esp + 0x18]
movss xmm1, dword [edx + ecx*8]
movaps xmm0, xmm1
mulss xmm1, dword [eax + 4]
mulss xmm0, dword [eax]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x38]
movss dword [esp + 0x24], xmm1
push eax
movss dword [esp + 0x24], xmm0
movss xmm0, dword [edx + ecx*8 + 4]
lea ecx, [esi + 0x1c]
xorps xmm0, xmmword [0x101b8030]
movss dword [esp + 0x2c], xmm0
call sym.gfx.dll_public:_struct_Gfx::Vector3D___thiscall_Gfx::Quaternion::Rotate_struct_Gfx::Vector3D_const__
movss xmm0, dword [edi]
mov ecx, esi
push dword [esp + 0xc]
addss xmm0, dword [eax]
movss dword [esp + 0x2c], xmm0
movss xmm0, dword [eax + 4]
addss xmm0, dword [edi + 4]
movss dword [esp + 0x30], xmm0
movss xmm0, dword [eax + 8]
lea eax, [esp + 0x2c]
addss xmm0, dword [edi + 8]
push eax
movss dword [esp + 0x38], xmm0
call fcn.10122170
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
inc eax
mov ecx, dword [esp + 0x10]
add edx, 0x24
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], edx
cmp eax, dword [esi]
jl 0x101224e7
xor edi, edi
mov ecx, esi
call fcn.10120c14
mov ecx, dword [esp + 0x10]
inc ecx
mov dword [esp + 0x10], ecx
cmp ecx, dword [esi + 8]
jge 0x101225b7
jmp 0x101224cb
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, esi
call fcn.10122122
cmp dword [esi], edi
jle 0x10122616
mov edx, edi
mov dword [esp + 0x14], edi
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 4]
push edi
movss xmm0, dword [ecx]
addss xmm0, dword [edx + eax + 0xc]
movss dword [esp + 0x2c], xmm0
movss xmm0, dword [eax + edx + 0x10]
addss xmm0, dword [ecx + 4]
movss dword [esp + 0x30], xmm0
movss xmm0, dword [eax + edx + 0x14]
lea eax, [esp + 0x2c]
addss xmm0, dword [ecx + 8]
push eax
mov ecx, esi
movss dword [esp + 0x38], xmm0
call fcn.10122170
mov edx, dword [esp + 0x14]
inc edi
add edx, 0x24
mov dword [esp + 0x14], edx
cmp edi, dword [esi]
jl 0x101225c1
mov ecx, esi
call fcn.10120c14
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc