Function at 0x407db0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x854e70
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x8943b8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, 0x89ff90
mov dword [ebp - 0x124], esi
call fcn.00419460
xor ebx, ebx
push ebx
mov dword [ebp - 0x11c], eax
lea eax, [ebp - 0x120]
push ebx
push eax
call fcn.0082198e
add esp, 0xc
push 0x300
lea ecx, [ebp - 0x120]
push 0x200
push ecx
call fcn.0082198e
add esp, 0xc
mov dword [ebp - 4], ebx
cmp byte [esi + 0x4c], 0
je 0x408075
mov edi, dword [esi + 0x38]
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, edi
cmp eax, 0x3e8
jb 0x407e9e
mov edx, dword [esi + 0x34]
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x48]
add edi, 0x3e8
cmp byte [esi + 0x2e], 0
mov dword [esi + 0x30], edx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], ecx
mov dword [esi + 0x38], edi
mov dword [esi + 0x34], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], ebx
je 0x407e9e
mov edx, ecx
mov ecx, dword [esi + 0x30]
push edx
push eax
push ecx
push 0x871030
lea edx, [ebp - 0x118]
push str._s____Game:_dFPS____Draw:_d_dFPS
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esi]
add esp, 0x18
lea eax, [ebp - 0x118]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
cmp byte [esi + 0x29], 0
je 0x407f11
call fcn.0040d9a0
mov eax, dword [0x8a01a0]
cmp eax, ebx
je 0x407ee8
mov edx, dword [eax]
push 0x8a01b8
push 0x100
push eax
mov eax, dword [edx + 0x24]
call eax
cmp eax, ebx
jge 0x407ee8
mov eax, dword [0x8a01a0]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push eax
call edx
push 0x100
push ebx
push 0x8a01b8
call fcn.008201b0
add esp, 0xc
mov eax, dword [0x8a01a4]
cmp eax, ebx
je 0x407f11
mov ecx, dword [eax]
mov edx, dword [ecx + 0x24]
push 0x8a02dc
push 0x14
push eax
call edx
cmp eax, ebx
jge 0x407f11
mov eax, dword [0x8a01a4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push eax
call edx
mov ecx, dword [esi + 0x74]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov eax, dword [esi + 0xb4]
cmp eax, dword [esi + 0xb0]
mov ecx, dword [esi + 0x78]
jne 0x407f89
cmp ecx, ebx
je 0x407f37
mov edx, dword [ecx]
mov eax, dword [edx + 8]
call eax
mov ecx, dword [esi + 0x7c]
cmp ecx, ebx
je 0x407f5a
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
cmp eax, 0xffffffff
mov dword [esi + 0xb0], eax
jne 0x407f56
mov byte [esi + 0x4c], 0
jmp 0x407f9d
add dword [esi + 0x34], 1
mov ecx, dword [esi + 0xb0]
cmp ecx, dword [esi + 0xb4]
je 0x407f9d
lea edi, [esi + 0x64]
mov ecx, edi
call fcn.00414d30
lea edx, [edi + 4]
push edx
push ebx
push ebx
push 0x408410
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [edi], eax
jmp 0x407f9d
cmp ecx, ebx
je 0x407f98
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
test al, al
je 0x407f9d
call fcn.00407c50
cmp byte [esi + 0x2d], 0
jne 0x408052
cmp byte [0x896b76], 0
jne 0x408048
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x8a0e14
call edi
push 0x8a0e14
mov byte [0x896b76], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esi + 0x7c]
cmp ecx, ebx
je 0x407fe7
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
and al, 1
mov bl, al
jmp 0x407fe9
xor bl, bl
mov ecx, dword [esi + 0x74]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
mov ecx, dword [esi + 0x78]
and bl, al
test ecx, ecx
je 0x408005
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
and bl, al
test bl, bl
je 0x408052
push 0x8a0e14
call edi
push 0x8a0e14
mov byte [0x896b76], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00401060
test al, al
je 0x408042
mov edx, dword [ebp - 0x11c]
add dword [esi + 0x44], 1
push edx
call fcn.004195e0
xor ebx, ebx
jmp 0x407e26
mov eax, dword [esi + 0x60]
push eax
jmp 0x40804c
mov ecx, dword [esi + 0x60]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp - 0x11c]
push edx
call fcn.004195e0
xor ebx, ebx
jmp 0x407e26
push 0xffffffffffffffff
lea ecx, [ebp - 0x120]
push 0x9001f
push ecx
call fcn.0082198e
mov edx, dword [ebp - 0x11c]
add esp, 0xc
push edx
call fcn.00419510
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0081fb35
mov esp, ebp
pop ebp
ret