Function at 0x1003d030
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc4
mov eax, dword [0x1004e008]
xor eax, esp
mov dword [esp + 0xc0], eax
mov edx, dword [0x1004e0b0]
xorps xmm0, xmm0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0xb0], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0xa0], 0xffffffff
mov dword [esp + 0x5c], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x58], 0xffffffff
mov dword [esp + 0x60], 0xffffffff
mov byte [esp + 0x9c], 1
mov dword [esp + 0xa4], 0
push ebx
push esi
push edi
movups xmmword [esp + 0x4c], xmm0
test edx, edx
je 0x1003d45c
cmp byte [0x10051a10], 0
je 0x1003d45c
cmp byte [0x1004e0b4], 0
jne 0x1003d11b
mov eax, dword [0x10053c3c]
cmp eax, dword [0x10053c40]
je 0x1003d45c
mov dword [0x10053c40], eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.1003dcc3
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10053c40]
sub ecx, dword [0x10053c3c]
sar ecx, 5
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x1003d45c
mov eax, dword [0x10053384]
mov ebx, ecx
add eax, 0xffffffc2
xor eax, 0x60ee542d
movd xmm2, dword [eax + edx]
mov eax, dword [0x100531ac]
cvtdq2ps xmm2, xmm2
mulss xmm2, dword [eax + 0x20]
movss dword [esp + 0x14], xmm2
test ecx, ecx
je 0x1003d45c
mov edx, ecx
shl edx, 5
nop word [eax + eax]
mov esi, dword [0x10053c3c]
sub edx, 0x20
mov dword [esp + 0x18], ebx
dec ebx
mov dword [esp + 0x10], edx
add esi, edx
je 0x1003d450
mov edi, dword [esi + 0x18]
movaps xmm0, xmm2
mov eax, dword [0x100531ac]
movd xmm1, edi
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [eax + 0x20]
subss xmm0, xmm1
call fcn.1002e5c0
comiss xmm0, dword [0x10051bbc]
jbe 0x1003d20f
mov edi, dword [0x10053c40]
lea edx, [esi + 0x20]
cmp edx, edi
je 0x1003d203
lea ecx, [esi + 0x14]
mov eax, dword [edx]
lea ecx, [ecx + 0x20]
mov dword [ecx - 0x34], eax
add edx, 0x20
mov eax, dword [ecx - 0x10]
mov dword [ecx - 0x30], eax
mov eax, dword [ecx - 0xc]
mov dword [ecx - 0x2c], eax
mov eax, dword [ecx - 8]
mov dword [ecx - 0x28], eax
mov eax, dword [ecx - 4]
mov dword [ecx - 0x24], eax
mov eax, dword [ecx]
mov dword [ecx - 0x20], eax
mov eax, dword [ecx + 4]
mov dword [ecx - 0x1c], eax
movzx eax, byte [ecx + 8]
mov byte [ecx - 0x18], al
movzx eax, byte [ecx + 9]
mov byte [ecx - 0x17], al
cmp edx, edi
jne 0x1003d1c3
sub dword [0x10053c40], 0x20
jmp 0x1003d44c
cmp byte [esi + 0x1c], 0
jne 0x1003d450
lea eax, [ecx - 1]
cmp ebx, eax
je 0x1003d233
cmp dword [esp + 0x18], ecx
jae 0x1003d450
cmp edi, dword [esi + 0x38]
je 0x1003d450
movss xmm5, dword [esi]
movss xmm4, dword [esi + 4]
movss xmm6, dword [esi + 0xc]
movss xmm7, dword [esi + 0x10]
subss xmm5, xmm6
movss xmm3, dword [esi + 8]
subss xmm4, xmm7
subss xmm3, dword [esi + 0x14]
movaps xmm1, xmm5
movaps xmm0, xmm4
mulss xmm1, xmm5
mulss xmm0, xmm4
addss xmm0, xmm1
movaps xmm1, xmm3
mulss xmm1, xmm3
addss xmm0, xmm1
call fcn.10023c40
movaps xmm2, xmm0
movaps xmm1, xmm5
addss xmm2, dword [0x10046548]
movaps xmm0, xmm4
mulss xmm1, xmm5
mulss xmm0, xmm4
addss xmm0, xmm1
movaps xmm1, xmm3
mulss xmm1, xmm3
addss xmm0, xmm1
call fcn.10023c40
divss xmm5, xmm2
mov ecx, dword [0x10053188]
push str.sprites_physbeam.vmt
mov eax, dword [ecx]
mov eax, dword [eax + 8]
divss xmm4, xmm2
divss xmm3, xmm2
movss xmm1, dword [esi + 0x14]
mulss xmm5, xmm0
mulss xmm4, xmm0
mulss xmm3, xmm0
addss xmm5, xmm6
addss xmm4, xmm7
movss dword [esp + 0x50], xmm6
movss dword [esp + 0x54], xmm7
addss xmm3, xmm1
movss dword [esp + 0x58], xmm1
movss dword [esp + 0x5c], xmm5
movss dword [esp + 0x60], xmm4
movss dword [esp + 0x64], xmm3
call eax
movaps xmm0, xmmword [0x100469c0]
pxor xmm0, xmmword [0x10046ac0]
mov dword [esp + 0x64], eax
mov eax, 0x10
mov dword [esp + 0x30], 0x5148530b
mov byte [esp + 0x34], 0x25
movups xmmword [esp + 0x20], xmm0
xor byte [esp + eax + 0x20], 0x25
inc eax
cmp eax, 0x15
jb 0x1003d330
cmp byte [esi + 0x1d], 0
lea eax, [esp + 0x20]
movss xmm0, dword [0x10051bbc]
movss dword [esp + 0x78], xmm0
movaps xmm0, xmmword [0x10046670]
mov dword [esp + 0x68], eax
mov dword [esp + 0x74], 0
movups xmmword [esp + 0x7c], xmm0
mov dword [esp + 0x8c], 0x437f0000
mov dword [esp + 0x90], 0x3f000000
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0xac], 2
mov byte [esp + 0xa8], 1
mov dword [esp + 0xb0], 0
jne 0x1003d3e0
mov eax, dword [0x10051ab4]
movzx ecx, al
shr eax, 8
movzx eax, al
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x9c], xmm0
movd xmm0, eax
movzx eax, byte [0x10051ab6]
jmp 0x1003d409
mov eax, dword [0x10051b44]
movzx ecx, al
shr eax, 8
movzx eax, al
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x9c], xmm0
movd xmm0, eax
movzx eax, byte [0x10051b46]
cvtdq2ps xmm0, xmm0
lea ecx, [esp + 0x38]
movss dword [esp + 0xa0], xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esp + 0xa4], xmm0
call fcn.1002c1b0
mov edx, eax
test edx, edx
je 0x1003d446
mov ecx, dword [0x100531dc]
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
mov byte [esi + 0x1c], 1
movss xmm2, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
test ebx, ebx
jne 0x1003d170
mov ecx, dword [esp + 0xcc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1003dcc3
mov esp, ebp
pop ebp
ret