Function at 0x40e810
Capabilities:
Check for time delay via gettickcount
Create thread

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov ebx, edx
mov esi, eax
cmp byte [0x4947ff], 0
jne 0x40eac6
cmp byte [0x498d22], 0
jne 0x40eac6
mov byte [0x49484a], 0
cmp byte [0x4947b5], 0
je 0x40e922
mov al, byte [0x494825]
mov byte [0x494826], al
mov eax, dword [0x494944]
mov dword [0x494948], eax
mov al, byte [0x49484a]
mov byte [0x494849], al
cmp byte [0x4947b8], 0
jne 0x40e89a
mov byte [0x4947b6], 1
mov al, byte [0x494845]
mov byte [0x494827], al
cmp esi, 0x499ee8
je 0x40e8a1
mov edx, 0x499e9c
mov eax, 0x499ee8
call fcn.00405c48
jmp 0x40e8a1
mov byte [0x4947b8], 0
mov eax, 0x499e9c
mov edx, esi
call fcn.00405c48
push esi
mov eax, dword [0x49a18c]
push eax
call sub.user32.dll_SetWindowTextA
mov eax, ebx
and al, 2
mov dl, byte [0x494826]
and dl, 2
cmp al, dl
je 0x40e8f2
mov eax, ebx
and al, 2
cmp al, 2
sete al
and eax, 0x7f
or eax, 0
push eax
push 0xf060
push 0
mov eax, dword [0x49a18c]
push eax
call sub.user32.dll_GetSystemMenu
push eax
call sub.user32.dll_EnableMenuItem
mov eax, ebx
and al, 1
mov dl, byte [0x494826]
and dl, 1
cmp al, dl
je 0x40e917
cmp al, 1
jne 0x40e910
xor eax, eax
call fcn.0040e6d4
jmp 0x40e917
mov al, 1
call fcn.0040e6d4
mov byte [0x494825], bl
jmp 0x40ea90
mov byte [0x494844], 0
mov byte [0x494845], 0
mov eax, 0x499e9c
mov edx, esi
call fcn.00405c48
mov edi, 0x480000
lea edx, [esp + 4]
lea eax, [esp + 6]
call fcn.0040e7b0
push 0
mov eax, dword [0x48e700]
push eax
push 0
mov eax, dword [0x49a1b4]
push eax
movsx eax, word [esp + 0x14]
push eax
movsx ebp, word [esp + 0x1a]
push ebp
mov eax, dword [0x4948d4]
sar eax, 1
jns 0x40e976
adc eax, 0
movsx edx, word [esp + 0x1c]
sar edx, 1
jns 0x40e982
adc edx, 0
sub eax, edx
sub eax, 0xf
push eax
mov eax, dword [0x4948d0]
sar eax, 1
jns 0x40e994
adc eax, 0
sar ebp, 1
jns 0x40e99b
adc ebp, 0
sub eax, ebp
push eax
push edi
push esi
mov eax, dword [0x48d908]
push eax
push 0x80
call sub.user32.dll_CreateWindowExA
mov dword [0x49a18c], eax
cmp byte [0x493641], 0
je 0x40ea0a
test bl, 1
jne 0x40ea0a
push 0
mov eax, dword [0x48e700]
push eax
push 0
mov eax, dword [0x49a18c]
push eax
push 0x16
movsx eax, word [esp + 0x1a]
sub eax, 0x20
sub eax, 0x19
xor edx, edx
mov dl, byte [0x4947fc]
lea edx, [edx + edx*4]
sub eax, edx
push eax
push 0xc
push 0xd
push 0x50000000
push 0
push 0x40ead0
push 0
call sub.user32.dll_CreateWindowExA
mov dword [0x49a194], eax
push esp
push 0
push 0
push fcn.0040e784
push 0x10000
push 0
call sub.kernel32.dll_CreateThread
mov dword [0x4947d8], eax
push 1
mov eax, dword [0x4947d8]
push eax
call sub.kernel32.dll_SetThreadPriority
mov byte [0x4947ec], 0
mov byte [0x4947b5], 1
mov byte [0x4947b6], 0
mov eax, ebx
and al, 2
cmp al, 2
jne 0x40ea69
push 2
push 0xf060
push 0
mov eax, dword [0x49a18c]
push eax
call sub.user32.dll_GetSystemMenu
push eax
call sub.user32.dll_EnableMenuItem
test bl, 1
jne 0x40ea75
mov al, 1
call fcn.0040e6d4
mov byte [0x494826], 0
mov byte [0x494825], bl
xor eax, eax
mov dword [0x494948], eax
mov byte [0x494849], 0
call sub.kernel32.dll_GetTickCount
mov dword [0x494944], eax
mov eax, dword [0x494944]
mov dword [0x494960], eax
mov byte [0x494964], 0
xor eax, eax
mov dword [0x494940], eax
push 0
push 0x9c4
push 1
mov eax, dword [0x49a18c]
push eax
call sub.user32.dll_SetTimer
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret