Function at 0x10636e3
Capabilities:
Get common file path
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x1072c48]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 0x420], ecx
mov dword [ebp - 0x418], esi
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], edi
mov dword [ebp - 0x42c], edi
cmp eax, edi
je 0x1063736
push 0x100c900
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1063749
call fcn.01056644
test eax, eax
jne 0x1063749
mov dword [ebp - 0x42c], 1
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x430], edi
cmp esi, edi
jne 0x1063763
mov eax, 0x80004003
jmp 0x106433a
push 0x208
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 0x434], eax
cmp eax, edi
jne 0x1063782
mov eax, 0x8007000e
jmp 0x106433a
push ebx
push dword [ebp - 0x434]
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, 0x104
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x10637cd
push dword [ebp - 0x434]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10637b8
push 0x57
pop eax
test eax, eax
jle 0x1064339
and eax, 0xffff
or eax, 0x80070000
jmp 0x1064339
cmp edi, esi
jbe 0x1063807
push dword [ebp - 0x434]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
pop ecx
mov dword [ebp - 0x434], eax
test eax, eax
je 0x106388c
push eax
push edi
call ebx
push dword [ebp - 0x418]
call fcn.010561ca
mov edi, dword [sym.imp.msvcrt.dll_wcsrchr]
mov ebx, 0x102
test eax, eax
je 0x10638c4
push 0x5c
push dword [ebp - 0x418]
call edi
pop ecx
test eax, eax
pop ecx
lea esi, [ebx + 1]
lea eax, [ebp - 0x20c]
je 0x1063896
push dword [ebp - 0x418]
push esi
push eax
call fcn.01035811
cmp dword [ebp - 0x428], 0
je 0x1063936
push 0x100da70
push dword [ebp - 0x428]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063936
push 0x202
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
pop ecx
mov dword [ebp - 0x41c], eax
test eax, eax
jne 0x1063919
mov eax, 0x8007000e
jmp 0x1064339
push dword [ebp - 0x434]
push esi
push eax
call fcn.01035811
lea eax, [ebp - 0x20c]
push eax
call fcn.01055e3d
push dword [ebp - 0x418]
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01035886
jmp 0x106384b
push dword [ebp - 0x434]
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.01035811
lea eax, [ebp - 0x20c]
push eax
call fcn.01055e3d
push dword [ebp - 0x418]
mov esi, 0x103
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01035886
lea eax, [ebp - 0x20c]
push eax
call fcn.010561ca
test eax, eax
jne 0x106384b
mov eax, 0x80070002
jmp 0x1064339
push 0x100c9f4
push 0x100c934
push 0x100da64
push 0x100
push eax
call fcn.0103590d
add esp, 0x14
cmp dword [ebp + 0x10], 0
je 0x106394f
push 0
push 0x100da18
push 8
mov ecx, 0x10746c8
call fcn.01058b11
mov eax, dword [ebp - 0x420]
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x10639e6
lea eax, [ebp - 0x20c]
push 0x3a
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
jne 0x10639e0
lea eax, [ebp - 0x20c]
push 0x100da0c
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x10639e0
push dword [ebp - 0x434]
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.01035811
lea eax, [ebp - 0x414]
push eax
call fcn.01055e3d
lea eax, [ebp - 0x20c]
push eax
push esi
lea eax, [ebp - 0x414]
push eax
call fcn.01035886
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call edi
pop ecx
pop ecx
test eax, eax
je 0x10639f4
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
jmp 0x10639ed
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.01035811
lea eax, [ebp - 0x414]
push 0x5c
push eax
call edi
pop ecx
pop ecx
test eax, eax
je 0x1063a0a
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x414]
push eax
call fcn.010587c1
test eax, eax
jne 0x1063a2d
push dword [ebp - 0x434]
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.01035811
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x414]
push eax
call fcn.01060b13
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x440]
call fcn.0106434f
push 0
push 2
push 0
lea eax, [ebp - 0x20c]
push eax
call fcn.0105c63f
mov dword [ebp - 0x418], eax
cmp eax, 0xffffffff
je 0x1064232
xor esi, esi
mov ebx, 0x100cb60
cmp dword [ebp - 0x42c], esi
je 0x1063aca
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x438]
push eax
push ebx
push dword [ebp - 0x418]
mov dword [ebp - 0x438], esi
call fcn.01061c12
test eax, eax
jne 0x1063aca
cmp dword [ebp - 0x41c], esi
je 0x1063abe
push dword [ebp - 0x41c]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov eax, dword [ebp - 0x438]
mov dword [ebp - 0x41c], eax
mov ecx, dword [ebp - 0x420]
push 0
push 0
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.0106270d
mov edi, eax
mov esi, 0x100ca14
test edi, edi
jge 0x1063b25
cmp dword [ebp - 0x41c], 0
je 0x1063b1f
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063b1f
push esi
push edi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063b25
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x1063b7f
mov ecx, dword [ebp - 0x420]
push 0
push 0
push ebx
push dword [ebp - 0x418]
call fcn.0106270d
mov edi, eax
test edi, edi
jge 0x1063b7f
cmp dword [ebp - 0x41c], 0
je 0x1063b79
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063b79
push esi
push edi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063b7f
mov dword [ebp - 0x424], edi
mov edi, dword [ebp - 0x420]
lea eax, [ebp - 0x440]
push eax
push dword [ebp - 0x428]
lea eax, [ebp - 0x20c]
push dword [ebp - 0x418]
mov ecx, edi
push eax
call fcn.01062075
mov esi, eax
test esi, esi
jge 0x1063bb3
mov ebx, esi
jmp 0x1064224
xor esi, esi
cmp dword [ebp - 0x42c], esi
je 0x1063be3
lea eax, [ebp - 0x440]
push eax
push ebx
push dword [ebp - 0x418]
lea eax, [ebp - 0x20c]
push eax
mov ecx, edi
call fcn.01062075
cmp eax, esi
jge 0x1063be3
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x430]
push eax
push dword [ebp - 0x428]
mov ecx, edi
push dword [ebp - 0x418]
call fcn.01061b2c
mov dword [ebp - 0x438], eax
cmp eax, 0xd2af9
je 0x1063c47
cmp dword [ebp - 0x42c], esi
je 0x1063c47
cmp dword [ebp - 0x430], esi
je 0x1063c2c
push dword [ebp - 0x430]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
mov dword [ebp - 0x430], esi
lea eax, [ebp - 0x430]
push eax
push ebx
push dword [ebp - 0x418]
mov ecx, edi
call fcn.01061b2c
mov dword [ebp - 0x438], eax
push dword [ebp - 0x428]
mov esi, dword [ebp - 0x418]
push esi
mov ecx, edi
call fcn.01061f44
push dword [ebp - 0x428]
mov ecx, edi
push esi
call fcn.01061c8a
push dword [ebp - 0x428]
mov ecx, edi
push esi
call fcn.01061cdc
push 0
push 0
push dword [ebp - 0x428]
mov ecx, edi
push esi
call fcn.01062a9e
mov esi, eax
mov edi, 0x100c9f4
test esi, esi
jge 0x1063cc9
cmp dword [ebp - 0x41c], 0
je 0x1063cc3
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063cc3
push edi
push esi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063cc9
mov dword [ebp - 0x424], esi
cmp dword [ebp - 0x42c], 0
je 0x1063d23
mov ecx, dword [ebp - 0x420]
push 0
push 0
push ebx
push dword [ebp - 0x418]
call fcn.01062a9e
mov esi, eax
test esi, esi
jge 0x1063d23
cmp dword [ebp - 0x41c], 0
je 0x1063d1d
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063d1d
push edi
push esi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063d23
mov dword [ebp - 0x424], esi
mov ecx, dword [ebp - 0x420]
push 0
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.010613e6
mov edi, eax
mov esi, 0x100c958
test edi, edi
jge 0x1063d7c
cmp dword [ebp - 0x41c], 0
je 0x1063d76
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063d76
push esi
push edi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063d7c
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x1063dd4
mov ecx, dword [ebp - 0x420]
push 0
push ebx
push dword [ebp - 0x418]
call fcn.010613e6
mov edi, eax
test edi, edi
jge 0x1063dd4
cmp dword [ebp - 0x41c], 0
je 0x1063dce
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063dce
push esi
push edi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063dd4
mov dword [ebp - 0x424], edi
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x440]
push eax
xor edi, edi
push edi
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.01062c61
mov esi, eax
cmp esi, edi
jge 0x1063e36
cmp dword [ebp - 0x41c], edi
je 0x1063e2e
mov edi, 0x100c934
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063e2e
push edi
push esi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063e5a
mov dword [ebp - 0x424], esi
jmp 0x1063e5a
cmp dword [ebp - 0x438], 0xd2af8
jne 0x1063e5a
cmp esi, 1
je 0x1063e5a
push edi
push dword [ebp - 0x430]
mov ecx, 0x10746c8
push 4
call fcn.01058b11
xor esi, esi
cmp dword [ebp - 0x42c], esi
je 0x1063eae
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x440]
push eax
push esi
push ebx
push dword [ebp - 0x418]
call fcn.01062c61
cmp eax, esi
jge 0x1063e8a
mov dword [ebp - 0x424], eax
jmp 0x1063eae
cmp dword [ebp - 0x438], 0xd2af8
jne 0x1063eae
cmp eax, 1
je 0x1063eae
push esi
push dword [ebp - 0x430]
mov ecx, 0x10746c8
push 4
call fcn.01058b11
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x440]
push eax
push 1
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.01062c61
mov edi, eax
test edi, edi
jge 0x1063f10
cmp dword [ebp - 0x41c], 0
je 0x1063f08
mov esi, 0x100c920
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063f08
push esi
push edi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063f35
mov dword [ebp - 0x424], edi
jmp 0x1063f35
cmp dword [ebp - 0x438], 0xd2af8
jne 0x1063f35
cmp edi, 1
je 0x1063f35
push 0
push dword [ebp - 0x430]
mov ecx, 0x10746c8
push 4
call fcn.01058b11
xor esi, esi
cmp dword [ebp - 0x42c], esi
je 0x1063f8a
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x440]
push eax
push 1
push ebx
push dword [ebp - 0x418]
call fcn.01062c61
cmp eax, esi
jge 0x1063f66
mov dword [ebp - 0x424], eax
jmp 0x1063f8a
cmp dword [ebp - 0x438], 0xd2af8
jne 0x1063f8a
cmp eax, 1
je 0x1063f8a
push esi
push dword [ebp - 0x430]
mov ecx, 0x10746c8
push 4
call fcn.01058b11
push dword [ebp - 0x428]
mov ecx, dword [ebp - 0x420]
push dword [ebp - 0x418]
call fcn.01061534
mov edi, eax
cmp edi, esi
jge 0x1063fe0
cmp dword [ebp - 0x41c], esi
je 0x1063fda
mov esi, 0x100c968
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1063fda
push esi
push edi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x1063fe0
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x1064005
mov ecx, dword [ebp - 0x420]
push ebx
push dword [ebp - 0x418]
call fcn.01061534
test eax, eax
jge 0x1064005
mov dword [ebp - 0x424], eax
mov ecx, dword [ebp - 0x420]
push 1
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.010613e6
mov edi, eax
test edi, edi
jge 0x106405e
cmp dword [ebp - 0x41c], 0
je 0x1064058
mov esi, 0x100c948
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x1064058
push esi
push edi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x106405e
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x1064085
mov ecx, dword [ebp - 0x420]
push 1
push ebx
push dword [ebp - 0x418]
call fcn.010613e6
test eax, eax
jge 0x1064085
mov dword [ebp - 0x424], eax
mov eax, dword [0x10747d0]
mov ecx, dword [ebp - 0x420]
and eax, 8
push eax
push 1
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.01062a9e
mov edi, eax
test edi, edi
jge 0x10640e7
cmp dword [ebp - 0x41c], 0
je 0x10640e1
mov esi, 0x100c9d8
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x10640e1
push esi
push edi
push 0x100d9b8
push 3
call fcn.01055c69
add esp, 0x10
jmp 0x10640e7
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x1064117
mov eax, dword [0x10747d0]
mov ecx, dword [ebp - 0x420]
and eax, 8
push eax
push 1
push ebx
push dword [ebp - 0x418]
call fcn.01062a9e
test eax, eax
jge 0x1064117
mov dword [ebp - 0x424], eax
push dword [ebp - 0x428]
mov ecx, dword [ebp - 0x420]
push dword [ebp - 0x418]
call fcn.010625d5
test eax, eax
jge 0x1064138
mov dword [ebp - 0x424], eax
cmp dword [ebp - 0x42c], 0
je 0x106415d
mov ecx, dword [ebp - 0x420]
push ebx
push dword [ebp - 0x418]
call fcn.010625d5
test eax, eax
jge 0x106415d
mov dword [ebp - 0x424], eax
mov eax, dword [0x10747d0]
mov edi, dword [ebp - 0x418]
mov ecx, dword [ebp - 0x420]
and eax, 8
push eax
push 1
push dword [ebp - 0x428]
push edi
call fcn.0106270d
mov esi, eax
test esi, esi
jge 0x106418c
mov dword [ebp - 0x424], esi
cmp dword [ebp - 0x42c], 0
je 0x10641b9
mov eax, dword [0x10747d0]
mov ecx, dword [ebp - 0x420]
and eax, 8
push eax
push 1
push ebx
push edi
call fcn.0106270d
mov esi, eax
test esi, esi
jge 0x10641b9
mov dword [ebp - 0x424], esi
test byte [0x10747d0], 8
jne 0x106421e
push dword [ebp - 0x428]
mov ecx, dword [ebp - 0x420]
push edi
call fcn.01061e8e
test eax, eax
jge 0x10641de
mov dword [ebp - 0x424], eax
push dword [ebp - 0x428]
mov ecx, dword [ebp - 0x420]
push edi
call fcn.01061d4a
mov esi, eax
test esi, esi
jge 0x10641fc
mov dword [ebp - 0x424], esi
cmp dword [ebp - 0x42c], 0
je 0x106421e
mov ecx, dword [ebp - 0x420]
push ebx
push edi
call fcn.01061d4a
mov esi, eax
test esi, esi
jge 0x106421e
mov dword [ebp - 0x424], esi
mov ebx, dword [ebp - 0x424]
push dword [ebp - 0x418]
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
jmp 0x106426c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1064241
push 0x57
pop eax
test eax, eax
jle 0x106424d
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
push esi
lea eax, [ebp - 0x20c]
push eax
push 0x100d984
push 2
call fcn.01055c69
mov ebx, dword [ebp - 0x424]
add esp, 0x10
push dword [ebp - 0x434]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test esi, esi
jl 0x10642a8
test ebx, ebx
jl 0x10642a8
mov edi, 0x10746c8
mov ecx, edi
call fcn.0105689b
test eax, eax
je 0x10642ed
mov ecx, edi
call fcn.0105689b
movzx ebx, al
shr ebx, 3
and ebx, 1
or ebx, 0xd2af8
jmp 0x10642ed
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x100d950
push 2
call fcn.01055c69
mov edi, 0x10746c8
add esp, 0x10
mov ecx, edi
call fcn.0105689b
test eax, eax
je 0x10642e7
mov ecx, edi
call fcn.0105689b
movzx ebx, al
shr ebx, 3
and ebx, 1
or ebx, 0xc00d2afa
jmp 0x10642ed
test esi, esi
jge 0x10642ed
mov ebx, esi
push dword [ebp - 0x434]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
cmp dword [ebp - 0x41c], 0
pop ecx
je 0x106430e
push dword [ebp - 0x41c]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
cmp dword [ebp - 0x430], 0
je 0x1064323
push dword [ebp - 0x430]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
push 1
mov ecx, edi
call fcn.01058ade
lea ecx, [ebp - 0x440]
call fcn.0106435e
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.01047464
leave
ret 0xc