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

Disassembly:
sub esp, 0x34
push esi
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [0x18053788]
mov ecx, dword [0x18053784]
xor edi, edi
cmp dword [0x1805378c], edi
jne 0x180052fd
cmp ecx, edi
jne 0x180052fd
push ebx
mov dword [0x1805378c], 1
mov dword [0x18053784], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
push edi
mov dword [esp + 0x18], eax
lea eax, [esp + 0x24]
push eax
push 0x18005060
push edi
push edi
mov dword [esp + 0x34], 0x18005310
mov dword [esp + 0x38], esi
call dword [sym.imp.MSVCR90.dll__beginthreadex]
add esp, 0x18
mov ebx, eax
push edi
push ebx
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x18005274
mov ecx, dword [esp + 0x44]
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
mov eax, ecx
and eax, 2
mov dword [esp + 0x14], eax
mov eax, ecx
and eax, 1
push ebp
mov ebp, dword [sym.imp.USER32.dll_GetMessageW]
mov dword [esp + 0x1c], eax
jmp 0x18005130
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x14]
cmp eax, 0x3e8
jbe 0x18005149
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x18053790]
cmp eax, edi
je 0x180051a1
mov ecx, dword [0x18053794]
push ecx
call eax
push edi
push edi
push edi
push edi
lea edx, [esp + 0x38]
push edx
call esi
test eax, eax
je 0x1800519b
lea ebx, [ebx]
push edi
push edi
push edi
lea eax, [esp + 0x34]
push eax
call ebp
lea ecx, [esp + 0x28]
push ecx
call ebx
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageW]
push edi
push edi
push edi
push edi
lea eax, [esp + 0x38]
push eax
call esi
test eax, eax
jne 0x18005170
mov dword [0x18053790], edi
push edi
push edi
push edi
push edi
lea ecx, [esp + 0x38]
push ecx
call esi
cmp dword [esp + 0x18], edi
je 0x18005218
push 1
push 0x108
push 0x100
push edi
lea edx, [esp + 0x38]
push edx
call esi
test eax, eax
jne 0x180051b2
lea ebx, [ebx]
push 1
push 0x20d
push 0x200
push edi
lea eax, [esp + 0x38]
push eax
call esi
test eax, eax
jne 0x180051d0
push 1
push 0x20
push 0x20
push edi
lea ecx, [esp + 0x38]
push ecx
call esi
test eax, eax
jne 0x180051e8
lea ebx, [ebx]
push 1
push 0x113
push 0x113
push edi
lea edx, [esp + 0x38]
push edx
call esi
test eax, eax
jne 0x18005200
cmp dword [esp + 0x1c], edi
je 0x1800525b
push edi
push edi
push edi
push edi
lea eax, [esp + 0x38]
push eax
call esi
test eax, eax
je 0x1800525b
lea ecx, [ecx]
push edi
push edi
push edi
lea ecx, [esp + 0x34]
push ecx
call ebp
lea edx, [esp + 0x28]
push edx
call ebx
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push edi
push edi
push edi
push edi
lea ecx, [esp + 0x38]
push ecx
call esi
test eax, eax
jne 0x18005230
mov edx, dword [esp + 0x10]
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x18005130
mov ebx, dword [esp + 0x10]
pop ebp
test byte [esp + 0x44], 4
je 0x180052d8
jmp 0x18005280
push 1
push 0x84
push 0x84
push edi
lea eax, [esp + 0x34]
push eax
call esi
test eax, eax
jne 0x18005280
jmp 0x180052a0
push 1
push 0x20d
push 0x200
push edi
lea ecx, [esp + 0x34]
push ecx
call esi
test eax, eax
jne 0x180052a0
jmp 0x180052c0
push 1
push 0x108
push 0x100
push edi
lea edx, [esp + 0x34]
push edx
call esi
test eax, eax
jne 0x180052c0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov dword [0x1805378c], edi
mov dword [0x18053784], edi
mov dword [0x18053788], edi
pop edi
mov eax, 1
pop esi
add esp, 0x34
ret
mov eax, dword [esi]
mov edx, dword [eax]
mov ecx, esi
call edx
pop edi
xor eax, eax
pop esi
add esp, 0x34
ret