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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0xb4
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov byte [esp + 0x43], 1
test eax, eax
jne 0x4034b4
lea eax, [esp + 0x43]
mov dword [ebp + 0x10], eax
jmp 0x4034bd
cmp byte [eax], 0
je 0x403933
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
fild qword [esp + 0x50]
push 1
push 0
push 0
fstp qword [esp + 0xa4]
push 0
lea edx, [esp + 0xb4]
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x4035f6
cmp dword [0x4f4d54], 0
je 0x403542
cmp dword [esp + 0xa8], 0x100
jne 0x403560
mov esi, dword [esp + 0xa4]
test esi, esi
je 0x40358f
mov ecx, dword [0x4f4d54]
lea eax, [esp + 0xa4]
push eax
push ecx
call dword [sym.imp.USER32.dll_IsDialogMessageA]
test eax, eax
jne 0x4035d8
push esi
call dword [sym.imp.USER32.dll_GetParent]
mov esi, eax
test esi, esi
jne 0x403516
jmp 0x403560
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x403560
mov edx, dword [ecx]
mov edx, dword [edx + 4]
lea eax, [esp + 0xa4]
push eax
call edx
test al, al
jne 0x4035d8
cmp dword [esp + 0xa8], 0x200
jne 0x40358f
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
push 1
push 0x200
push 0x200
push 0
lea eax, [esp + 0xb4]
push eax
call esi
test eax, eax
jne 0x403573
mov eax, dword [0x4f46fc]
test eax, eax
je 0x4035bc
cmp dword [esp + 0xa4], 0
je 0x4035bc
mov edx, dword [0x4f85bc]
lea ecx, [esp + 0xa4]
push ecx
push eax
push edx
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x4035d8
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0xa4]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push 0
lea edx, [esp + 0xb4]
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x4034f1
mov eax, dword [0x4f8638]
fld dword [0x4902e0]
shr eax, 1
fstp dword [esp + 0x44]
xor bl, bl
xor edi, edi
test eax, eax
jle 0x4037ee
mov ecx, dword [0x4f8634]
mov esi, dword [ecx + edi*4]
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
fild qword [esp + 0x58]
fstp qword [esp + 0x48]
fldz
fld qword [0x4f85a0]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jp 0x40365f
lea eax, [esp + 0x60]
fstp st(0)
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [esp + 0x60]
fdivr qword [0x48b4b0]
fst qword [0x4f85a0]
fld qword [esp + 0x48]
fsub qword [esi + 0x18]
fmulp st(1)
fmul qword [0x490258]
fild dword [esi + 0x20]
fcompp
fnstsw ax
test ah, 0x41
jp 0x403758
mov ecx, dword [0x4f8634]
mov esi, dword [ecx + edi*4]
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
fild qword [esp + 0x68]
fstp qword [esp + 0x48]
fldz
fld qword [0x4f85a0]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jp 0x4036ca
lea eax, [esp + 0x70]
fstp st(0)
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [esp + 0x70]
fdivr qword [0x48b4b0]
fst qword [0x4f85a0]
fld qword [esp + 0x48]
mov edx, dword [esi]
fsub qword [esi + 0x10]
mov eax, dword [edx]
sub esp, 8
mov ecx, esi
fmulp st(1)
fstp qword [esp]
call eax
cmp eax, 0xffffffff
jle 0x4036e9
mov dword [esi + 0x20], eax
cmp eax, 0xfffffffe
je 0x4037ee
cmp eax, 0xffffffff
jne 0x403752
mov ecx, dword [0x4f8634]
mov ecx, dword [ecx + edi*4]
test ecx, ecx
je 0x40370d
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
call eax
mov edx, dword [0x4f8638]
test dl, 1
jne 0x40374c
mov ecx, edx
shr ecx, 1
je 0x40374c
dec ecx
mov eax, edi
cmp edi, ecx
jae 0x40373d
mov edx, dword [0x4f8634]
mov esi, dword [edx + eax*4 + 4]
mov dword [edx + eax*4], esi
inc eax
cmp eax, ecx
jb 0x403725
mov edx, dword [0x4f8638]
shr edx, 1
dec edx
push edx
call fcn.004042d0
mov edx, dword [0x4f8638]
dec edi
jmp 0x4037e3
test eax, eax
jne 0x403758
mov bl, 1
mov ecx, dword [0x4f8634]
mov esi, dword [ecx + edi*4]
lea edx, [esp + 0x78]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
fild qword [esp + 0x78]
fstp qword [esp + 0x48]
fldz
fld qword [0x4f85a0]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jp 0x4037aa
lea eax, [esp + 0x80]
fstp st(0)
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [esp + 0x80]
fdivr qword [0x48b4b0]
fst qword [0x4f85a0]
fild dword [esi + 0x20]
mov edx, dword [0x4f8638]
fld qword [esp + 0x48]
fsub qword [esi + 0x18]
fmulp st(2)
fxch st(1)
fmul qword [0x490258]
fsubp st(1)
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fld dword [esp + 0x44]
fcomp st(1)
fnstsw ax
test ah, 5
jnp 0x4037e1
fstp dword [esp + 0x44]
jmp 0x4037e3
fstp st(0)
inc edi
shr edx, 1
cmp edi, edx
jl 0x403613
cmp dword [esp + 0xa8], 0x12
je 0x403933
cmp byte [0x4f85b8], 0
jne 0x403933
lea ecx, [esp + 0x88]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
fild qword [esp + 0x88]
fstp qword [esp + 0x48]
fldz
fld qword [0x4f85a0]
fucom st(1)
fnstsw ax
fstp st(1)
test ah, 0x44
jp 0x403858
lea edx, [esp + 0x90]
fstp st(0)
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
fild qword [esp + 0x90]
fdivr qword [0x48b4b0]
fst qword [0x4f85a0]
test bl, bl
jne 0x403925
fld qword [esp + 0x48]
fsub qword [esp + 0x98]
fmulp st(1)
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fcomp dword [0x4902dc]
fnstsw ax
test ah, 5
jp 0x403927
mov edx, dword [ebp + 8]
test edx, edx
je 0x403927
fild dword [ebp + 8]
fld dword [esp + 0x44]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x4038ac
call fcn.0045c1c0
mov edx, eax
jmp 0x4038ae
fstp st(0)
mov eax, dword [0x4f8640]
xor ecx, ecx
shr eax, 1
push 0x4ff
cmp ecx, eax
push edx
sbb ecx, ecx
and ecx, dword [0x4f863c]
push 0
push ecx
push eax
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
mov edx, dword [0x4f8640]
shr edx, 1
cmp eax, edx
jae 0x403927
lea esi, [eax*4]
mov eax, dword [0x4f8644]
mov ecx, dword [esi + eax]
mov eax, dword [0x4f863c]
mov edx, dword [ecx]
mov eax, dword [esi + eax]
mov edx, dword [edx + 4]
push eax
call edx
test al, al
jne 0x403927
mov eax, dword [0x4f8648]
shr eax, 1
push eax
push str.RemoveEvent_____d_total_n
call fcn.00402b20
mov ecx, dword [0x4f863c]
mov eax, dword [esi + ecx]
add esp, 8
call fcn.00402f60
jmp 0x403927
fstp st(0)
mov edx, dword [ebp + 0x10]
cmp byte [edx], 0
jne 0x4034bd
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret