Function at 0x438230
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
sub esp, 0x24
mov eax, dword [0x4eac74]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov eax, dword [ebp + 0x2a3d8]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
test eax, eax
jns 0x4382bc
cmp eax, 0x88760868
je 0x43873c
cmp eax, 0x88760869
jne 0x43873e
cmp dword [ebp + 0x2a384], 0
je 0x4382a2
mov edi, dword [ebp + 0x2a380]
lea eax, [ebp + 0x430]
mov edx, dword [ebp + 0x2a3d4]
imul ebx, edi, 0x438c
mov esi, dword [edx]
add eax, ebx
push eax
push edi
push edx
call dword [esi + 0x20]
mov eax, dword [ebx + ebp + 0x43c]
mov dword [ebp + 0x2a3a0], eax
mov ecx, ebp
call fcn.004372d0
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.004958e0
add esp, 0x24
ret
cmp dword [0x501658], 0
jne 0x438300
lea eax, [esp + 0x10]
mov dword [0x501658], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov esi, eax
mov dword [0x501668], esi
test esi, esi
je 0x43837f
mov ecx, dword [esp + 0x10]
mov dword [0x501630], ecx
mov ecx, dword [esp + 0x14]
mov dword [0x501634], ecx
jmp 0x438306
mov esi, dword [0x501668]
test esi, esi
je 0x43837f
mov edi, dword [0x501648]
mov eax, edi
mov ebx, dword [0x50164c]
or eax, ebx
je 0x438322
mov ecx, edi
mov edx, ebx
jmp 0x438347
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov esi, dword [0x501668]
mov ebx, dword [0x50164c]
mov edi, dword [0x501648]
sub ecx, dword [0x501640]
sbb edx, dword [0x501644]
call fcn.004b96f0
mov edx, dword [0x501634]
mov ecx, dword [0x501630]
movsd qword [esp + 0x18], xmm0
call fcn.004b96f0
movsd xmm1, qword [esp + 0x18]
divsd xmm1, xmm0
cvtpd2ps xmm0, xmm1
jmp 0x4383d4
movsd xmm0, qword [0x501670]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x4383bc
call dword [sym.imp.WINMM.dll_timeGetTime]
mov esi, dword [0x501668]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4e0250]
mulsd xmm0, qword [0x4dfec8]
subsd xmm0, qword [0x501650]
mov ebx, dword [0x50164c]
mov edi, dword [0x501648]
cvtpd2ps xmm0, xmm0
cmp dword [0x501658], 0
movss dword [esp + 0x10], xmm0
jne 0x438426
lea eax, [esp + 0x18]
mov dword [0x501658], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov esi, eax
mov dword [0x501668], esi
test esi, esi
je 0x43848d
mov eax, dword [esp + 0x18]
mov ebx, dword [0x50164c]
mov edi, dword [0x501648]
mov dword [0x501630], eax
mov eax, dword [esp + 0x1c]
mov dword [0x501634], eax
test esi, esi
je 0x43848d
mov eax, edi
or eax, ebx
jne 0x438443
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ecx, edi
mov edx, ebx
sub ecx, dword [0x501660]
mov dword [0x501660], edi
sbb edx, dword [0x501664]
mov dword [0x501664], ebx
call fcn.004b96f0
mov edx, dword [0x501634]
mov ecx, dword [0x501630]
movsd qword [esp + 0x18], xmm0
call fcn.004b96f0
movsd xmm1, qword [esp + 0x18]
mov esi, dword [sym.imp.WINMM.dll_timeGetTime]
divsd xmm1, xmm0
jmp 0x4384d9
movsd xmm0, qword [0x501670]
xorps xmm1, xmm1
mov esi, dword [sym.imp.WINMM.dll_timeGetTime]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x4384c6
call esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4e0250]
mulsd xmm0, qword [0x4dfec8]
movaps xmm1, xmm0
subsd xmm1, qword [0x501638]
movsd qword [0x501638], xmm0
cvtpd2ps xmm1, xmm1
xorps xmm0, xmm0
ucomiss xmm0, xmm1
lahf
test ah, 0x44
jp 0x438507
cmp dword [ebp + 0x2a390], 0
je 0x438510
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.004958e0
add esp, 0x24
ret
cmp dword [ebp + 0x2a390], 0
jne 0x438519
cmp dword [ebp + 0x2a394], 0
je 0x438549
mov eax, dword [ebp]
mov ecx, ebp
movss xmm0, dword [esp + 0x10]
movss dword [ebp + 0x2a4f8], xmm0
movss dword [ebp + 0x2a4fc], xmm1
call dword [eax + 0x14]
test eax, eax
js 0x43873e
mov dword [ebp + 0x2a394], 0
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x18]
test eax, eax
js 0x43873e
cmp dword [0x501658], 0
jne 0x438596
lea eax, [esp + 0x18]
mov dword [0x501658], 1
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov dword [0x501668], eax
test eax, eax
je 0x4385de
mov ecx, dword [esp + 0x18]
mov dword [0x501630], ecx
mov ecx, dword [esp + 0x1c]
mov dword [0x501634], ecx
jmp 0x43859b
mov eax, dword [0x501668]
test eax, eax
je 0x4385de
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
call fcn.004b96f0
mov edx, dword [0x501634]
mov ecx, dword [0x501630]
movsd qword [esp + 0x18], xmm0
call fcn.004b96f0
movsd xmm1, qword [esp + 0x18]
divsd xmm1, xmm0
cvtpd2ps xmm2, xmm1
jmp 0x438600
call esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4e0250]
mulsd xmm0, qword [0x4dfec8]
cvtpd2ps xmm2, xmm0
mov eax, dword [0x501628]
movaps xmm1, xmm2
subss xmm1, dword [0x501624]
inc eax
mov dword [0x501628], eax
comiss xmm1, dword [0x4dfee0]
jbe case.0x4386f2.72
movd xmm0, eax
lea edx, [esp + 0x18]
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
mov ecx, dword [ebp + 0x2a3d4]
push edx
mov dword [0x501628], 0
push dword [ebp + 0x2a380]
addsd xmm0, qword [eax*8 + 0x4e0250]
push ecx
movss dword [0x501624], xmm2
cvtpd2ps xmm0, xmm0
divss xmm0, xmm1
movss dword [ebp + 0x2a500], xmm0
mov eax, dword [ecx]
call dword [eax + 0x20]
cmp dword [esp + 0x24], 0x16
lea esi, [ebp + 0x2a55e]
movss xmm0, dword [ebp + 0x2a500]
mov ecx, 0x20
mov eax, 0x10
cmove eax, ecx
push eax
push dword [ebp + 0x2a4cc]
cvtps2pd xmm0, xmm0
push dword [ebp + 0x2a4c8]
sub esp, 8
movsd qword [esp], xmm0
push str._.02f_fps___dx_dx_d_
push esi
call fcn.00434370
add esp, 0x1c
cmp dword [ebp + 0x2a58c], 0
je case.0x4386f2.72
imul eax, dword [ebp + 0x2a380], 0x438c
lea ecx, [ebp + 4]
add ecx, eax
imul eax, dword [ecx + 0x4388], 0xca8
add ecx, eax
mov eax, dword [ecx + 0x10dc]
lea eax, [eax + eax*4]
mov eax, dword [ecx + eax*4 + 0x534]
add eax, 0xffffffb9
cmp eax, 9
ja case.0x4386f2.72
jmp dword [eax*4 + 0x438754]
push str.__D16_
jmp 0x438721
push str.__D15S1_
jmp 0x438721
push str.__D24X8_
jmp 0x438721
push str.__D24S8_
jmp 0x438721
push str.__D24X4S4_
jmp 0x438721
push str.__D32_
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp + 0x2a3d8]
push 0
push 0
push 0
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x3c]
xor eax, eax
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004958e0
add esp, 0x24
ret