Function at 0x40a650
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5effd3
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push esi
push edi
mov eax, dword [0x6b7e40]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x10], ebx
push dword [ebp + 8]
call fcn.0040df30
cmp byte [ebx + 0x48], 0
mov dword [esp + 0x54], eax
je 0x40a8ea
push 0x6c1e34
mov dword [esp + 0x74], vtable.CCriticalSectionAccess.0
mov dword [esp + 0x78], 0x6c1e34
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, 1
mov dword [esp + 0x78], edi
mov dword [esp + 0x98], 0
cmp dword [ebx + 0x4c], 2
jne 0x40a872
sub esp, 0x18
lea ecx, [esp + 0x2c]
mov dword [ebx + 0x4c], 5
call fcn.00412820
lea ecx, [esp + 0x14]
mov byte [esp + 0x98], 1
call fcn.00412a70
mov esi, eax
mov eax, dword [esp + 0x10]
mov ebx, edx
xorps xmm0, xmm0
xor cl, cl
cmp dword [eax + 0x4c], 5
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], ebx
movlpd qword [esp + 0x2c], xmm0
movlpd qword [esp + 0x34], xmm0
mov word [esp + 0x41], 0
jne 0x40a82e
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
jmp 0x40a740
test cl, cl
jne 0x40a7a1
cmp byte [0x6c1e79], cl
je 0x40a780
lea eax, [esp + 0x44]
push eax
call edi
test eax, eax
jne 0x40a764
push str.ERROR:_Performance_Counter_failed
call fcn.005bf45d
add esp, 4
cmp byte [0x6c1e1b], 0
je 0x40a776
lea ecx, [esp + 0x44]
call fcn.00412eb0
mov esi, dword [esp + 0x44]
mov ebx, dword [esp + 0x48]
jmp 0x40a78a
call dword [sym.imp.WINMM.dll_timeGetTime]
mov esi, eax
xor ebx, ebx
cmp ebx, dword [esp + 0x20]
jg 0x40a7a1
jl 0x40a798
cmp esi, dword [esp + 0x1c]
jae 0x40a7a1
lea ecx, [esp + 0x14]
call fcn.00412d90
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
sbb eax, dword [esp + 0x30]
sub ecx, dword [esp + 0x1c]
sbb eax, dword [esp + 0x20]
add ecx, esi
adc eax, ebx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], eax
fild qword [esp + 0x64]
fstp qword [esp + 0x5c]
fld qword [esp + 0x5c]
fstp qword [esp + 0x5c]
movsd xmm0, qword [esp + 0x5c]
mulsd xmm0, qword [0x6c1e70]
addsd xmm0, qword [0x654660]
mulsd xmm0, qword [0x6546c8]
movsd qword [esp + 0x7c], xmm0
fld qword [esp + 0x7c]
call fcn.005c6186
test edx, edx
jg 0x40a82a
jl 0x40a80f
cmp eax, 0x1388
ja 0x40a82a
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x4c], 5
jne 0x40a82a
mov cl, byte [esp + 0x41]
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
jmp 0x40a740
mov edi, dword [esp + 0x78]
mov byte [esp + 0x98], 0
cmp dword [esp + 0x3c], 0
mov dword [esp + 0x14], vtable.CStopwatch.0
je 0x40a86e
push ecx
push str.ABOUT_TO_END_TIMER_LOG
lea ecx, [esp + 0x1c]
call fcn.00412c30
push str._n_n_END_TIMER_LOG__n
push dword [esp + 0x40]
call fcn.005bf336
push dword [esp + 0x44]
call fcn.005be2a2
add esp, 0xc
mov ebx, dword [esp + 0x10]
lea eax, [ebx + 0x1c]
push eax
call fcn.0040f8b0
mov ecx, dword [0x6c2078]
mov esi, eax
cmp esi, ecx
je 0x40a8a8
lea eax, [esi + 0x10]
push eax
lea eax, [ebx + 0x1c]
push eax
call fcn.0040f6d0
mov ecx, dword [0x6c2078]
test al, al
jne 0x40a8a8
mov dword [esp + 0x50], esi
lea eax, [esp + 0x50]
jmp 0x40a8b0
mov dword [esp + 0x58], ecx
lea eax, [esp + 0x58]
mov eax, dword [eax]
cmp eax, ecx
je 0x40a8c9
push eax
lea eax, [esp + 0x8c]
push eax
mov ecx, 0x6c2078
call fcn.0040f3f0
mov dword [esp + 0x98], 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jle 0x40a8ea
push 0x6c1e34
call esi
dec edi
test edi, edi
jg 0x40a8de
push 0
lea ecx, [ebx + 0x1c]
push 0x63bfdc
call fcn.00402090
mov eax, dword [esp + 0x54]
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
mov dword [ebx + 0x38], 0
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x30], 0
mov dword [ebx + 0x34], 0
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4