Function at 0x401400
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4048c2
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x40d064]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x40d064]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
xor ebx, ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
call fcn.00403b80
cmp dword [ebp + 8], 3
mov dword [esp + 0x90], ebx
jne 0x4016b1
mov esi, dword [edi + 4]
mov edi, dword [edi + 8]
cmp esi, ebx
je 0x4016b1
xor eax, eax
cmp ax, word [esi]
je 0x4016b1
cmp edi, ebx
je 0x4016b1
xor ecx, ecx
cmp cx, word [edi]
je 0x4016b1
push edi
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [esp + 0x90], 1
mov edx, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov eax, dword [edx]
push eax
push 0x406554
lea ecx, [esp + 0x50]
call dword [sym.imp.MSVCP90.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::rfind_wchar_t_const___unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP90.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
cmp dword [ecx], eax
je 0x4014d4
push 0x406558
push 1
push eax
lea ecx, [esp + 0x54]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::replace_unsigned_int__unsigned_int__wchar_t_const__]
mov eax, dword [esp + 0x4c]
mov ebx, 8
cmp dword [esp + 0x60], ebx
jae 0x4014e7
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or edi, 0xffffffff
cmp eax, edi
jne 0x401513
lea ecx, [esp + 0x48]
mov byte [esp + 0x90], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [esp + 0x90], edi
jmp 0x4016bc
lea ecx, [esp + 0x24]
call fcn.00401a60
push 1
push 1
push str.SYSTEMCurrentControlSetControlSession_ManagerEnvironment
push 0x80000002
lea ecx, [esp + 0x34]
mov byte [esp + 0xa0], 2
call fcn.00401b50
or eax, edx
lea ecx, [esp + 0x24]
je 0x401552
mov byte [esp + 0x90], 1
call fcn.00401af0
jmp 0x4014f5
push 0
lea edx, [esp + 0x18]
push edx
push esi
call fcn.00402090
mov eax, dword [esp + 0x14]
test eax, eax
je 0x401666
xor ecx, ecx
cmp cx, word [eax]
je 0x401666
push 0x40655c
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.MSVCP90.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_std::operator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const___wchar_t_const__]
add esp, 0xc
mov byte [esp + 0x90], 3
mov eax, dword [esp + 0x68]
cmp dword [esp + 0x7c], ebx
jae 0x4015a4
lea eax, [esp + 0x68]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call dword [sym.imp.MSVCR90.dll_wcsstr]
add esp, 8
test eax, eax
jne 0x401654
mov edi, dword [esp + 0x14]
call fcn.00401380
test eax, eax
mov eax, dword [esp + 0x4c]
je 0x4015ef
cmp dword [esp + 0x60], ebx
jae 0x4015d6
lea eax, [esp + 0x4c]
mov ebx, dword [esp + 0x14]
push 0x40655c
push eax
lea edx, [esp + 0x20]
push edx
call fcn.00401010
add esp, 0xc
jmp 0x401616
cmp dword [esp + 0x60], ebx
jae 0x4015f9
lea eax, [esp + 0x4c]
push 0x40655c
push eax
mov eax, dword [esp + 0x1c]
push 0x40655c
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00401190
add esp, 0x14
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40167c
xor edx, edx
cmp dx, word [edi]
je 0x40167c
mov eax, edi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401630
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push edi
push 2
push esi
lea ecx, [esp + 0x34]
call fcn.00402960
or edi, 0xffffffff
lea ecx, [esp + 0x64]
mov byte [esp + 0x90], 2
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x24]
mov byte [esp + 0x90], 1
call fcn.00401af0
jmp 0x4014f5
lea ecx, [esp + 0x64]
mov byte [esp + 0x90], 2
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x24]
mov byte [esp + 0x90], 1
call fcn.00401af0
lea ecx, [esp + 0x48]
mov byte [esp + 0x90], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [esp + 0x90], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.00403c10
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4016de
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4016ef
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.00403c8f
mov esp, ebp
pop ebp
ret