Function at 0x401643
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xcc
mov eax, dword [0x443040]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [esp + 0x1c]
push esi
push edi
push eax
push 0x20019
push 0
push 0x440ac8
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4018dd
push 0xa
pop ecx
lea eax, [esp + 0xac]
mov dword [esp + 0x38], 0x4014cb
mov esi, str.Sample_Window_Class
mov dword [esp + 0x58], eax
lea edi, [esp + 0xac]
mov dword [esp + 0x44], ebx
rep movsd dword es:[edi], dword [esi]
xorps xmm0, xmm0
lea eax, [esp + 0x34]
xor esi, esi
movlpd qword [esp + 0x3c], xmm0
push eax
mov dword [esp + 0x38], esi
movlpd qword [esp + 0x4c], xmm0
movlpd qword [esp + 0x54], xmm0
call dword [sym.imp.USER32.dll_RegisterClassW]
push esi
push ebx
push esi
push esi
push 0x3e8
push 0x578
mov eax, 0x80000000
push eax
push eax
push eax
push str.Sample_Window
lea eax, [esp + 0xd4]
push eax
push 8
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov edi, eax
lea eax, [esp + 0x5c]
push eax
mov dword [esp + 0x28], edi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [esp + 0x64]
lea eax, [esp + 0x6c]
mov esi, dword [esp + 0x68]
sub ebx, dword [esp + 0x5c]
sub esi, dword [esp + 0x60]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [esp + 0x78]
sub ecx, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
sub esi, ecx
sub edi, dword [esp + 0x6c]
mov eax, esi
push 0x1d
cdq
sub ebx, edi
push ecx
sub eax, edx
sar eax, 1
push edi
push eax
mov eax, ebx
mov ebx, dword [esp + 0x34]
cdq
sub eax, edx
sar eax, 1
push eax
push 0xffffffffffffffff
push ebx
call dword [sym.imp.USER32.dll_SetWindowPos]
push dword [ebp + 0x14]
push ebx
call dword [sym.imp.USER32.dll_ShowWindow]
push 7
pop ecx
xor eax, eax
lea edi, [esp + 0x90]
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x24], eax
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], esi
jmp 0x4017a1
mov esi, dword [esp + 0x14]
cmp dword [0x443920], 0
jl 0x4018b1
push 1
xor eax, eax
push eax
push eax
push eax
lea eax, [esp + 0xa0]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x4017e3
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x90]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov esi, dword [esp + 0x84]
mov edi, dword [esp + 0x88]
sub esi, dword [esp + 0x7c]
sub edi, dword [esp + 0x80]
call fcn.00408890
cdq
idiv esi
mov esi, edx
call fcn.00408890
cdq
idiv edi
push edx
push esi
call dword [sym.imp.USER32.dll_SetCursorPos]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [esp + 0x10]
mov esi, eax
mov ecx, esi
sub ecx, dword [esp + 0x24]
cmp ecx, 0x3e8
jb 0x40179d
mov ecx, dword [0x443920]
dec ecx
mov dword [0x443920], ecx
cmp ecx, 0xffffffff
jne 0x401899
xor edi, edi
push edi
push ebx
call dword [sym.imp.USER32.dll_ShowWindow]
lea eax, [esp + 0x8c]
push eax
lea eax, [esp + 0x2c]
push eax
push edi
push 0x20006
push edi
push edi
push edi
push 0x440ac8
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
call fcn.00401297
mov edi, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edi
jmp 0x40189d
mov edi, dword [esp + 0x10]
push 1
push 0
push ebx
mov dword [esp + 0x30], esi
call dword [sym.imp.USER32.dll_InvalidateRect]
jmp 0x40179d
call fcn.00401f30
push 0
push 0x989680
push edx
push eax
call fcn.00431ec0
sub eax, esi
sbb edx, edi
jne 0x4018d3
cmp eax, 0x3c
jb 0x4017a1
call fcn.0040121a
jmp 0x4017a1
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.0040160e
int3