Function at 0x40e450
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47c2e1
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x4a5018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [0x4aa568]
test eax, eax
jne 0x40e4b2
push 0x2c
call fcn.004551d2
add esp, 4
mov dword [ebp - 0x21c], eax
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.0040dba0
mov dword [ebp - 4], 0xffffffff
mov dword [0x4aa568], eax
push str.DoWork_Start
push str.CEndSessionMgr
push eax
call fcn.0040e150
add esp, 0xc
cmp dword [esi + 0x28], 0
jne 0x40e6b6
push 0x208
lea eax, [ebp - 0x218]
mov dword [esi + 0x28], 1
push 0
push eax
call fcn.004573c0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov esi, dword [0x4aaa7c]
test esi, esi
je 0x40e521
lock inc dword [esi + 4]
mov esi, dword [0x4aaa7c]
mov ecx, dword [0x4aaa78]
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x220], esi
mov dword [ebp - 4], 1
lea edx, [ebp - 0x21c]
mov eax, dword [ecx]
push edx
call dword [eax + 0x64]
push dword [eax]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [ebp - 0x21c]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e575
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x40e59e
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x40e59e
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x40e59e
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e625
push ecx
mov esi, esp
mov dword [ebp - 0x220], esi
call fcn.00402880
mov ecx, eax
test ecx, ecx
je 0x40e6d1
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 2
push eax
mov ecx, esi
call fcn.004067d0
test al, al
jne 0x40e611
lea edx, [ebp - 0x218]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40e5f3
sub edx, ecx
lea eax, [ebp - 0x218]
sar edx, 1
mov ecx, esi
push edx
push eax
call fcn.004069d0
mov ecx, 1
mov dword [ebp - 4], 0xffffffff
call fcn.00420f20
add esp, 4
mov eax, dword [0x4aa568]
test eax, eax
jne 0x40e658
push 0x2c
call fcn.004551d2
add esp, 4
mov dword [ebp - 0x220], eax
mov ecx, eax
mov dword [ebp - 4], 3
call fcn.0040dba0
mov dword [ebp - 4], 0xffffffff
mov dword [0x4aa568], eax
push str.SetAutoRun
push str.CEndSessionMgr
push eax
call fcn.0040e150
add esp, 0xc
call fcn.0040e6e0
mov eax, dword [0x4aa568]
test eax, eax
jne 0x40e6a3
push 0x2c
call fcn.004551d2
add esp, 4
mov dword [ebp - 0x220], eax
mov ecx, eax
mov dword [ebp - 4], 4
call fcn.0040dba0
mov dword [ebp - 4], 0xffffffff
mov dword [0x4aa568], eax
push str.DoWork_End
push str.CEndSessionMgr
push eax
call fcn.0040e150
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00454d47
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402980
int3