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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x480
mov eax, dword [0x450060]
xor eax, ebp
mov dword [ebp - 0x18], eax
and dword [ebp - 0x54], 0
and dword [ebp - 0x10], 0
and dword [ebp - 0x44], 0
and dword [ebp - 4], 0
push 0x20
push 0
lea eax, [ebp - 0x38]
push eax
call fcn.0042cd80
add esp, 0xc
and dword [ebp - 0x3c], 0
and dword [ebp - 0x50], 0
and dword [ebp - 0x4c], 0
and dword [ebp - 0xc], 0
and dword [ebp - 8], 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x4521f0], eax
lea eax, [ebp - 8]
push eax
call fcn.0040ad33
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jge 0x406fec
push 0x404130
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
jmp 0x4072d1
push 0x451ff8
call fcn.00408c8a
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jge 0x407018
push 0x404150
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
jmp 0x4072d1
cmp dword [0x451ffc], 0
jne 0x407121
push 0x5c
push dword [0x451ff8]
call fcn.00407c9b
pop ecx
pop ecx
inc eax
inc eax
mov dword [ebp - 0x270], eax
xor eax, eax
mov word [ebp - 0x480], ax
push 0x208
push 0
lea eax, [ebp - 0x47e]
push eax
call fcn.0042cd80
add esp, 0xc
push dword [ebp - 0x270]
push 0x104
lea eax, [ebp - 0x480]
push eax
call fcn.0042ce28
add esp, 0xc
lea eax, [ebp - 0x480]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
xor eax, eax
mov word [ebp - 0x268], ax
push 0x208
push 0
lea eax, [ebp - 0x266]
push eax
call fcn.0042cd80
add esp, 0xc
push 0x104
lea eax, [ebp - 0x268]
push eax
push 0x404170
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x26c], eax
lea eax, [ebp - 0x480]
push eax
push 0x40417c
mov eax, 0x104
sub eax, dword [ebp - 0x26c]
push eax
mov eax, dword [ebp - 0x26c]
lea eax, [ebp + eax*2 - 0x268]
push eax
call fcn.0042cf46
add esp, 0x10
push 0
lea eax, [ebp - 0x268]
push eax
push 0x451ffc
call fcn.0040be53
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jge 0x407121
push 0x4041b8
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
jmp 0x4072d1
cmp dword [0x451ffc], 0
je 0x40713f
push 1
push 0
push dword [0x451ffc]
push dword [0x4521f0]
call fcn.0040b161
mov dword [ebp - 0x54], 0x80004005
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [0x451ff8]
call fcn.00407cad
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jge 0x40717b
push 0x4041d0
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
jmp 0x4072d1
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x3c]
call fcn.00407d5a
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jge 0x4071b1
push 0x4041e8
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
jmp 0x4072d1
cmp dword [ebp - 0x20], 0
je 0x4071c1
mov eax, dword [ebp - 0x20]
movzx eax, word [eax]
test eax, eax
jne 0x4071cb
mov dword [0x45200c], 1
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
push 0x451ff8
call fcn.004091f9
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jge 0x4071fd
push 0x404210
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
jmp 0x4072d1
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
push 1
mov eax, dword [ebp - 0xc]
shl eax, 2
push eax
call fcn.0040e2a9
mov dword [0x4521f4], eax
cmp dword [0x4521f4], 0
jne 0x407251
mov dword [ebp - 0x54], 0x8007000e
push dword [ebp - 0x54]
push 0x8c
push 0x404250
call fcn.0040e33f
push 0x404288
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
jmp 0x4072d1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x40], eax
push dword [0x4521f4]
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x3c]
push 0x451ff8
call fcn.00407ec6
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jge 0x40728d
push 0x4042c4
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
jmp 0x4072d1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x40]
mov dword [ebp - 0x14], eax
push dword [ebp - 0x14]
call fcn.00406ed0
cmp dword [0x45200c], 0
jne 0x4072d1
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.004075c1
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jge 0x4072d1
push 0x4042d8
push dword [ebp - 0x54]
call fcn.0040b4e0
pop ecx
pop ecx
call fcn.004087cf
push dword [ebp - 0xc]
push dword [0x4521f4]
push dword [ebp - 0x3c]
call fcn.00407d32
cmp dword [ebp - 8], 0
je 0x4072f5
push dword [ebp - 8]
call fcn.0040adfc
cmp dword [ebp - 4], 0xcabf00d1
jne 0x407304
and dword [ebp - 4], 0
jmp 0x40730e
push 0x451ff8
call fcn.0040825b
cmp dword [ebp - 0x54], 0
jge 0x40732b
push 0x642
call fcn.00407c6d
cmp eax, dword [ebp - 0x54]
je 0x40732b
push dword [ebp - 0x54]
call fcn.004073b5
push dword [ebp - 0x54]
push 0x4042f0
push 1
call fcn.0040b425
add esp, 0xc
push dword [ebp - 4]
push 0x404328
push 1
call fcn.0040b425
add esp, 0xc
push 1
call fcn.0040b218
cmp dword [0x452000], 0
je 0x40736a
push dword [0x452000]
call fcn.0040c820
cmp dword [0x451ff8], 0
je 0x40737e
push dword [0x451ff8]
call fcn.0040c820
cmp dword [0x451ffc], 0
je 0x407392
push dword [0x451ffc]
call fcn.0040c820
cmp dword [ebp - 0x54], 0
jl 0x40739f
mov eax, dword [ebp - 4]
jmp 0x4073a7
mov eax, dword [ebp - 0x54]
and eax, 0xffff
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0042cd6d
leave
ret 0x10