Function at 0x4040db
Capabilities:
Check for time delay via gettickcount
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.0041d7f0
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x53eb30]
xor esi, esi
cmp eax, 0x2710
ja 0x40412d
cmp dword [ebp + 8], esi
jne 0x4041e3
cmp dword [ebp + 0xc], esi
jne 0x404398
cmp dword [ebp + 0x10], esi
jne 0x404398
cmp dword [ebp + 0x14], esi
jne 0x404398
cmp dword [ebp + 0x18], esi
jne 0x404398
mov ebx, 0x433808
push ebx
mov edi, 0x433800
push edi
push esi
push 0x433838
mov esi, 0x4337f0
push esi
call fcn.0040395e
push ebx
push edi
push 0xffffffffffffffff
push 0x433834
push esi
mov dword [0x53eb2c], eax
call fcn.0040395e
push ebx
push edi
push 3
push 0x43382c
push esi
mov dword [0x53eb28], eax
call fcn.0040395e
push ebx
push edi
push 0x200
push 0x433824
push esi
mov dword [0x43c314], eax
call fcn.004038fe
add esp, 0x50
push 0x105
push 0x53ea20
mov dword [0x43c310], eax
call fcn.00403e4b
test byte [0x43c314], 4
pop ecx
pop ecx
je 0x4041cc
push dword [0x53ea18]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4041cc
push eax
push 0x433814
call dword [sym.imp.USER32.dll_FindWindowA]
mov dword [0x53ea18], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp + 8], 0
mov dword [0x53eb30], eax
je 0x404398
xor esi, esi
cmp dword [ebp + 0x14], esi
jne 0x4041f2
mov eax, dword [0x43c314]
mov dword [ebp + 0x14], eax
jmp 0x404219
test byte [ebp + 0x14], 4
je 0x404219
push dword [0x53ea18]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x404219
push esi
push 0x433814
call dword [sym.imp.USER32.dll_FindWindowA]
mov dword [0x53ea18], eax
mov ebx, dword [ebp + 0xc]
test dword [0x53eb2c], ebx
je 0x404398
mov eax, dword [ebp + 0x10]
test dword [0x53eb28], eax
je 0x404398
xor eax, eax
mov byte [ebp - 0x80c], 0
mov ecx, 0x1ff
lea edi, [ebp - 0x80b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov esi, 0x800
push esi
stosb byte es:[edi], al
lea eax, [ebp - 0x80c]
push 0
push eax
call fcn.0041c540
lea eax, [ebp - 0x80c]
push esi
push eax
call fcn.004033bf
lea eax, [ebp - 0x80c]
push esi
push eax
call fcn.00403d18
add esp, 0x1c
push 0x433810
push esi
lea eax, [ebp - 0x80c]
push eax
call fcn.0040338e
push ebx
lea eax, [ebp - 0x80c]
push esi
push eax
call fcn.00403dd1
add esp, 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x80c]
push esi
push eax
call fcn.0040338e
push 0x43380c
push esi
lea eax, [ebp - 0x80c]
push eax
call fcn.0040338e
test byte [ebp + 0x14], 1
je 0x4042ee
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x4042d8
mov eax, 0x53ea20
push dword [0x43c310]
push eax
lea eax, [ebp - 0x80c]
push eax
call fcn.00403b79
add esp, 0xc
test byte [ebp + 0x14], 2
je 0x404301
lea eax, [ebp - 0x80c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test byte [ebp + 0x14], 4
je 0x404398
push dword [0x53ea18]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x404398
mov edi, 0x814
push edi
lea eax, [ebp - 0x1020]
push 0
push eax
call fcn.0041c540
add esp, 0xc
mov dword [ebp - 0x1020], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x101c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x1018], eax
push esi
lea eax, [ebp - 0x80c]
push eax
lea eax, [ebp - 0x100c]
push eax
mov dword [ebp - 0x1014], ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [ebp + 0x10]
and dword [ebp - 0xc], 0
mov dword [ebp - 0x1010], eax
lea eax, [ebp - 0x1020]
mov dword [ebp - 4], eax
lea eax, [ebp - 0xc]
push eax
push 0
push 0x4a
push dword [0x53ea18]
mov dword [ebp - 8], edi
call dword [sym.imp.USER32.dll_SendMessageA]
pop edi
pop esi
pop ebx
leave
ret