Function at 0x1003a570
Capabilities:
Access peb ldr_data

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100410a1
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x4c
push esi
mov eax, dword [0x1004c040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [0x1004c8e0]
mov eax, dword [ecx]
mov eax, dword [eax + 0x30]
call eax
mov ecx, dword [0x1004c8ec]
push eax
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
mov esi, eax
mov ecx, esi
call fcn.10002cc0
test byte [eax], 1
jne 0x1003ac2b
cmp dword [esi + 0x134], 2
jne 0x1003ac2b
mov ecx, esi
call fcn.10002cc0
test byte [eax], 1
jne 0x1003ac2b
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1004c66c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x11dbabcc]
cmp eax, dword [ecx + 4]
jle 0x1003a651
push 0x11dbabcc
call fcn.1003c5b0
add esp, 4
cmp dword [0x11dbabcc], 0xffffffff
jne 0x1003a651
mov dword [ebp - 4], 0
mov ecx, dword [0x1004c8dc]
push str.cl_sidespeed
mov eax, dword [ecx]
mov eax, dword [eax + 0x1c]
call eax
push 0x11dbabcc
mov dword [0x11dbabdc], eax
call fcn.1003c55f
add esp, 4
mov eax, dword [0x11dbabdc]
movss xmm1, dword [esi + 0xe0]
movss dword [ebp - 0x34], xmm1
movss xmm0, dword [eax + 0x28]
movss dword [ebp - 0x20], xmm0
movss xmm0, dword [esi + 0xe4]
movaps xmm4, xmm0
movss dword [ebp - 0x40], xmm0
mulss xmm4, xmm0
movaps xmm0, xmm1
mov esi, dword [ebx + 8]
mulss xmm0, xmm1
xorps xmm1, xmm1
movss xmm3, dword [esi + 0x18]
addss xmm4, xmm0
movss xmm2, dword [esi + 0x1c]
movss xmm0, dword [0x100473e8]
movss dword [ebp - 0x28], xmm3
movss dword [ebp - 0x24], xmm4
sqrtss xmm4, xmm4
comiss xmm0, xmm4
jbe 0x1003a6cd
ucomiss xmm3, xmm1
lahf
test ah, 0x44
jp 0x1003a6cd
ucomiss xmm2, xmm1
lahf
test ah, 0x44
jnp 0x1003ac2b
cmp byte [0x11dba7a0], 0
movss xmm5, dword [0x10047348]
sete al
mov byte [0x11dba7a0], al
test al, al
je 0x1003a6ef
movss dword [ebp - 0x30], xmm5
jmp 0x1003a6fc
movss xmm0, dword [0x100474fc]
movss dword [ebp - 0x30], xmm0
movq xmm0, qword [esi + 0xc]
ucomiss xmm3, xmm1
movq qword [ebp - 0x58], xmm0
lahf
test ah, 0x44
jp 0x1003a722
ucomiss xmm2, xmm1
lahf
test ah, 0x44
jp 0x1003a722
movss xmm0, dword [0x11d4bc8c]
jmp 0x1003a764
xorps xmm2, xmmword [0x100475d0]
movss dword [ebp - 0x2c], xmm2
fld dword [ebp - 0x2c]
fld dword [ebp - 0x28]
fpatan
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
fstp dword [ebp - 0x2c]
movss xmm0, dword [ebp - 0x2c]
mulss xmm0, dword [0x10047434]
addss xmm0, dword [0x11d4bc8c]
movss dword [0x11d4bc8c], xmm0
divss xmm5, xmm4
movss dword [ebp - 0x1c], xmm0
movaps xmm0, xmm5
movss dword [ebp - 0x4c], xmm5
mulss xmm0, dword [0x10047404]
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atanf
mulss xmm0, dword [0x10047434]
xorps xmm1, xmm1
maxss xmm0, xmm1
minss xmm0, dword [0x10047450]
movss dword [ebp - 0x2c], xmm0
movss xmm0, dword [ebp - 0x1c]
subss xmm0, dword [0x11d4bce4]
comiss xmm0, dword [0x10047474]
movaps xmm3, xmm0
movss dword [ebp - 0x18], xmm0
mulss xmm3, dword [0x10047264]
movss dword [ebp - 0x14], xmm3
ja 0x1003a7dd
movss xmm2, dword [0x1004751c]
comiss xmm2, xmm0
ja 0x1003a7dd
movss dword [ebp - 0x14], xmm0
jmp 0x1003a82f
comiss xmm1, xmm3
jbe 0x1003a7ef
mulss xmm0, dword [0x100474f0]
movss dword [ebp - 0x14], xmm0
fld dword [ebp - 0x14]
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movss xmm1, dword [ebp - 0x18]
xorps xmm2, xmm2
fstp dword [ebp - 0x14]
movss xmm0, dword [ebp - 0x14]
add esp, 4
comiss xmm2, xmm1
mulss xmm0, dword [0x100474a0]
jbe 0x1003a821
addss xmm1, xmm0
jmp 0x1003a825
subss xmm1, xmm0
movss dword [ebp - 0x14], xmm1
movss dword [ebp - 0x18], xmm1
fld dword [ebp - 0x14]
fst dword [ebp - 0x28]
movss xmm0, dword [ebp - 0x28]
ucomiss xmm0, xmm0
setp al
cmp al, 1
je 0x1003a8ab
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll__fdclass
add esp, 4
cmp ax, 1
je 0x1003a8ad
movss xmm0, dword [ebp - 0x18]
comiss xmm0, dword [0x100474d8]
ja 0x1003a8ad
movss xmm1, dword [0x10047534]
comiss xmm1, xmm0
ja 0x1003a8ad
movss xmm2, dword [0x1004751c]
comiss xmm2, xmm0
movss xmm1, dword [0x100474a0]
jbe 0x1003a88f
addss xmm0, xmm1
comiss xmm2, xmm0
ja 0x1003a886
movss xmm2, dword [0x10047474]
comiss xmm0, xmm2
jbe 0x1003a8b0
nop dword [eax]
subss xmm0, xmm1
comiss xmm0, xmm2
ja 0x1003a8a0
jmp 0x1003a8b0
fstp st(0)
xorps xmm0, xmm0
movss xmm2, dword [ebp - 0x1c]
xorps xmm1, xmm1
movss xmm3, dword [ebp - 0x2c]
movss dword [0x11d4bce4], xmm2
movaps xmm2, xmm0
andps xmm2, xmmword [0x100475b0]
comiss xmm3, xmm2
jae 0x1003a8fe
comiss xmm2, dword [0x10047418]
jae 0x1003a8fe
comiss xmm0, xmm1
ja 0x1003aaf0
comiss xmm1, xmm0
jbe 0x1003ab59
movss xmm0, dword [ebp - 0x20]
movss dword [esi + 0x1c], xmm0
jmp 0x1003ab59
movss xmm2, dword [ebp - 0x40]
xorps xmm0, xmm0
movss xmm1, dword [ebp - 0x34]
cvtps2pd xmm2, xmm2
cvtps2pd xmm1, xmm1
ucomisd xmm2, xmm0
lahf
test ah, 0x44
jp 0x1003a925
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x1003a946
movaps xmm0, xmm2
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atan2
mulsd xmm0, qword [0x100473d0]
xorps xmm1, xmm1
comisd xmm1, xmm0
jbe 0x1003a946
addsd xmm0, qword [0x100473e0]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movss xmm0, dword [ebp - 0x1c]
subss xmm0, xmm1
movss dword [ebp - 0x28], xmm1
comiss xmm0, dword [0x10047474]
movaps xmm3, xmm0
movss dword [ebp - 0x14], xmm0
mulss xmm3, dword [0x10047264]
movss dword [ebp - 0x18], xmm3
ja 0x1003a98d
movss xmm1, dword [0x1004751c]
comiss xmm1, xmm0
ja 0x1003a98d
movss dword [ebp - 0x18], xmm0
jmp 0x1003a9e2
xorps xmm2, xmm2
comiss xmm2, xmm3
jbe 0x1003a9a2
mulss xmm0, dword [0x100474f0]
movss dword [ebp - 0x18], xmm0
fld dword [ebp - 0x18]
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movss xmm1, dword [ebp - 0x14]
xorps xmm0, xmm0
fstp dword [ebp - 0x18]
add esp, 4
comiss xmm0, xmm1
movss xmm0, dword [ebp - 0x18]
mulss xmm0, dword [0x100474a0]
jbe 0x1003a9d4
addss xmm1, xmm0
jmp 0x1003a9d8
subss xmm1, xmm0
movss dword [ebp - 0x18], xmm1
movss dword [ebp - 0x14], xmm1
fld dword [ebp - 0x18]
fst dword [ebp - 0x40]
movss xmm0, dword [ebp - 0x40]
ucomiss xmm0, xmm0
setp al
cmp al, 1
je 0x1003aa6b
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll__fdclass
add esp, 4
cmp ax, 1
je 0x1003aa6d
movss xmm0, dword [ebp - 0x14]
comiss xmm0, dword [0x100474d8]
ja 0x1003aa6d
movss xmm1, dword [0x10047534]
comiss xmm1, xmm0
ja 0x1003aa6d
movss xmm2, dword [0x1004751c]
comiss xmm2, xmm0
movss xmm1, dword [0x100474a0]
jbe 0x1003aa4e
nop dword [eax]
addss xmm0, xmm1
comiss xmm2, xmm0
ja 0x1003aa40
movss dword [ebp - 0x14], xmm0
movss xmm2, dword [0x10047474]
comiss xmm0, xmm2
jbe 0x1003aa75
nop dword [eax + eax]
subss xmm0, xmm1
comiss xmm0, xmm2
ja 0x1003aa60
jmp 0x1003aa70
fstp st(0)
xorps xmm0, xmm0
movss dword [ebp - 0x14], xmm0
movss xmm0, dword [ebp - 0x4c]
mulss xmm0, dword [0x10047418]
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atanf
mulss xmm0, dword [0x10047434]
movss xmm2, dword [0x10047450]
movss dword [ebp - 0x4c], xmm0
mov eax, dword [ebp - 0x4c]
and eax, 0x7f800000
cmp eax, 0x7f800000
je 0x1003aabb
comiss xmm0, xmm2
ja 0x1003aabb
xorps xmm2, xmm2
comiss xmm2, xmm0
ja 0x1003aabb
movaps xmm2, xmm0
mulss xmm2, dword [0x10047278]
movss xmm1, dword [ebp - 0x14]
movss xmm3, dword [0x1004747c]
comiss xmm2, xmm1
movss xmm5, dword [ebp - 0x24]
jae 0x1003ab03
comiss xmm3, xmm5
jae 0x1003ab03
movss xmm0, dword [ebp - 0x28]
addss xmm0, xmm2
movss dword [0x11d4bc8c], xmm0
movss xmm0, dword [ebp - 0x20]
xorps xmm0, xmmword [0x100475d0]
movss dword [esi + 0x1c], xmm0
jmp 0x1003ab59
movaps xmm0, xmm2
xorps xmm0, xmmword [0x100475d0]
comiss xmm1, xmm0
jae 0x1003ab34
comiss xmm3, xmm5
jae 0x1003ab34
movss xmm0, dword [ebp - 0x28]
subss xmm0, xmm2
movss dword [0x11d4bc8c], xmm0
movss xmm0, dword [ebp - 0x20]
movss dword [esi + 0x1c], xmm0
jmp 0x1003ab59
movss xmm1, dword [ebp - 0x30]
movss xmm0, dword [ebp - 0x2c]
mulss xmm0, xmm1
mulss xmm1, dword [ebp - 0x20]
addss xmm0, dword [ebp - 0x1c]
movss dword [0x11d4bc8c], xmm0
movss dword [esi + 0x1c], xmm1
movss xmm4, dword [esi + 0x18]
lea ecx, [ebp - 0x48]
movss xmm3, dword [esi + 0x1c]
movss dword [ebp - 0x48], xmm4
movss dword [ebp - 0x44], xmm3
mov dword [ebp - 0x40], 0
call fcn.10002a30
movss dword [ebp - 0x4c], xmm0
xorps xmm2, xmm2
cvtps2pd xmm0, xmm3
cvtps2pd xmm1, xmm4
ucomisd xmm0, xmm2
lahf
test ah, 0x44
jp 0x1003aba5
ucomisd xmm1, xmm2
lahf
test ah, 0x44
jp 0x1003aba5
movsd qword [ebp - 0x48], xmm2
jmp 0x1003abcd
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atan2
mulsd xmm0, qword [0x100473d0]
xorps xmm1, xmm1
comisd xmm1, xmm0
movsd qword [ebp - 0x48], xmm0
jbe 0x1003abcd
addsd xmm0, qword [0x100473e0]
movsd qword [ebp - 0x48], xmm0
movss xmm0, dword [esi + 0x10]
addss xmm0, dword [0x10047474]
call fcn.1002b4e0
movsd xmm1, qword [ebp - 0x48]
movaps xmm2, xmm0
subss xmm2, dword [0x10047474]
cvtpd2ps xmm1, xmm1
subss xmm2, dword [ebp - 0x54]
xorps xmm0, xmm0
addss xmm2, xmm1
mulss xmm2, dword [0x10047280]
movss xmm0, xmm2
call fcn.1003d3a0
movaps xmm1, xmm0
shufps xmm1, xmm0, 1
mulss xmm1, dword [ebp - 0x4c]
mulss xmm0, dword [ebp - 0x4c]
movss dword [esi + 0x18], xmm1
movss dword [esi + 0x1c], xmm0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4