Function at 0x407140
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430932
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x43c034]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x20000
push 1
mov dword [ebp - 0x14c], 0
call fcn.00429c70
push eax
call sub.msvcrt.dll__fileno
add esp, 8
push eax
call sub.msvcrt.dll__setmode
mov esi, eax
mov dword [ebp - 0x154], esi
xor edi, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x148], edi
mov dword [ebp - 0x130], edi
mov dword [ebp - 0x144], edi
mov dword [ebp - 0x140], edi
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 1
push eax
mov byte [ebp - 0x129], 0
mov byte [ebp - 0x12a], 0
mov byte [ebp - 0x131], 0
call fcn.00424580
add esp, 0xc
mov ecx, dword [ebp - 0x30]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0x34]
imul ecx
mov byte [ebp - 4], 2
sar edx, 2
mov eax, edx
mov dword [ebp - 0x138], 1
shr eax, 0x1f
add eax, edx
cmp eax, 1
jbe 0x407456
mov edi, 0x18
mov dword [ebp - 0x13c], edi
nop dword [eax]
add edi, dword [ebp - 0x34]
mov edx, edi
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x10]
cmp ecx, 8
jb 0x407232
mov edx, dword [edi]
cmp eax, 9
jne 0x407254
push eax
push str.__version
push edx
call fcn.00405020
add esp, 0xc
test eax, eax
je 0x4073ce
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov edx, edi
cmp ecx, 8
jb 0x40725d
mov edx, dword [edi]
cmp eax, 2
jne 0x40727f
push eax
push 0x433420
push edx
call fcn.00405020
add esp, 0xc
test eax, eax
je 0x4073ce
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov edx, edi
cmp ecx, 8
jb 0x407288
mov edx, dword [edi]
cmp eax, 6
jne 0x4072aa
push eax
push str.__help
push edx
call fcn.00405020
add esp, 0xc
test eax, eax
je 0x4073d7
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov edx, edi
cmp ecx, 8
jb 0x4072b3
mov edx, dword [edi]
cmp eax, 2
jne 0x4072d5
push eax
push 0x433438
push edx
call fcn.00405020
add esp, 0xc
test eax, eax
je 0x4073d7
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov edx, edi
cmp ecx, 8
jb 0x4072de
mov edx, dword [edi]
cmp eax, 2
jne 0x407300
push eax
push 0x4331fc
push edx
call fcn.00405020
add esp, 0xc
test eax, eax
je 0x4073e0
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov edx, edi
cmp ecx, 8
jb 0x407309
mov edx, dword [edi]
cmp eax, 2
jne 0x40732b
push eax
push 0x433440
push edx
call fcn.00405020
add esp, 0xc
test eax, eax
je 0x4073e9
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
mov edx, edi
cmp ecx, 8
jb 0x407334
mov edx, dword [edi]
cmp eax, 7
jne 0x407350
push eax
push str.__debug
push edx
call fcn.00405020
add esp, 0xc
test eax, eax
je 0x4073e9
mov eax, dword [ebp - 0x130]
push edi
cmp eax, dword [ebp - 0x140]
je 0x407379
mov edi, eax
mov ecx, edi
call fcn.004020c0
add edi, 0x18
mov dword [ebp - 0x130], edi
mov dword [ebp - 0x144], edi
jmp 0x407391
push eax
lea ecx, [ebp - 0x148]
call fcn.00401720
mov eax, dword [ebp - 0x144]
mov dword [ebp - 0x130], eax
mov ecx, dword [ebp - 0x30]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x13c]
inc dword [ebp - 0x138]
add edi, 0x18
imul ecx
mov dword [ebp - 0x13c], edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 0x138], eax
jb 0x407220
jmp 0x407450
mov byte [ebp - 0x129], 1
jmp 0x407450
mov byte [ebp - 0x131], 1
jmp 0x407450
mov byte [ebp - 0x12a], 1
jmp 0x407450
mov ecx, dword [ebp - 0x30]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0x34]
sub ecx, edi
imul ecx
mov byte [0x43d520], 1
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [ebp - 0x138]
lea eax, [edx + 1]
cmp eax, ecx
jae 0x407450
inc edx
lea eax, [edx + edx*2]
lea eax, [edi + eax*8]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00425ab0
add esp, 8
cmp dword [eax + 0x14], 0x10
jb 0x407432
mov eax, dword [eax]
push eax
call sub.msvcrt.dll_atoi
xor ecx, ecx
add esp, 4
test eax, eax
cmovg ecx, eax
mov dword [section..data], ecx
lea ecx, [ebp - 0x28]
call fcn.00402a20
mov edi, dword [ebp - 0x130]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.00402b90
cmp byte [ebp - 0x129], 0
je 0x407482
push 0x432e14
push 0x432e24
call fcn.004079c0
add esp, 8
jmp 0x407973
cmp dword [ebp + 8], 1
je 0x40796e
cmp byte [ebp - 0x131], 0
jne 0x40796e
cmp byte [ebp - 0x12a], 0
je 0x4074ae
call fcn.00405310
mov edi, eax
jmp 0x407975
mov eax, dword [ebp - 0x148]
cmp eax, edi
je 0x40796e
mov edx, eax
mov ecx, edx
mov dword [ebp - 0x13c], ecx
cmp dword [ecx + 0x14], 8
jb 0x4074ce
mov edx, dword [eax]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x407509
mov eax, dword [ebp - 0x13c]
cmp dword [eax + 0x14], 8
jb 0x4074ee
mov edi, dword [ebp - 0x148]
mov eax, dword [edi]
push str.Invalid_path.
push eax
push str.Error:__s:__s_n
call fcn.004079c0
add esp, 0xc
or edi, 0xffffffff
jmp 0x407975
test al, 0x10
je 0x407886
mov edi, dword [ebp - 0x148]
lea eax, [ebp - 0x28]
push edi
push eax
call fcn.00424910
add esp, 8
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 3
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x407570
lea eax, [ebp - 0x58]
push eax
call fcn.00424710
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 4
push ecx
push eax
lea eax, [ebp - 0x128]
mov dword [ebp - 0x14c], 1
push eax
call fcn.00424cc0
add esp, 0x10
mov ecx, 3
jmp 0x4075aa
push 0x433474
lea ecx, [ebp - 0x40]
call fcn.00402170
lea eax, [ebp - 0x40]
mov dword [ebp - 4], 6
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x14c], 4
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.00424cc0
add esp, 0xc
mov ecx, 0xc
mov dword [ebp - 0x130], ecx
lea ecx, [ebp - 0x28]
push eax
call fcn.00402e10
mov eax, dword [ebp - 0x130]
test al, 8
je 0x4075dd
and eax, 0xfffffff7
lea ecx, [ebp - 0x110]
mov dword [ebp - 0x130], eax
call fcn.00402a70
mov eax, dword [ebp - 0x130]
test al, 4
je 0x4075f8
and eax, 0xfffffffb
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x130], eax
call fcn.00402a70
mov eax, dword [ebp - 0x130]
test al, 2
je 0x407616
and eax, 0xfffffffd
lea ecx, [ebp - 0x128]
mov dword [ebp - 0x130], eax
call fcn.00402a70
mov eax, dword [ebp - 0x130]
mov dword [ebp - 4], 3
test al, 1
je 0x407629
lea ecx, [ebp - 0x58]
call fcn.00402a70
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0x433478
cmovae eax, dword [ebp - 0x28]
push eax
call sub.msvcrt.dll__wcsicmp
add esp, 8
test eax, eax
je 0x407663
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0x433480
cmovae eax, dword [ebp - 0x28]
push eax
call sub.msvcrt.dll__wcsicmp
add esp, 8
test eax, eax
jne 0x4076d2
lea eax, [ebp - 0xd0]
mov dword [ebp - 0xd0], vtable.std::_Func_impl_no_alloc_class__lambda_5200e7f48054ddd886ad27612b56716c___void___.0
mov dword [ebp - 0xac], eax
push 0xf
push eax
mov byte [ebp - 4], 7
call fcn.004263b0
mov ecx, dword [ebp - 0xac]
add esp, 8
mov byte [ebp - 4], 3
test ecx, ecx
je 0x4076a9
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0xd0]
cmp ecx, eax
setne al
push eax
call edx
push 0x43269c
call fcn.004079c0
add esp, 4
call fcn.00405310
mov edi, eax
test edi, edi
jne 0x407879
push 0x43269c
call fcn.004079c0
add esp, 4
lea eax, [ebp - 0x28]
mov dword [ebp - 0xa8], vtable.std::_Func_impl_no_alloc_class__lambda_b62a54539a43e64dd8deba2b1c6f863a___void___.0
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0xa8]
mov dword [ebp - 0x84], eax
push 0xd
push eax
mov byte [ebp - 4], 8
call fcn.004263b0
mov ecx, dword [ebp - 0x84]
add esp, 8
test ecx, ecx
je 0x40771d
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0xa8]
cmp ecx, eax
setne al
push eax
call edx
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
jne 0x407769
lea eax, [ebp - 0xf8]
mov dword [ebp - 0xf8], vtable.std::_Func_impl_no_alloc_class__lambda_6262e35b5540baf264e4a6fc0c75bb95___void___.0
mov dword [ebp - 0xd4], eax
push 5
push eax
mov byte [ebp - 4], 9
call fcn.004263b0
mov ecx, dword [ebp - 0xd4]
add esp, 8
test ecx, ecx
je 0x407769
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0xf8]
cmp ecx, eax
setne al
push eax
call edx
push 0x43269c
call fcn.004079c0
add esp, 4
mov byte [ebp - 0x129], 0
mov dword [ebp - 0x13c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov dword [ebp - 0x150], eax
lea eax, [ebp - 0x129]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x150]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x13c]
movq xmm0, qword [ebp - 0x34]
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x80]
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x80], vtable.std::_Func_impl_no_alloc_class__lambda_911da35e711db372a6e0670d59ca9675___bool__class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__.0
movq qword [ebp - 0x7c], xmm0
mov dword [ebp - 0x5c], eax
push 0
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xa
push eax
call fcn.00425b60
mov ecx, dword [ebp - 0x5c]
add esp, 0xc
mov byte [ebp - 0x12a], al
mov byte [ebp - 4], 3
test ecx, ecx
je 0x407806
mov edi, dword [ecx]
lea eax, [ebp - 0x80]
cmp ecx, eax
setne dl
movzx eax, dl
push eax
call dword [edi + 0x10]
mov al, byte [ebp - 0x12a]
test al, al
jne 0x40785c
cmp byte [ebp - 0x129], al
je 0x40781f
push 0x43d640
call fcn.00401cf0
add esp, 4
push 0
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.00426620
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x407837
mov eax, dword [eax]
push eax
push str.Error:__s_n
call fcn.004079c0
add esp, 8
lea ecx, [ebp - 0x58]
call fcn.00402a70
lea ecx, [ebp - 0x28]
xor edi, edi
call fcn.00402a70
jmp 0x407975
cmp byte [ebp - 0x129], 0
je 0x40786a
call fcn.00426230
push 0x4326a0
call fcn.004079c0
add esp, 4
xor edi, edi
lea ecx, [ebp - 0x28]
call fcn.00402a70
jmp 0x407975
sub edi, dword [ebp - 0x13c]
mov eax, 0x2aaaaaab
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jbe 0x4078bf
mov edi, dword [ebp - 0x148]
lea ecx, [ebp - 0x58]
lea eax, [edi + 0x18]
push eax
call fcn.004020c0
mov byte [ebp - 4], 0xb
mov ecx, 0x10
jmp 0x4078ef
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
movups xmmword [ebp - 0x28], xmm0
mov word [ebp - 0x28], ax
mov edi, dword [ebp - 0x148]
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0xc
mov ecx, 0x20
sub esp, 0x18
mov dword [ebp - 0x14c], ecx
mov dword [ebp - 0x138], ecx
mov ecx, esp
push eax
call fcn.00402080
push edi
call fcn.00405710
mov edi, eax
add esp, 0x1c
mov eax, dword [ebp - 0x138]
test al, 0x20
je 0x407960
mov ecx, dword [ebp - 0x14]
and eax, 0xffffffdf
mov dword [ebp - 0x138], eax
cmp ecx, 8
jb 0x407960
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x407950
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4079b4
push ecx
push edx
call fcn.00428a43
mov eax, dword [ebp - 0x138]
add esp, 8
test al, 0x10
je 0x407975
lea ecx, [ebp - 0x58]
call fcn.00402a70
jmp 0x407975
call fcn.00405180
xor edi, edi
lea ecx, [ebp - 0x148]
call fcn.00402b90
push 1
call fcn.00429c70
push eax
call sub.msvcrt.dll__fileno
push esi
push eax
call sub.msvcrt.dll__setmode
add esp, 0x10
mov eax, edi
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.00428a51
mov esp, ebp
pop ebp
ret
call fcn.00429ae0
int3