Function at 0x404390
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x473338
push eax
mov dword fs:[0], esp
sub esp, 0x6c
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4043b7
sub ecx, edx
je 0x4045ea
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4045ea
call fcn.0048f080
push 0x44
lea eax, [ebp - 0x78]
push 0
push eax
call fcn.0044ebb0
add esp, 0xc
mov dword [ebp - 0x18], ebx
xorps xmm0, xmm0
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
movups xmmword [ebp - 0x34], xmm0
call fcn.00490000
lea ecx, [ebp - 0x18]
push ecx
push eax
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
je 0x4045c7
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4045c7
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x14], ebx
push ecx
push 4
lea ecx, [ebp - 0x1c]
push ecx
push 0x13
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x1c]
test eax, eax
push 1
push 2
push 0
push 0x2000000
cmovne ecx, eax
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4045bd
push 0
push dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
push eax
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x40459f
mov ecx, dword [ebp + 0xc]
push edi
xor edi, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404483
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
sub ecx, edx
je 0x40456e
xor eax, eax
mov dword [ebp - 0x78], 0x44
mov dword [ebp - 0x4c], 1
xor esi, esi
mov word [ebp - 0x48], ax
nop
push dword [ebp + 0xc]
lea ecx, [ebp - 0x10]
call fcn.00408900
mov eax, dword [ebp - 0x10]
mov edx, 1
mov dword [ebp - 4], 0
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x4044ea
push 0x104
lea ecx, [ebp - 0x10]
call fcn.00408e90
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x78]
push ecx
push 0
push dword [ebp - 0x20]
push 0x480
push 0
push 0
push 0
push eax
push dword [ebp + 8]
push dword [ebp - 0x14]
call dword [0x4cd270]
mov edi, eax
mov eax, dword [ebp - 0x10]
push dword [eax - 8]
push eax
call fcn.00452e6f
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x4045e0
mov eax, dword [ebp - 0x10]
cmp ecx, dword [eax - 8]
jg 0x4045e0
mov dword [eax - 0xc], ecx
mov eax, dword [ebp - 0x10]
push 0xc8
mov byte [ecx + eax], 0
call ebx
lea ecx, [ebp - 0x10]
test edi, edi
jne 0x4045d9
mov dword [ebp - 4], 0xffffffff
call fcn.00409d90
inc esi
cmp esi, 0x32
jl 0x4044b0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x34]
xor ebx, ebx
test edi, edi
pop edi
setne bl
test eax, eax
je 0x404585
cmp eax, 0xffffffff
je 0x404585
push eax
call esi
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x404594
cmp eax, 0xffffffff
je 0x404594
push eax
call esi
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4045ac
push eax
call sub.USERENV.dll_DestroyEnvironmentBlock
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4045bd
push eax
call esi
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4045c7
push eax
call esi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call fcn.00409d90
jmp 0x404568
push 0x80070057
call fcn.00408b40
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret