Function at 0x40f010
Capabilities:
Check for time delay via gettickcount
Check if file exists
Get file attributes
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46ae07
mov eax, dword fs:[0]
push eax
sub esp, 0x4c0
mov eax, dword [0x486668]
xor eax, esp
mov dword [esp + 0x4b8], eax
push ebx
push esi
push edi
mov eax, dword [0x486668]
xor eax, esp
push eax
lea eax, [esp + 0x4d0]
mov dword fs:[0], eax
lea eax, [esp + 0x44]
mov esi, ecx
push eax
mov dword [esp + 0x14], esi
call fcn.0040ddd0
push 0
lea ecx, [esi + 0x24]
push 0x477ce4
mov dword [esp + 0x4e0], 0
mov dword [esp + 0x34], ecx
call fcn.00402ba0
mov eax, dword [esi + 0x14]
push eax
lea ecx, [esp + 0x48]
push ecx
lea ebx, [esp + 0x3c]
call fcn.0040e010
mov edx, dword [eax]
mov dword [esi + 0x1c], edx
mov eax, dword [eax + 4]
mov dword [esi + 0x20], eax
xor eax, eax
cmp edx, eax
je 0x40f0b1
mov ecx, dword [esi + 0x10]
push eax
push eax
push 0x8007
push ecx
jmp 0x40f4e3
lea edx, [esp + 0x34]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
push edx
lea eax, [esp + 0x20]
push eax
lea ebx, [esp + 0x4c]
call fcn.0040ec20
mov ecx, dword [eax]
test ecx, ecx
mov dword [esi + 0x1c], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0x20], edx
je 0x40f0ed
mov eax, dword [esi + 0x10]
push 0
push 0
push 0x8007
push eax
jmp 0x40f4e3
lea eax, [esi + 0x18]
mov dword [esp + 0x28], eax
mov eax, dword [eax]
lea ecx, [esp + 0x44]
push ecx
mov edi, eax
lea esi, [esp + 0x20]
call fcn.0040e1e0
mov edx, dword [eax]
mov ebx, dword [esp + 0x10]
mov dword [ebx + 0x1c], edx
mov eax, dword [eax + 4]
xor edi, edi
cmp edx, edi
mov dword [ebx + 0x20], eax
je 0x40f130
mov ecx, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x30]
call fcn.00405a10
push edi
push edi
jmp 0x40f4da
lea esi, [esp + 0x1c]
lea eax, [esp + 0x44]
call fcn.0040e360
mov ecx, dword [eax]
cmp ecx, edi
mov dword [ebx + 0x1c], ecx
mov edx, dword [eax + 4]
mov dword [ebx + 0x20], edx
je 0x40f15c
mov eax, dword [ebx + 0x10]
push edi
push edi
push 0x8007
push eax
jmp 0x40f4e3
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x10], eax
mov edi, edi
lea ecx, [esp + 0x44]
push ecx
lea esi, [esp + 0x90]
lea edi, [esp + 0x68]
call fcn.0040e460
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
mov edx, esi
push edx
push ecx
sub eax, 0x10
mov dword [esp + 0x38], esp
mov esi, esp
push eax
call fcn.00402cb0
lea ecx, [esp + 0x20]
add esp, 4
add eax, 0x10
push ecx
mov dword [esi], eax
call fcn.00407cc0
add esp, 0xc
mov byte [esp + 0x4d8], 1
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f1ff
test al, 0x10
jne 0x40f1ff
cmp byte [ebx + 0x28], 0
jne 0x40f1ff
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0x10]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push 0
push 0x800a
push ecx
call edi
test eax, eax
je 0x40f39e
cmp eax, 1
jne 0x40f205
mov byte [ebx + 0x28], al
jmp 0x40f205
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x477ce4
lea ecx, [esp + 0x44]
call fcn.00403710
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x94]
lea edx, [esp + 0x4c]
mov byte [esp + 0x4e0], 2
call fcn.0040e640
mov ecx, dword [eax]
mov dword [ebx + 0x1c], ecx
mov edx, dword [eax + 4]
test ecx, ecx
mov byte [esp + 0x4d8], 1
mov eax, dword [esp + 0x40]
setne byte [esp + 0x1b]
add eax, 0xfffffff0
mov dword [ebx + 0x20], edx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f272
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [esp + 0x1b], 0
jne 0x40f3bf
cmp byte [esp + 0x4c0], 0
jne 0x40f32e
mov dword [esp + 0x30], 0
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x78]
lea ecx, [esp + 0x48]
call fcn.0040e970
mov edx, dword [eax]
test edx, edx
mov dword [ebx + 0x1c], edx
mov eax, dword [eax + 4]
mov dword [ebx + 0x20], eax
jne 0x40f421
mov esi, dword [esp + 0x30]
add dword [esp + 0x1c], esi
adc dword [esp + 0x20], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, dword [esp + 0x10]
cmp ecx, 0x32
jbe 0x40f315
mov edx, dword [esp + 0x20]
push 0
push 0x3e8
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
push edx
push eax
call fcn.004352f0
mov ecx, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x38]
push ecx
push edx
push eax
call fcn.00435330
push eax
push 0
mov dword [esp + 0x90], edx
mov edx, dword [ebx + 0x10]
push 0x8009
push edx
call edi
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
mov ecx, ebx
call edx
test al, al
jne 0x40f4cb
test esi, esi
ja 0x40f293
lea esi, [esp + 0x6c]
lea eax, [esp + 0x44]
call fcn.0040e3e0
mov ecx, dword [eax]
mov dword [ebx + 0x1c], ecx
mov edx, dword [eax + 4]
mov byte [esp + 0x4d8], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [ebx + 0x20], edx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f36e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebx + 0x1c], 0
je 0x40f170
cmp dword [ebx + 0x1c], 1
jne 0x40f4d6
cmp dword [ebx + 0x20], 0xffffff9c
jne 0x40f4d6
mov ecx, dword [ebx + 0x10]
push 0
push 0
push 0x8005
push ecx
jmp 0x40f4e3
mov ecx, dword [ebx + 0x10]
push 0
push 0
push 0x8006
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
lea ecx, [esp + 0x14]
call fcn.00407c70
jmp 0x40f4e9
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x8c]
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
call fcn.004036f0
lea ecx, [esp + 0x18]
push ecx
call fcn.00407cc0
add esp, 0xc
mov ecx, dword [esp + 0x2c]
push eax
mov byte [esp + 0x4dc], 3
call fcn.004059f0
lea ecx, [esp + 0x10]
call fcn.00407c70
mov edx, dword [ebx + 0x10]
push 0
push 0
push 0x8007
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
lea ecx, [esp + 0x14]
call fcn.00407c70
jmp 0x40f4e9
lea eax, [esp + 0x8c]
push eax
push ecx
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
sub eax, 0x10
mov dword [esp + 0x18], esp
mov esi, esp
push eax
call fcn.00402cb0
lea edx, [esp + 0x1c]
add esp, 4
add eax, 0x10
push edx
mov dword [esi], eax
call fcn.00407cc0
add esp, 0xc
mov ecx, dword [esp + 0x2c]
push eax
mov byte [esp + 0x4dc], 4
call fcn.00405a10
mov byte [esp + 0x4d8], 1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f48e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0
push 0
push 0x8007
mov ecx, dword [ebx + 0x10]
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
mov byte [esp + 0x4d8], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f4e9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40f4e9
push 0
push 0
push 0x8006
jmp 0x40f497
push 0
push 0
mov edx, dword [ebx + 0x10]
push 0x8007
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
lea ecx, [esp + 0x44]
mov dword [esp + 0x4d8], 0xffffffff
call fcn.0040df10
xor eax, eax
mov ecx, dword [esp + 0x4d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4b8]
xor ecx, esp
call fcn.0042eddf
mov esp, ebp
pop ebp
ret