Function at 0x436920
Capabilities:
Hide graphical window
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x4f2214]
xor eax, dword [ebp + 4]
push esi
mov esi, ecx
mov dword [ebp - 4], eax
mov al, byte [esi + 0x2f1]
test al, al
jne 0x436c0a
push edi
call fcn.004327f0
mov ecx, esi
call fcn.004326e0
mov eax, dword [esi + 0x2fc]
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [esi + 0x2fc]
push ecx
call dword [sym.imp.USER32.dll_SetFocus]
push 1
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
mov dword [ebp - 8], 0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edi, eax
mov al, byte [esi + 0x2f1]
test al, al
mov dword [ebp - 0xc], edi
mov byte [esi + 0x4bb], 1
mov dword [esi + 0x46c], edi
mov dword [esi + 0x470], edi
mov dword [esi + 0x3dc], edi
jne 0x436a2e
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
push ebx
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
lea esp, [esp]
push 1
push 0
push 0
push 0
lea edx, [ebp - 0x28]
push edx
call edi
test eax, eax
je 0x4369fe
mov al, byte [esi + 0x2f1]
test al, al
jne 0x4369fe
lea eax, [ebp - 0x28]
push eax
call ebx
lea ecx, [ebp - 0x28]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push 0
lea edx, [ebp - 0x28]
push edx
call edi
test eax, eax
jne 0x4369d2
mov ecx, esi
call fcn.004322e0
mov ecx, esi
call fcn.00435dc0
mov al, byte [esi + 0x2f1]
test al, al
jne 0x436a2a
inc dword [ebp - 8]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
mov al, byte [esi + 0x2f1]
test al, al
je 0x4369c0
mov edi, dword [ebp - 0xc]
pop ebx
mov ecx, esi
call fcn.004366b0
mov ecx, esi
mov byte [esi + 0x4bb], 0
call fcn.00431d60
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, edi
test eax, eax
mov dword [ebp - 0xc], eax
fild dword [ebp - 0xc]
jge 0x436a5b
fadd qword [0x4c6190]
fmul qword [0x4c6188]
sub esp, 8
lea ecx, [ebp - 0x128]
fstp qword [esp]
push str.Seconds_________g_r_n
push ecx
call fcn.004a808e
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x10
lea edx, [ebp - 0x128]
push edx
call edi
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 0x128]
push str.Count___________d_r_n
push ecx
call fcn.004a808e
add esp, 0xc
lea edx, [ebp - 0x128]
push edx
call edi
mov eax, dword [esi + 0x474]
push eax
lea ecx, [ebp - 0x128]
push str.Sleep_Count_____d_r_n
push ecx
call fcn.004a808e
add esp, 0xc
lea edx, [ebp - 0x128]
push edx
call edi
mov eax, dword [esi + 0x47c]
push eax
lea ecx, [ebp - 0x128]
push str.Update_Count____d_r_n
push ecx
call fcn.004a808e
add esp, 0xc
lea edx, [ebp - 0x128]
push edx
call edi
mov eax, dword [esi + 0x478]
push eax
lea ecx, [ebp - 0x128]
push str.Draw_Count______d_r_n
push ecx
call fcn.004a808e
add esp, 0xc
lea edx, [ebp - 0x128]
push edx
call edi
mov eax, dword [esi + 0x4c0]
push eax
lea ecx, [ebp - 0x128]
push str.Draw_Time_______d_r_n
push ecx
call fcn.004a808e
add esp, 0xc
lea edx, [ebp - 0x128]
push edx
call edi
mov eax, dword [esi + 0x4dc]
push eax
lea ecx, [ebp - 0x128]
push str.Screen_Blt______d_r_n
push ecx
call fcn.004a808e
add esp, 0xc
lea edx, [ebp - 0x128]
push edx
call edi
mov eax, dword [esi + 0x4c0]
mov ecx, dword [esi + 0x4dc]
add ecx, eax
test ecx, ecx
jle 0x436b9e
mov eax, dword [esi + 0x478]
imul eax, eax, 0x3e8
cdq
idiv ecx
lea edx, [ebp - 0x128]
push eax
push str.Avg_FPS_________d_r_n
push edx
call fcn.004a808e
add esp, 0xc
lea eax, [ebp - 0x128]
push eax
call edi
push 1
call dword [sym.imp.WINMM.dll_timeEndPeriod]
mov al, byte [esi + 0x2d9]
test al, al
pop edi
jne 0x436c03
mov al, byte [esi + 0x43c]
test al, al
je 0x436bca
mov ecx, dword [esi + 0xd0]
call fcn.00446a20
test al, al
je 0x436bdd
call fcn.00445ff0
and eax, 0x80000001
jns 0x436bdb
dec eax
or eax, 0xfffffffe
inc eax
je 0x436bf8
mov al, byte [esi + 0x43c]
test al, al
je 0x436c03
call fcn.00445ff0
cdq
mov ecx, 0xa
idiv ecx
test edx, edx
jne 0x436c03
mov ecx, dword [esi + 0xd0]
call fcn.00446a60
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x40]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
call fcn.004a8117
mov esp, ebp
pop ebp
ret