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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa10
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xa0c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xa00], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xa08], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x9fc], eax
mov eax, dword [ebp + 0x1c]
push ebx
push esi
mov dword [ebp - 0xa10], eax
mov eax, dword [ebp + 0x20]
push edi
mov dword [ebp - 0xa04], eax
mov eax, dword [ebp + 0x24]
xor esi, esi
push 0x7fc
mov dword [ebp - 0x9f4], eax
lea eax, [ebp - 0x800]
push esi
push eax
mov dword [ebp - 0x9f8], esi
mov dword [ebp - 0x804], esi
call sub.msvcrt.dll_memset
add esp, 0xc
push 8
mov edi, 0x100125c
push edi
lea eax, [ebp - 0x9e4]
push eax
mov dword [ebp - 0x9e8], esi
mov dword [ebp - 0x9f0], esi
mov dword [ebp - 0x9ec], esi
call fcn.01004bb1
push 8
xor ebx, ebx
push edi
lea eax, [ebp - 0x994]
inc ebx
push eax
mov dword [ebp - 0x9dc], ebx
mov dword [ebp - 0x9d4], 0x120c0
mov dword [ebp - 0x9d0], esi
mov dword [ebp - 0x9cc], ebx
mov dword [ebp - 0x9c8], esi
mov dword [ebp - 0x9c4], 0x1001258
mov dword [ebp - 0x9c0], esi
mov dword [ebp - 0x9bc], esi
mov dword [ebp - 0x9b8], esi
mov dword [ebp - 0x9b4], esi
mov dword [ebp - 0x9b0], esi
mov dword [ebp - 0x9ac], esi
mov dword [ebp - 0x9a8], esi
mov dword [ebp - 0x9a4], esi
mov dword [ebp - 0x9a0], esi
mov dword [ebp - 0x99c], esi
call fcn.01004bb1
mov eax, dword [ebp - 0xa08]
push 8
mov dword [ebp - 0x968], eax
push edi
lea eax, [ebp - 0x944]
push eax
mov dword [ebp - 0x98c], 0xa
mov dword [ebp - 0x984], esi
mov dword [ebp - 0x980], esi
mov dword [ebp - 0x97c], ebx
mov dword [ebp - 0x978], esi
mov dword [ebp - 0x974], 0x1001254
mov dword [ebp - 0x970], esi
mov dword [ebp - 0x96c], esi
mov dword [ebp - 0x964], esi
mov dword [ebp - 0x960], esi
mov dword [ebp - 0x95c], esi
mov dword [ebp - 0x958], esi
mov dword [ebp - 0x954], esi
mov dword [ebp - 0x950], esi
mov dword [ebp - 0x94c], esi
call fcn.01004bb1
mov dword [ebp - 0x93c], 0xa
mov eax, dword [ebp - 0x9fc]
push 8
mov dword [ebp - 0x918], eax
push edi
lea eax, [ebp - 0x8f4]
push eax
mov dword [ebp - 0x934], esi
mov dword [ebp - 0x930], esi
mov dword [ebp - 0x92c], ebx
mov dword [ebp - 0x928], esi
mov dword [ebp - 0x924], 0x1001250
mov dword [ebp - 0x920], esi
mov dword [ebp - 0x91c], esi
mov dword [ebp - 0x914], esi
mov dword [ebp - 0x910], esi
mov dword [ebp - 0x90c], esi
mov dword [ebp - 0x908], esi
mov dword [ebp - 0x904], esi
mov dword [ebp - 0x900], esi
mov dword [ebp - 0x8fc], esi
call fcn.01004bb1
mov eax, dword [ebp - 0xa10]
push 8
mov dword [ebp - 0x8c8], eax
push edi
lea eax, [ebp - 0x8a4]
push eax
mov dword [ebp - 0x8ec], 0xa
mov dword [ebp - 0x8e4], esi
mov dword [ebp - 0x8e0], esi
mov dword [ebp - 0x8dc], ebx
mov dword [ebp - 0x8d8], esi
mov dword [ebp - 0x8d4], 0x100124c
mov dword [ebp - 0x8d0], esi
mov dword [ebp - 0x8cc], esi
mov dword [ebp - 0x8c4], esi
mov dword [ebp - 0x8c0], esi
mov dword [ebp - 0x8bc], esi
mov dword [ebp - 0x8b8], esi
mov dword [ebp - 0x8b4], esi
mov dword [ebp - 0x8b0], esi
mov dword [ebp - 0x8ac], esi
call fcn.01004bb1
mov eax, dword [ebp - 0x9f4]
push 8
mov dword [ebp - 0x878], eax
push edi
lea eax, [ebp - 0x854]
push eax
mov dword [ebp - 0x89c], 0xa
mov dword [ebp - 0x894], 0x20000
mov dword [ebp - 0x890], esi
mov dword [ebp - 0x88c], ebx
mov dword [ebp - 0x888], esi
mov dword [ebp - 0x884], 0x1001248
mov dword [ebp - 0x880], esi
mov dword [ebp - 0x87c], esi
mov dword [ebp - 0x874], esi
mov dword [ebp - 0x870], esi
mov dword [ebp - 0x86c], esi
mov dword [ebp - 0x868], esi
mov dword [ebp - 0x864], esi
mov dword [ebp - 0x860], esi
mov dword [ebp - 0x85c], esi
call fcn.01004bb1
mov edi, dword [ebp - 0xa04]
mov dword [ebp - 0x84c], ebx
mov dword [ebp - 0x844], 0xcfff1
mov dword [ebp - 0x840], esi
mov dword [ebp - 0x83c], esi
mov dword [ebp - 0x838], esi
mov dword [ebp - 0x834], 0x1001244
mov dword [ebp - 0x830], esi
mov dword [ebp - 0x82c], esi
mov dword [ebp - 0x828], edi
mov dword [ebp - 0x824], esi
mov dword [ebp - 0x820], esi
mov dword [ebp - 0x81c], esi
mov dword [ebp - 0x818], esi
mov dword [ebp - 0x814], esi
mov dword [ebp - 0x810], esi
mov dword [ebp - 0x80c], esi
call fcn.01006e35
mov dword [edi], eax
cmp eax, esi
jne 0x1001be7
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.01004213
call fcn.01004180
push eax
push 0x1389
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x1001238
push ebx
add eax, 0x40
push 2
push eax
call fcn.010059d1
add esp, 0x18
mov eax, ebx
jmp 0x1001f50
push esi
lea eax, [ebp - 0x9e4]
push eax
push 6
push 0xffffffffffffffff
push dword [ebp - 0xa0c]
mov dword [ebp - 0x828], edi
push dword [ebp + 8]
call fcn.01006aad
test eax, eax
je 0x1001bb6
mov ecx, dword [ebp - 0x9b8]
mov edi, dword [ebp - 0xa00]
mov eax, dword [ebp - 0x9f4]
mov dword [edi], ecx
mov eax, dword [eax]
cmp eax, ebx
jne 0x1001c88
cmp dword [ebp + 8], 2
jbe 0x1001c80
push 0x800401e4
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.01004213
call fcn.01004180
push eax
push 0x1389
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x1001238
push ebx
add eax, 0x40
push 2
push eax
call fcn.010059d1
add esp, 0x18
push 0x34
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01004c7a
jmp 0x1001be0
cmp eax, ebx
je 0x1001f4e
push 0x1001234
push ecx
call dword [sym.imp.SHLWAPI.dll_StrTrimW]
push esi
push dword [edi]
call fcn.01004462
test eax, eax
jne 0x1001cac
cmp dword [ebp - 0x9c8], esi
je 0x1001cac
push 0x41
jmp 0x1001c67
mov eax, dword [edi]
cmp eax, esi
je 0x1001cce
push 0x1001224
push eax
call dword [sym.imp.msvcrt.dll_wcspbrk]
pop ecx
pop ecx
mov dword [ebp - 0x9f8], eax
cmp eax, esi
je 0x1001cce
push 0x3a
jmp 0x1001c67
push esi
push dword [edi]
call fcn.01004462
test eax, eax
je 0x1001f4e
push esi
push dword [edi]
call fcn.01004462
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0x9e8], eax
cmp eax, esi
je 0x1001bb6
push eax
call fcn.01004628
shr eax, 1
push eax
push dword [edi]
push dword [ebp - 0x9e8]
call fcn.01004bf4
lea eax, [ebp - 0x9f8]
push eax
push dword [ebp - 0x9ec]
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0x9f4], eax
cmp eax, esi
je 0x1001bb1
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0x9ec], eax
cmp eax, esi
jne 0x1001d87
call fcn.01004180
push eax
push 0x1389
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x1001238
push ebx
add eax, 0x40
push 2
push eax
call fcn.010059d1
add esp, 0x18
lea eax, [ebp - 0x9e8]
push eax
call fcn.0100485a
jmp 0x1001be0
lea ecx, [ebp - 0x9f8]
push ecx
push eax
push dword [ebp - 0x9f4]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
jne 0x1001da8
call fcn.01004213
jmp 0x1001d4c
push esi
push dword [ebp - 0x9f0]
push dword [ebp - 0x9ec]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov dword [ebp - 0x9f4], eax
cmp eax, esi
jne 0x1001e0b
call fcn.01004213
call fcn.01004180
push eax
push 0x1389
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x1001238
push ebx
add eax, 0x40
push 2
push eax
call fcn.010059d1
add esp, 0x18
lea eax, [ebp - 0x9e8]
push eax
call fcn.0100485a
lea eax, [ebp - 0x9ec]
jmp 0x1001d7c
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [ebp - 0x9f0], eax
cmp eax, esi
je 0x1001dca
mov ecx, dword [ebp - 0x9f4]
add ecx, 5
push ecx
push eax
push dword [ebp - 0x9ec]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x1001e73
push 0x3a
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.01004c7a
lea eax, [ebp - 0x9e8]
push eax
call fcn.0100485a
lea eax, [ebp - 0x9ec]
push eax
call fcn.0100485a
lea eax, [ebp - 0x9f0]
jmp 0x1001d7c
push edi
call fcn.0100485a
push esi
push dword [ebp - 0x9f0]
call fcn.01004462
lea eax, [eax + eax + 0x14]
push eax
call fcn.0100457f
mov dword [edi], eax
cmp eax, esi
jne 0x1001ec1
call fcn.01004180
push eax
push 0x1389
call fcn.01005b24
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x1001238
push ebx
add eax, 0x40
push 2
push eax
call fcn.010059d1
add esp, 0x18
jmp 0x1001e50
push eax
call fcn.01004628
shr eax, 1
push eax
push dword [ebp - 0x9f0]
push dword [edi]
call fcn.01004bf4
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1001eeb
call fcn.01004213
jmp 0x1001e95
test al, 0x10
je 0x1001e3a
lea eax, [ebp - 0x804]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x400
push 0x1001220
lea eax, [ebp - 0x804]
push eax
call fcn.01004c37
push esi
push ebx
push dword [edi]
lea eax, [ebp - 0x804]
push eax
call fcn.01004483
test eax, eax
jne 0x1001f4e
push esi
push 0x1001218
push dword [ebp - 0x9e8]
call fcn.01004b84
mov dword [ebp - 0x9f8], eax
cmp eax, esi
jne 0x1001e3a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01003bc6
leave
ret 0x20