Function at 0x4067a0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x264
mov eax, dword [0x4860f0]
xor eax, esp
mov dword [esp + 0x260], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp esi, ebx
je 0x406a1c
cmp word [esi], bx
je 0x406a1c
push 0x208
lea ecx, [esp + 0x5e]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x64], ax
call fcn.00459a90
add esp, 0xc
mov eax, esi
lea edx, [esp + 0x58]
call fcn.00406110
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x58]
push edx
call esi
test eax, eax
jne 0x406819
lea eax, [esp + 0x58]
push eax
call edi
test eax, eax
jne 0x406803
mov esi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
lea ecx, [esp + 0x10]
push ecx
push ebx
push ebx
push 4
lea edx, [esp + 0x68]
push edx
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], ebx
call esi
test eax, eax
jne 0x406865
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x406865
mov dword [esp + 0xc], ebx
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.004567fb
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov edx, 0x14
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004564eb
mov edi, eax
add esp, 4
mov dword [esp + 0x1c], edi
cmp edi, ebx
je 0x4069f2
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x10]
push eax
push ecx
push edi
push 4
lea edx, [esp + 0x68]
push edx
call esi
test eax, eax
je 0x4069f2
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
push edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x4069f2
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x4068eb
mov dword [esp + 0xc], 1
jmp 0x4069f6
push 2
push 0xc
lea ecx, [esp + 0x34]
push ecx
push eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], 8
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x4069f2
cmp dword [esp + 0x20], ebx
je 0x4069f6
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x4069f6
xor esi, esi
cmp eax, ebx
jbe 0x4069f6
mov edi, dword [sym.imp.ADVAPI32.dll_GetAce]
lea esp, [esp]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x24]
push edx
push esi
push eax
mov dword [esp + 0x30], ebx
call edi
test eax, eax
je 0x4069dd
mov eax, dword [esp + 0x24]
cmp byte [eax], 1
jne 0x4069dd
mov ecx, dword [eax + 4]
mov dword [esp + 0x14], ecx
lea edx, [esp + 0x14]
lea ecx, [esp + 0x48]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], 1
call fcn.00406b20
cmp al, 1
jne 0x4069dd
lea eax, [esp + 0x14]
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 2
call fcn.00406b20
cmp al, 1
jne 0x4069dd
lea ecx, [esp + 0x14]
mov dword [esp + 0x50], ecx
lea ecx, [esp + 0x50]
mov dword [esp + 0x54], 4
call fcn.00406b20
cmp al, 1
jne 0x4069dd
lea edx, [esp + 0x14]
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], 8
call fcn.00406b20
cmp al, 1
je 0x4069ee
inc esi
cmp esi, dword [esp + 0x2c]
jb 0x406940
mov edi, dword [esp + 0x1c]
jmp 0x4069f6
mov edi, dword [esp + 0x1c]
mov dword [esp + 0xc], ebx
cmp edi, ebx
je 0x406a03
push edi
call fcn.00457270
add esp, 4
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.004567fb
mov esp, ebp
pop ebp
ret
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x26c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004567fb
mov esp, ebp
pop ebp
ret