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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x101dc354]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, ecx
mov dword [ebp - 0x58], eax
mov ebx, edx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], esi
push edi
mov edi, 0x1003ed84
test eax, eax
jne 0x101067c5
push 0x1003ed7c
mov edx, 0x3cb
mov ecx, edi
call fcn.100e970f
test ebx, ebx
jne 0x101067da
push 0x1003edac
mov edx, 0x3cc
mov ecx, edi
call fcn.100e970f
test esi, esi
jne 0x101067ef
push 0x1003edc0
mov edx, 0x3cd
mov ecx, edi
call fcn.100e970f
xor ecx, ecx
mov edx, 0x104
mov eax, ecx
mov dword [ebp - 0x44], ecx
mov edi, ecx
mov dword [ebp - 0xc], ecx
mov ebx, ecx
mov dword [ebp - 8], ecx
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x54], eax
call fcn.100a70d5
mov esi, eax
test esi, esi
jns 0x1010683f
push 0x1003eddc
push 1
push esi
push 0x4000000
call fcn.100ab973
add esp, 0x10
jmp 0x10106bf1
mov eax, dword [ebp - 0x44]
xor ecx, ecx
push 0x104
push eax
mov word [eax], cx
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetWindowsDirectoryW]
mov esi, eax
cmp esi, 0x104
jbe 0x10106871
push 0x100349e4
mov edx, 0x3ea
mov ecx, 0x1003ed84
call fcn.100e970f
test esi, esi
jne 0x1010689a
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1010688c
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x10106893
mov esi, 0x80004005
push 0x100349f4
jmp 0x1010682a
lea ecx, [ebp - 0x44]
call fcn.100b15f5
mov esi, eax
test esi, esi
jns 0x101068b2
push 0x10039a0c
jmp 0x1010682a
mov edx, 0x1003ee08
lea ecx, [ebp - 0x44]
call fcn.100a8220
mov esi, eax
test esi, esi
jns 0x101068cf
push 0x1003ee30
jmp 0x1010682a
push dword [ebp - 0x44]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x101068eb
push 0x1003ee54
push 0
push 0
jmp 0x1010682d
xor esi, esi
push esi
push esi
push 3
push esi
push 1
push SysReAllocString
push dword [ebp - 0x44]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov dword [ebp - 0x64], eax
cmp eax, 0xffffffff
jne 0x10106932
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10106921
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x10106928
mov esi, 0x80004005
push 0x1003ee84
jmp 0x1010682a
lea ecx, [ebp - 0x14]
push ecx
push esi
push esi
push eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileTime]
test eax, eax
jne 0x1010697b
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1010695a
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x10106961
mov esi, 0x80004005
push 0x1003eeac
push 1
push esi
push 0x4000000
call fcn.100ab973
add esp, 0x10
jmp 0x10106be8
lea eax, [ebp - 0xc]
mov edx, 0x10008b40
push eax
push 0x1003eedc
push ecx
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.100b0f6f
mov esi, eax
test esi, esi
js 0x101069bc
push 8
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x101069d3
mov esi, 0x80004004
push 0x1003ef08
jmp 0x10106966
cmp esi, 0x80070002
je 0x101069d3
cmp esi, 0x80070003
je 0x101069d3
push 0x1003ef4c
jmp 0x10106966
lea eax, [ebp - 0x14]
mov edx, 0x10008b40
push eax
push 0x1003eedc
push 2
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.100e7afc
mov esi, eax
test esi, esi
jns 0x101069fd
push 0x1003ef84
jmp 0x10106966
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x38]
push eax
lea edx, [ebp - 8]
call fcn.100b9edc
test eax, eax
jns 0x10106a27
mov esi, eax
or esi, 0x10000000
push 0x1003efbc
jmp 0x10106966
cmp dword [ebp - 8], ebx
jge 0x10106b6d
push dword [ebp - 0x30]
mov eax, dword [ebp - 0x38]
mov edi, 0x1003efdc
shr eax, 1
push eax
lea eax, [ebp - 0x48]
push edi
push eax
call fcn.100a6b40
mov esi, eax
add esp, 0x10
test esi, esi
jns 0x10106a6e
push 0x1003efe8
push 1
push esi
push 0x4000000
call fcn.100ab973
mov edi, dword [ebp - 0x48]
add esp, 0x10
jmp 0x10106ba0
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x2c]
shr eax, 1
push eax
lea eax, [ebp - 0x4c]
push edi
push eax
call fcn.100a6b40
mov esi, eax
add esp, 0x10
test esi, esi
jns 0x10106aa7
push 0x1003f014
push 1
push esi
push 0x4000000
call fcn.100ab973
mov ebx, dword [ebp - 0x4c]
add esp, 0x10
jmp 0x10106b8f
mov edi, dword [ebp - 0x48]
push 0x1003f044
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
mov ebx, dword [ebp - 0x4c]
pop ecx
pop ecx
test eax, eax
je 0x10106c29
push 0x1003f058
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10106c29
push 0x1003f06c
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10106c29
push 0x1003f084
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10106c29
push 0x1003f0a0
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10106c29
push 0x1003f0b8
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10106c29
push 0x1003f0d8
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10106c15
push 0x1003f0ec
push edi
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10106c15
test ebx, ebx
je 0x10106b6d
lea eax, [ebx - 4]
push eax
call fcn.100b84f9
pop ecx
xor ebx, ebx
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x58]
mov edx, dword [ebp - 8]
mov dword [edi], edx
mov edx, dword [ebp - 0x5c]
mov dword [edx], eax
mov eax, dword [ebp - 0x60]
mov dword [eax], ecx
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], ecx
mov edi, dword [ebp - 0x48]
test ebx, ebx
je 0x10106ba0
lea eax, [ebx - 4]
push eax
call fcn.100b84f9
pop ecx
test edi, edi
je 0x10106bae
lea eax, [edi - 4]
push eax
call fcn.100b84f9
pop ecx
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x10106bbf
add eax, 0xfffffffc
push eax
call fcn.100b84f9
pop ecx
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x10106bd0
add eax, 0xfffffffc
push eax
call fcn.100b84f9
pop ecx
lea ecx, [ebp - 0x2c]
call fcn.1009502f
lea ecx, [ebp - 0x38]
call fcn.1009502f
lea ecx, [ebp - 0x20]
call fcn.1009502f
push dword [ebp - 0x64]
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x10106c02
add eax, 0xfffffffc
push eax
call fcn.100b84f9
pop ecx
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100b88c0
leave
ret 4
push 0x2c
push ebx
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x10106c29
xor ecx, ecx
mov word [eax], cx
test ebx, ebx
je 0x10106b6d
push 0x5c
push ebx
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcsrchr]
pop ecx
pop ecx
test eax, eax
je 0x10106c45
add eax, 2
jmp 0x10106c47
mov eax, ebx
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.100a7590
mov esi, eax
test esi, esi
jns 0x10106c77
push 0x1003f114
push 1
push esi
push 0x4000000
call fcn.100ab973
mov eax, dword [ebp - 0x50]
add esp, 0x10
mov dword [ebp - 0x3c], eax
jmp 0x10106b92
lea edx, [ebp - 0x54]
lea ecx, [ebp - 0x20]
call fcn.101075b8
mov esi, eax
test esi, esi
jns 0x10106cae
push 0x1003f13c
push 1
push esi
push 0x4000000
call fcn.100ab973
mov eax, dword [ebp - 0x50]
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x40], eax
jmp 0x10106b92
mov eax, dword [ebp - 0x50]
xor esi, esi
mov ecx, dword [ebp - 0x54]
jmp 0x10106b73