Function at 0x405c66
Capabilities:
Check for time delay via gettickcount
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x45c
mov eax, dword [0x42a050]
xor eax, esp
mov dword [esp + 0x458], eax
push ebx
push esi
push edi
xor esi, esi
push 8
pop ecx
xor eax, eax
lea edi, [esp + 0x20]
push esi
mov dword [esp + 0x18], esi
rep stosd dword es:[edi], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x42bef0
mov dword [0x42c0e0], eax
call fcn.00406fa0
mov edi, eax
cmp edi, esi
jge 0x405cc6
push 0x403708
jmp 0x405e7e
cmp dword [0x42bef4], esi
jne 0x405d95
push 0x5c
push dword [0x42bef0]
call fcn.004195dd
lea ebx, [eax + 2]
xor eax, eax
mov edi, 0x208
push edi
mov word [esp + 0x4c], ax
lea eax, [esp + 0x4e]
push esi
push eax
call fcn.0041e230
add esp, 0x14
push ebx
mov ebx, 0x104
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.00419610
add esp, 0xc
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
xor eax, eax
push edi
mov word [esp + 0x254], ax
lea eax, [esp + 0x256]
push esi
push eax
call fcn.0041e230
add esp, 0xc
push ebx
lea eax, [esp + 0x254]
push eax
push 0x403728
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [esp + 0x40]
push ecx
sub ebx, eax
push 0x403734
lea eax, [esp + eax*2 + 0x258]
push ebx
push eax
call fcn.00419678
add esp, 0x10
lea eax, [esp + 0x250]
push eax
xor eax, eax
mov ecx, 0x42bef4
call fcn.00408f9b
mov edi, eax
cmp edi, esi
jge 0x405d8d
push 0x403770
jmp 0x405e7e
cmp dword [0x42bef4], esi
je 0x405da0
push dword [0x42bef4]
call fcn.00408b39
push dword [0x42bef0]
lea eax, [esp + 0x14]
lea ebx, [esp + 0x24]
call fcn.0040640b
mov edi, eax
cmp edi, esi
jge 0x405dc3
push 0x403788
jmp 0x405e7e
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x18]
call fcn.0040647d
mov edi, eax
cmp edi, esi
jge 0x405de6
push 0x4037a0
jmp 0x405e7e
mov eax, dword [esp + 0x38]
cmp eax, esi
je 0x405df3
cmp word [eax], si
jne 0x405dfd
mov dword [0x42bf04], 1
push dword [esp + 0x1c]
mov ecx, 0x42bef0
push dword [esp + 0x1c]
call fcn.0040738e
mov edi, eax
cmp edi, esi
jge 0x405e1c
push 0x4037c8
jmp 0x405e7e
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov dword [esp + 0x18], eax
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x14]
push 0x42bef0
call fcn.00406577
mov edi, eax
cmp edi, esi
jge 0x405e4e
push 0x403808
jmp 0x405e7e
call ebx
sub eax, dword [esp + 0x18]
call fcn.00405c05
cmp dword [0x42bf04], esi
jne 0x405e86
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x40]
push dword [esp + 0x40]
call fcn.004060c8
mov edi, eax
cmp edi, esi
jge 0x405e86
push 0x40381c
push edi
call fcn.00408c66
pop ecx
pop ecx
call fcn.00406c49
mov ebx, dword [esp + 0x10]
cmp ebx, esi
je 0x405e98
call fcn.0040a9e2
cmp dword [esp + 0x14], 0xcabf00d1
jne 0x405ea8
mov dword [esp + 0x14], esi
jmp 0x405eb2
mov ebx, 0x42bef0
call fcn.004067b9
cmp edi, esi
jge 0x405ec7
cmp edi, 0x80070642
je 0x405ec7
mov esi, edi
call fcn.00405f99
xor esi, esi
push edi
push 0x403834
push 1
call fcn.00408be5
mov dword [esp + 0x1c], esi
add esp, 0xc
lea esi, [esp + 0x10]
call fcn.0040959a
test eax, eax
js 0x405efb
push dword [esp + 0x10]
push 0x4050c4
push 1
call fcn.00408be5
add esp, 0xc
xor esi, esi
cmp dword [esp + 0x10], esi
je 0x405f0c
push dword [esp + 0x10]
call fcn.0040956f
mov eax, dword [0x42b140]
mov dword [0x42c11c], esi
cmp eax, 0xffffffff
je 0x405f2a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x42b140], 0xffffffff
mov eax, dword [0x42c120]
cmp eax, esi
je 0x405f3f
push eax
call fcn.0040956f
mov dword [0x42c120], esi
mov eax, dword [0x42bef8]
cmp eax, esi
je 0x405f4e
push eax
call fcn.0040956f
mov eax, dword [0x42bef0]
cmp eax, esi
je 0x405f5d
push eax
call fcn.0040956f
mov eax, dword [0x42bef4]
cmp eax, esi
je 0x405f6c
push eax
call fcn.0040956f
cmp edi, esi
jl 0x405f76
mov eax, dword [esp + 0x14]
jmp 0x405f7d
mov eax, edi
and eax, 0xffff
mov ecx, dword [esp + 0x464]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004195c9
mov esp, ebp
pop ebp
ret 0x10