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

Disassembly:
push 0x40
mov eax, 0x43c276
call fcn.004227df
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.0040bd3f
push 8
pop esi
lea eax, [ebp - 0x28]
mov dword [ebp - 0x34], esi
cmp dword [ebp - 0x14], esi
jb 0x408cd9
mov eax, dword [ebp - 0x28]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp eax, dword [ebp - 0x18]
jb 0x408d0b
jne 0x408cec
add eax, eax
push ecx
push eax
lea ecx, [ebp - 0x28]
call fcn.00409e28
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jb 0x408d01
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.00409e28
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.0040b9f6
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x30], 0x14
cmp dword [ebp - 0x38], esi
jb 0x408d3e
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jb 0x408d49
mov eax, dword [ebp - 0x28]
push ecx
push eax
call fcn.00426fe3
pop ecx
pop ecx
lea ecx, [ebp - 0x4c]
mov esi, eax
call fcn.00404ea7
test esi, esi
jne 0x408d6d
xor ecx, ecx
xor eax, eax
cmp dword [ebp - 0x14], 8
jmp 0x408e2c
call fcn.00408aaa
test al, al
je 0x408db3
mov edx, dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
lea ecx, [ebp - 0x4c]
call fcn.0040b9f6
push 8
pop esi
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x30], 0x36
cmp dword [ebp - 0x38], esi
jb 0x408d99
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jb 0x408da4
mov eax, dword [ebp - 0x28]
push ecx
push eax
call fcn.00426fe3
pop ecx
pop ecx
test eax, eax
jne 0x408db6
jmp 0x408dba
push 8
pop esi
mov byte [ebp - 0x2c], 0
test byte [ebp - 0x30], 2
je 0x408dc8
lea ecx, [ebp - 0x4c]
call fcn.00404ea7
cmp byte [ebp - 0x2c], 0
jne 0x408e25
push ecx
lea ecx, [ebp - 0x28]
call fcn.0040ab30
mov eax, dword [ebx + 0x10]
cmp dword [ebx + 0x14], esi
jb 0x408de1
mov ebx, dword [ebx]
push eax
push ebx
lea ecx, [ebp - 0x28]
call fcn.0040b579
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], esi
jb 0x408df6
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x408e25
test al, 0x10
jne 0x408e25
lea ecx, [ebp - 0x28]
call fcn.00408898
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.00404a9f
cmp dword [ebp - 0x14], esi
jb 0x408e4e
push dword [ebp - 0x28]
push 0
jmp 0x408e41
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 0x408e4e
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.0042278e
ret