Function at 0x408c23
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push 0x40
mov eax, 0x438ae6
call fcn.0041f07f
mov ebx, edx
mov edi, ecx
mov dword [ebp - 0x2c], edi
xor ecx, ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x34], ecx
push ecx
mov byte [ebp - 0x2c], cl
xor eax, eax
push dword [ebp - 0x2c]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x28]
push pe_nt_image_headers32
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.0040bcdf
push 8
pop esi
lea eax, [ebp - 0x28]
mov dword [ebp - 0x34], esi
cmp dword [ebp - 0x14], esi
jb 0x408c79
mov eax, dword [ebp - 0x28]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp eax, dword [ebp - 0x18]
jb 0x408cab
jne 0x408c8c
add eax, eax
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00409dc8
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jb 0x408ca1
mov eax, dword [ebp - 0x28]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00409dc8
xor eax, eax
lea ecx, [ebp - 0x4c]
inc eax
mov dword [ebp - 4], eax
mov edx, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dword [ebp - 0x2c], eax
call fcn.0040b996
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x30], 0x14
cmp dword [ebp - 0x38], esi
jb 0x408cde
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jb 0x408ce9
mov eax, dword [ebp - 0x28]
push ecx
push eax
call fcn.00423853
pop ecx
pop ecx
lea ecx, [ebp - 0x4c]
mov esi, eax
call fcn.00404e47
test esi, esi
jne 0x408d0d
xor ecx, ecx
xor eax, eax
cmp dword [ebp - 0x14], 8
jmp 0x408dcc
call fcn.00408a4a
test al, al
je 0x408d53
mov edx, dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
lea ecx, [ebp - 0x4c]
call fcn.0040b996
push 8
pop esi
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x30], 0x36
cmp dword [ebp - 0x38], esi
jb 0x408d39
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jb 0x408d44
mov eax, dword [ebp - 0x28]
push ecx
push eax
call fcn.00423853
pop ecx
pop ecx
test eax, eax
jne 0x408d56
jmp 0x408d5a
push 8
pop esi
mov byte [ebp - 0x2c], 0
test byte [ebp - 0x30], 2
je 0x408d68
lea ecx, [ebp - 0x4c]
call fcn.00404e47
cmp byte [ebp - 0x2c], 0
jne 0x408dc5
push ecx
lea ecx, [ebp - 0x28]
call fcn.0040aad0
mov eax, dword [ebx + 0x10]
cmp dword [ebx + 0x14], esi
jb 0x408d81
mov ebx, dword [ebx]
push eax
push ebx
lea ecx, [ebp - 0x28]
call fcn.0040b519
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jb 0x408d96
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x408dc5
test al, 0x10
jne 0x408dc5
lea ecx, [ebp - 0x28]
call fcn.00408838
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.00404a3f
cmp dword [ebp - 0x14], esi
jb 0x408dee
push dword [ebp - 0x28]
push 0
jmp 0x408de1
xor ecx, ecx
xor eax, eax
cmp dword [ebp - 0x14], esi
mov dword [edi], ecx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], 7
mov word [edi], ax
jb 0x408dee
push dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
call fcn.0041f02e
ret