Function at 0x100392b0
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 0x1003fd31
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x44
push esi
mov eax, dword [0x1004b040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [0x1004b8d8]
mov eax, dword [ecx]
mov eax, dword [eax + 0x30]
call eax
mov ecx, dword [0x1004b8e4]
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 0x1003997a
cmp dword [esi + 0x134], 2
jne 0x1003997a
mov ecx, esi
call fcn.10002cc0
test byte [eax], 1
jne 0x1003997a
mov eax, dword fs:[0x2c]
mov ecx, dword [0x1004b66c]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x11db9c90]
cmp eax, dword [ecx + 4]
jle 0x10039391
push 0x11db9c90
call fcn.1003b300
add esp, 4
cmp dword [0x11db9c90], 0xffffffff
jne 0x10039391
mov dword [ebp - 4], 0
mov ecx, dword [0x1004b8d4]
push str.cl_sidespeed
mov eax, dword [ecx]
mov eax, dword [eax + 0x1c]
call eax
push 0x11db9c90
mov dword [0x11db9ca0], eax
call fcn.1003b2af
add esp, 4
mov eax, dword [0x11db9ca0]
movss xmm1, dword [esi + 0xe0]
movss dword [ebp - 0x38], xmm1
movss xmm0, dword [eax + 0x28]
movss dword [ebp - 0x20], xmm0
movss xmm0, dword [esi + 0xe4]
movaps xmm4, xmm0
movss dword [ebp - 0x44], 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 [0x100462a0]
movss dword [ebp - 0x28], xmm3
movss dword [ebp - 0x24], xmm4
sqrtss xmm4, xmm4
comiss xmm0, xmm4
jbe 0x1003940d
ucomiss xmm3, xmm1
lahf
test ah, 0x44
jp 0x1003940d
ucomiss xmm2, xmm1
lahf
test ah, 0x44
jnp 0x1003997a
cmp byte [0x11db9778], 0
movss xmm5, dword [0x10046200]
sete al
mov byte [0x11db9778], al
test al, al
je 0x1003942f
movss dword [ebp - 0x30], xmm5
jmp 0x1003943c
movss xmm0, dword [0x100463c4]
movss dword [ebp - 0x30], xmm0
movq xmm0, qword [esi + 0xc]
ucomiss xmm3, xmm1
movq qword [ebp - 0x54], xmm0
lahf
test ah, 0x44
jp 0x10039462
ucomiss xmm2, xmm1
lahf
test ah, 0x44
jp 0x10039462
movss xmm0, dword [0x11d4ac64]
jmp 0x100394a4
xorps xmm2, xmmword [0x10046490]
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 [0x100462ec]
addss xmm0, dword [0x11d4ac64]
movss dword [0x11d4ac64], xmm0
divss xmm5, xmm4
movss dword [ebp - 0x1c], xmm0
movaps xmm0, xmm5
movss dword [ebp - 0x48], xmm5
mulss xmm0, dword [0x100462bc]
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atanf
mulss xmm0, dword [0x100462ec]
xorps xmm1, xmm1
maxss xmm0, xmm1
minss xmm0, dword [0x10046310]
movss dword [ebp - 0x2c], xmm0
movss xmm0, dword [ebp - 0x1c]
subss xmm0, dword [0x11d4acbc]
comiss xmm0, dword [0x10046334]
movaps xmm3, xmm0
movss dword [ebp - 0x18], xmm0
mulss xmm3, dword [0x1004611c]
movss dword [ebp - 0x14], xmm3
ja 0x1003951d
movss xmm2, dword [0x100463e4]
comiss xmm2, xmm0
ja 0x1003951d
movss dword [ebp - 0x14], xmm0
jmp 0x1003956f
comiss xmm1, xmm3
jbe 0x1003952f
mulss xmm0, dword [0x100463b8]
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 [0x10046364]
jbe 0x10039561
addss xmm1, xmm0
jmp 0x10039565
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 0x100395eb
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll__fdclass
add esp, 4
cmp ax, 1
je 0x100395ed
movss xmm0, dword [ebp - 0x18]
comiss xmm0, dword [0x100463a0]
ja 0x100395ed
movss xmm1, dword [0x100463fc]
comiss xmm1, xmm0
ja 0x100395ed
movss xmm2, dword [0x100463e4]
comiss xmm2, xmm0
movss xmm1, dword [0x10046364]
jbe 0x100395cf
addss xmm0, xmm1
comiss xmm2, xmm0
ja 0x100395c6
movss xmm2, dword [0x10046334]
comiss xmm0, xmm2
jbe 0x100395f0
nop dword [eax]
subss xmm0, xmm1
comiss xmm0, xmm2
ja 0x100395e0
jmp 0x100395f0
fstp st(0)
xorps xmm0, xmm0
movss xmm2, dword [ebp - 0x1c]
xorps xmm1, xmm1
movss xmm3, dword [ebp - 0x2c]
movss dword [0x11d4acbc], xmm2
movaps xmm2, xmm0
andps xmm2, xmmword [0x10046470]
comiss xmm3, xmm2
jae 0x1003963e
comiss xmm2, dword [0x100462d0]
jae 0x1003963e
comiss xmm0, xmm1
ja 0x10039830
comiss xmm1, xmm0
jbe 0x10039899
movss xmm0, dword [ebp - 0x20]
movss dword [esi + 0x1c], xmm0
jmp 0x10039899
movss xmm2, dword [ebp - 0x44]
xorps xmm0, xmm0
movss xmm1, dword [ebp - 0x38]
cvtps2pd xmm2, xmm2
cvtps2pd xmm1, xmm1
ucomisd xmm2, xmm0
lahf
test ah, 0x44
jp 0x10039665
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jnp 0x10039686
movaps xmm0, xmm2
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atan2
mulsd xmm0, qword [0x10046288]
xorps xmm1, xmm1
comisd xmm1, xmm0
jbe 0x10039686
addsd xmm0, qword [0x10046298]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movss xmm0, dword [ebp - 0x1c]
subss xmm0, xmm1
movss dword [ebp - 0x28], xmm1
comiss xmm0, dword [0x10046334]
movaps xmm3, xmm0
movss dword [ebp - 0x14], xmm0
mulss xmm3, dword [0x1004611c]
movss dword [ebp - 0x18], xmm3
ja 0x100396cd
movss xmm1, dword [0x100463e4]
comiss xmm1, xmm0
ja 0x100396cd
movss dword [ebp - 0x18], xmm0
jmp 0x10039722
xorps xmm2, xmm2
comiss xmm2, xmm3
jbe 0x100396e2
mulss xmm0, dword [0x100463b8]
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 [0x10046364]
jbe 0x10039714
addss xmm1, xmm0
jmp 0x10039718
subss xmm1, xmm0
movss dword [ebp - 0x18], xmm1
movss dword [ebp - 0x14], xmm1
fld dword [ebp - 0x18]
fst dword [ebp - 0x44]
movss xmm0, dword [ebp - 0x44]
ucomiss xmm0, xmm0
setp al
cmp al, 1
je 0x100397ab
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll__fdclass
add esp, 4
cmp ax, 1
je 0x100397ad
movss xmm0, dword [ebp - 0x14]
comiss xmm0, dword [0x100463a0]
ja 0x100397ad
movss xmm1, dword [0x100463fc]
comiss xmm1, xmm0
ja 0x100397ad
movss xmm2, dword [0x100463e4]
comiss xmm2, xmm0
movss xmm1, dword [0x10046364]
jbe 0x1003978e
nop dword [eax]
addss xmm0, xmm1
comiss xmm2, xmm0
ja 0x10039780
movss dword [ebp - 0x14], xmm0
movss xmm2, dword [0x10046334]
comiss xmm0, xmm2
jbe 0x100397b5
nop dword [eax + eax]
subss xmm0, xmm1
comiss xmm0, xmm2
ja 0x100397a0
jmp 0x100397b0
fstp st(0)
xorps xmm0, xmm0
movss dword [ebp - 0x14], xmm0
movss xmm0, dword [ebp - 0x48]
mulss xmm0, dword [0x100462d0]
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atanf
mulss xmm0, dword [0x100462ec]
movss xmm2, dword [0x10046310]
movss dword [ebp - 0x48], xmm0
mov eax, dword [ebp - 0x48]
and eax, 0x7f800000
cmp eax, 0x7f800000
je 0x100397fb
comiss xmm0, xmm2
ja 0x100397fb
xorps xmm2, xmm2
comiss xmm2, xmm0
ja 0x100397fb
movaps xmm2, xmm0
mulss xmm2, dword [0x10046130]
movss xmm1, dword [ebp - 0x14]
movss xmm3, dword [0x1004633c]
comiss xmm2, xmm1
movss xmm5, dword [ebp - 0x24]
jae 0x10039843
comiss xmm3, xmm5
jae 0x10039843
movss xmm0, dword [ebp - 0x28]
addss xmm0, xmm2
movss dword [0x11d4ac64], xmm0
movss xmm0, dword [ebp - 0x20]
xorps xmm0, xmmword [0x10046490]
movss dword [esi + 0x1c], xmm0
jmp 0x10039899
movaps xmm0, xmm2
xorps xmm0, xmmword [0x10046490]
comiss xmm1, xmm0
jae 0x10039874
comiss xmm3, xmm5
jae 0x10039874
movss xmm0, dword [ebp - 0x28]
subss xmm0, xmm2
movss dword [0x11d4ac64], xmm0
movss xmm0, dword [ebp - 0x20]
movss dword [esi + 0x1c], xmm0
jmp 0x10039899
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 [0x11d4ac64], xmm0
movss dword [esi + 0x1c], xmm1
movss xmm4, dword [esi + 0x18]
lea ecx, [ebp - 0x40]
movss xmm3, dword [esi + 0x1c]
movss dword [ebp - 0x40], xmm4
movss dword [ebp - 0x3c], xmm3
mov dword [ebp - 0x38], 0
call fcn.10002a30
movss dword [ebp - 0x44], xmm0
xorps xmm2, xmm2
cvtps2pd xmm0, xmm3
cvtps2pd xmm1, xmm4
ucomisd xmm0, xmm2
lahf
test ah, 0x44
jp 0x100398e5
ucomisd xmm1, xmm2
lahf
test ah, 0x44
jp 0x100398e5
movsd qword [ebp - 0x40], xmm2
jmp 0x1003990d
call sub.api_ms_win_crt_math_l1_1_0.dll___libm_sse2_atan2
mulsd xmm0, qword [0x10046288]
xorps xmm1, xmm1
comisd xmm1, xmm0
movsd qword [ebp - 0x40], xmm0
jbe 0x1003990d
addsd xmm0, qword [0x10046298]
movsd qword [ebp - 0x40], xmm0
movss xmm0, dword [esi + 0x10]
addss xmm0, dword [0x10046334]
movss dword [ebp - 0x48], xmm0
fld dword [ebp - 0x48]
fld dword [0x10046364]
call sub.api_ms_win_crt_math_l1_1_0.dll__CIfmod
movsd xmm0, qword [ebp - 0x40]
fstp dword [ebp - 0x48]
movss xmm1, dword [ebp - 0x48]
subss xmm1, dword [0x10046334]
cvtpd2ps xmm0, xmm0
subss xmm1, dword [ebp - 0x50]
addss xmm1, xmm0
mulss xmm1, dword [0x10046138]
movaps xmm0, xmm1
call fcn.1003c0f0
movaps xmm1, xmm0
shufps xmm1, xmm0, 1
mulss xmm1, dword [ebp - 0x44]
mulss xmm0, dword [ebp - 0x44]
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