Function at 0x401760
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x8898
call fcn.00403908
sub esp, eax
mov eax, dword [esp + eax]
mov dword [ebp - 0x8890], edx
mov dword [ebp - 0x888c], eax
mov dword [esp + 4], 0x406066
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcspbrk]
test eax, eax
je 0x401cd4
mov eax, dword [ebp - 0x888c]
lea ebx, [ebp - 0x800c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_GetFullPathNameW]
mov dword [esp + 4], 0x2000
mov dword [ebp - 0x8888], eax
call eax
sub esp, 0x10
mov dword [esp + 4], 0x5c
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcsrchr]
mov dword [ebp - 0x8884], 0
mov esi, eax
test eax, eax
je 0x40180e
mov dword [esp + 4], 0x2e
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
setne al
movzx eax, al
mov dword [ebp - 0x8884], eax
lea ecx, [ebp - 0x866c]
xor eax, eax
mov dword [ebp - 0x8880], ecx
lea esi, [esi]
movzx edx, word [esi + eax + 2]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x401820
mov word [esi + 2], 0
mov esi, dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x400c]
mov dword [esp + 8], 0x2000
mov dword [esp + 4], eax
mov dword [esp], str.PATHEXT
call esi
sub eax, 1
sub esp, 0xc
cmp eax, 0x1ffe
jbe 0x401887
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [eax + str..bat_.com_.cmd_.exe]
mov word [ebp + eax - 0x400c], dx
add eax, 2
test dx, dx
jne 0x401870
test byte [section..data], 8
jne 0x401dcb
mov dword [ebp - 0x887c], ebx
lea esi, [esi]
mov ecx, 0x82
lea edi, [ebp - 0x8464]
xor eax, eax
mov ebx, dword [ebp - 0x887c]
rep stosd dword es:[edi], eax
jmp 0x4018cf
mov ecx, eax
xor ecx, 1
cmp dx, 0x22
cmove eax, ecx
add ebx, 2
movzx edx, word [ebx]
test eax, eax
jne 0x4018e0
cmp dx, 0x3b
je 0x401b50
test dx, dx
jne 0x4018c0
mov ecx, dword [ebp - 0x887c]
xor eax, eax
lea esi, [esi]
movzx edx, word [ecx + eax]
mov word [ebp + eax - 0x8464], dx
add eax, 2
test dx, dx
jne 0x4018f0
movzx edx, word [ebp - 0x8464]
mov dword [ebp - 0x887c], 0
test dx, dx
je 0x401b95
lea eax, [ebp - 0x8464]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401928
lea edi, [ebp - 0x8464]
sub eax, edi
sar eax, 1
cmp word [ebp + eax*2 - 0x8466], 0x22
lea ecx, [eax - 1]
je 0x401c90
xor eax, eax
cmp dx, 0x22
jne 0x401968
jmp 0x401b30
movzx edx, word [ebp + eax - 0x8464]
mov word [ebp + eax - 0x8874], dx
add eax, 2
test dx, dx
jne 0x401960
lea eax, [ebp - 0x8464]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x8874]
mov dword [esp], eax
mov eax, dword [ebp - 0x8888]
mov dword [esp + 4], 0x104
call eax
lea eax, [ebp - 0x8464]
sub esp, 0x10
cmp word [ebp - 0x8464], 0
je 0x401cbb
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4019c0
lea edi, [ebp - 0x8464]
sub eax, edi
sar eax, 1
cmp word [ebp + eax*2 - 0x8466], 0x5c
je 0x401a23
lea edx, [ebp - 0x8464]
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4019e8
xor eax, eax
mov ecx, 0x5c
jmp 0x401a07
movzx ecx, word [eax + 0x4060d8]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x401a00
cmp word [ebp - 0x8464], 0
lea edx, [ebp - 0x8464]
je 0x401a39
lea edx, [ebp - 0x8464]
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x401a30
mov ebx, dword [ebp - 0x8880]
xor eax, eax
lea esi, [esi]
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x401a48
cmp word [ebp - 0x8464], 0
lea ebx, [ebp - 0x8464]
je 0x401ca6
lea esi, [esi]
add ebx, 2
cmp word [ebx], 0
jne 0x401a70
mov edx, dword [ebp - 0x8884]
test edx, edx
je 0x401aac
lea eax, [ebp - 0x8464]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
jne 0x401c53
cmp word [ebp - 0x8464], 0
je 0x401e10
lea edx, [ebp - 0x8464]
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x401ab8
xor eax, eax
mov ecx, 0x2e
jmp 0x401ad7
movzx ecx, word [eax + 0x4060dc]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x401ad0
lea eax, [ebp - 0x825c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x8464]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
sub esp, 8
mov esi, eax
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
cmp esi, 0xffffffff
jne 0x401bb8
mov ebx, dword [ebp - 0x887c]
test ebx, ebx
jne 0x4018a0
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, word [ebp + eax - 0x8462]
mov word [ebp + eax - 0x8874], dx
add eax, 2
test dx, dx
jne 0x401b30
jmp 0x401978
mov eax, dword [ebp - 0x887c]
mov esi, ebx
sub esi, eax
mov dword [esp + 4], eax
lea eax, [ebp - 0x8464]
mov dword [esp + 8], esi
sar esi, 1
mov dword [esp], eax
call sub.ucrtbase.dll_memcpy
xor eax, eax
mov word [ebp + esi*2 - 0x8464], ax
movzx edx, word [ebp - 0x8464]
lea eax, [ebx + 2]
mov dword [ebp - 0x887c], eax
test dx, dx
jne 0x40191e
cmp word [ebp - 0x8466], 0x22
je 0x401c89
mov word [ebp - 0x8874], 0
jmp 0x401978
lea esi, [ebp - 0x400c]
nop
mov dword [esp + 4], 0x3b
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcschr]
mov edi, eax
test eax, eax
je 0x401c20
mov edx, eax
mov dword [esp + 4], esi
sub edx, esi
mov dword [esp], ebx
lea esi, [edi + 2]
mov dword [esp + 8], edx
mov dword [ebp - 0x8878], edx
call sub.ucrtbase.dll_memcpy
mov edx, dword [ebp - 0x8878]
xor ecx, ecx
lea eax, [ebp - 0x8464]
mov word [ebx + edx], cx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x401bc0
jmp 0x401c53
xor eax, eax
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x401c28
lea eax, [ebp - 0x8464]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x401b16
lea eax, [ebp - 0x8464]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov edx, eax
mov eax, dword [ebp - 0x8890]
mov dword [eax], edx
mov eax, 1
test edx, edx
jne 0x401b26
mov edx, dword [ebp - 0x888c]
mov eax, 0xe
call fcn.00401600
or ecx, 0xffffffff
lea esi, [esi]
xor edi, edi
mov word [ebp + ecx*2 - 0x8464], di
movzx edx, word [ebp - 0x8464]
jmp 0x40194d
mov esi, dword [ebp - 0x8884]
test esi, esi
jne 0x401a83
mov edx, ebx
jmp 0x401ac1
cmp word [ebp - 0x8466], 0x5c
lea edx, [ebp - 0x8464]
je 0x401a39
jmp 0x4019f1
lea ebx, [ebp - 0x800c]
lea esi, [esi]
movzx edx, word [eax + 0x40606e]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x401ce0
lea eax, [ebp - 0x8008]
mov dword [esp + 8], 0x1ffe
mov esi, dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov dword [esp + 4], eax
mov dword [esp], 0x406074
call esi
sub eax, 1
sub esp, 0xc
cmp eax, 0x1ffc
jbe 0x401d3b
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [eax + 0x40607e]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x401d28
mov edi, dword [ebp - 0x888c]
mov dword [esp + 4], 0x2e
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcschr]
mov edx, edi
mov ecx, eax
xor eax, eax
cmp word [edi], 0
je 0x401d7d
nop
add edx, 2
cmp word [edx], 0
jne 0x401d60
sub edx, dword [ebp - 0x888c]
xor eax, eax
cmp edx, 0x206
jg 0x401b24
lea edi, [ebp - 0x866c]
mov dword [ebp - 0x8878], ecx
mov ecx, dword [ebp - 0x888c]
mov dword [ebp - 0x8880], edi
lea esi, [esi]
movzx edx, word [ecx + eax]
mov word [edi + eax], dx
add eax, 2
test dx, dx
jne 0x401d98
mov ecx, dword [ebp - 0x8878]
xor eax, eax
test ecx, ecx
setne al
mov dword [ebp - 0x8884], eax
mov eax, dword [sym.imp.kernel32.dll_GetFullPathNameW]
mov dword [ebp - 0x8888], eax
jmp 0x40183d
mov eax, dword [ebp - 0x8880]
call fcn.004013e0
mov esi, eax
mov eax, ebx
call fcn.004013e0
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Searching_in__s_for__s_n
mov dword [esp + 8], str.search_path
mov dword [esp + 4], 0x404000
mov dword [esp], 3
call fcn.00401500
jmp 0x401894
lea edx, [ebp - 0x8464]
jmp 0x401ac1