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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x107fa78]
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
cmp eax, 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
je 0x106635c
push 0x100d310
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x106636f
call fcn.0105749a
test eax, eax
jne 0x106636f
mov dword [ebp - 0x42c], 1
cmp esi, edi
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x430], edi
jne 0x1066389
mov eax, 0x80004003
jmp 0x1066f5a
push 0x208
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
cmp eax, edi
pop ecx
mov dword [ebp - 0x434], eax
jne 0x10663a8
mov eax, 0x8007000e
jmp 0x1066f5a
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 0x10663f3
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 0x10663de
push 0x57
pop eax
test eax, eax
jle 0x1066f59
and eax, 0xffff
or eax, 0x80070000
jmp 0x1066f59
cmp edi, esi
jbe 0x106642d
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_
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x434], eax
je 0x10664b2
push eax
push edi
call ebx
push dword [ebp - 0x418]
call fcn.01056f43
test eax, eax
mov edi, dword [sym.imp.msvcrt.dll_wcsrchr]
mov ebx, 0x102
je 0x10664ea
push 0x5c
push dword [ebp - 0x418]
call edi
pop ecx
test eax, eax
pop ecx
lea esi, [ebx + 1]
lea eax, [ebp - 0x20c]
je 0x10664bc
push dword [ebp - 0x418]
push esi
push eax
call fcn.01034c79
cmp dword [ebp - 0x428], 0
je 0x106655c
push 0x100e530
push dword [ebp - 0x428]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x106655c
push 0x202
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
test eax, eax
pop ecx
mov dword [ebp - 0x41c], eax
jne 0x106653f
mov eax, 0x8007000e
jmp 0x1066f59
push dword [ebp - 0x434]
push esi
push eax
call fcn.01034c79
lea eax, [ebp - 0x20c]
push eax
call fcn.01056bba
push dword [ebp - 0x418]
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01034cee
jmp 0x1066471
push dword [ebp - 0x434]
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.01034c79
lea eax, [ebp - 0x20c]
push eax
call fcn.01056bba
push dword [ebp - 0x418]
mov esi, 0x103
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
lea eax, [ebp - 0x20c]
push eax
call fcn.01056f43
test eax, eax
jne 0x1066471
mov eax, 0x80070002
jmp 0x1066f59
push 0x100d404
push 0x100d344
push 0x100e524
push 0x100
push eax
call fcn.01034d76
add esp, 0x14
cmp dword [ebp + 0x10], 0
je 0x1066575
push 0
push 0x100e4d8
push 8
mov ecx, 0x10820c8
call fcn.01059acf
mov eax, dword [ebp - 0x420]
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x106660c
lea eax, [ebp - 0x20c]
push 0x3a
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
jne 0x1066606
lea eax, [ebp - 0x20c]
push 0x100e4cc
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
jne 0x1066606
push dword [ebp - 0x434]
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.01034c79
lea eax, [ebp - 0x414]
push eax
call fcn.01056bba
lea eax, [ebp - 0x20c]
push eax
push esi
lea eax, [ebp - 0x414]
push eax
call fcn.01034cee
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call edi
test eax, eax
pop ecx
pop ecx
je 0x106661a
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
jmp 0x1066613
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.01034c79
lea eax, [ebp - 0x414]
push 0x5c
push eax
call edi
xor edi, edi
cmp eax, edi
pop ecx
pop ecx
je 0x1066630
mov word [eax], di
lea eax, [ebp - 0x414]
push eax
call fcn.0105970f
test eax, eax
jne 0x1066653
push dword [ebp - 0x434]
lea eax, [ebp - 0x414]
push esi
push eax
call fcn.01034c79
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x414]
push eax
call fcn.01063671
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x440]
call fcn.01056aa6
push edi
push 2
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.0105e6fe
cmp eax, 0xffffffff
mov dword [ebp - 0x418], eax
je 0x1066e56
xor esi, esi
cmp dword [ebp - 0x42c], esi
mov ebx, 0x100d570
je 0x10666ee
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x438]
push eax
push ebx
push dword [ebp - 0x418]
mov dword [ebp - 0x438], esi
call fcn.0106487c
test eax, eax
jne 0x10666ee
cmp dword [ebp - 0x41c], esi
je 0x10666e2
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.01065373
mov edi, eax
test edi, edi
mov esi, 0x100d424
jge 0x1066749
cmp dword [ebp - 0x41c], 0
je 0x1066743
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1066743
push esi
push edi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x1066749
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x10667a3
mov ecx, dword [ebp - 0x420]
push 0
push 0
push ebx
push dword [ebp - 0x418]
call fcn.01065373
mov edi, eax
test edi, edi
jge 0x10667a3
cmp dword [ebp - 0x41c], 0
je 0x106679d
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x106679d
push esi
push edi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x10667a3
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.01064cdf
mov esi, eax
test esi, esi
jge 0x10667d7
mov ebx, esi
jmp 0x1066e48
xor esi, esi
cmp dword [ebp - 0x42c], esi
je 0x1066807
lea eax, [ebp - 0x440]
push eax
push ebx
push dword [ebp - 0x418]
lea eax, [ebp - 0x20c]
push eax
mov ecx, edi
call fcn.01064cdf
cmp eax, esi
jge 0x1066807
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x430]
push eax
push dword [ebp - 0x428]
mov ecx, edi
push dword [ebp - 0x418]
call fcn.01064796
cmp eax, 0xd2af9
mov dword [ebp - 0x438], eax
je 0x106686b
cmp dword [ebp - 0x42c], esi
je 0x106686b
cmp dword [ebp - 0x430], esi
je 0x1066850
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.01064796
mov dword [ebp - 0x438], eax
push dword [ebp - 0x428]
mov esi, dword [ebp - 0x418]
push esi
mov ecx, edi
call fcn.01064bae
push dword [ebp - 0x428]
mov ecx, edi
push esi
call fcn.010648f4
push dword [ebp - 0x428]
mov ecx, edi
push esi
call fcn.01064946
push 0
push 0
push dword [ebp - 0x428]
mov ecx, edi
push esi
call fcn.010656ff
mov esi, eax
test esi, esi
mov edi, 0x100d404
jge 0x10668ed
cmp dword [ebp - 0x41c], 0
je 0x10668e7
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x10668e7
push edi
push esi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x10668ed
mov dword [ebp - 0x424], esi
cmp dword [ebp - 0x42c], 0
je 0x1066947
mov ecx, dword [ebp - 0x420]
push 0
push 0
push ebx
push dword [ebp - 0x418]
call fcn.010656ff
mov esi, eax
test esi, esi
jge 0x1066947
cmp dword [ebp - 0x41c], 0
je 0x1066941
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1066941
push edi
push esi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x1066947
mov dword [ebp - 0x424], esi
mov ecx, dword [ebp - 0x420]
push 0
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.01063ff5
mov edi, eax
test edi, edi
mov esi, 0x100d368
jge 0x10669a0
cmp dword [ebp - 0x41c], 0
je 0x106699a
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x106699a
push esi
push edi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x10669a0
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x10669f8
mov ecx, dword [ebp - 0x420]
push 0
push ebx
push dword [ebp - 0x418]
call fcn.01063ff5
mov edi, eax
test edi, edi
jge 0x10669f8
cmp dword [ebp - 0x41c], 0
je 0x10669f2
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x10669f2
push esi
push edi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x10669f8
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.010658c0
mov esi, eax
cmp esi, edi
jge 0x1066a5a
cmp dword [ebp - 0x41c], edi
je 0x1066a52
mov edi, 0x100d344
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1066a52
push edi
push esi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x1066a7e
mov dword [ebp - 0x424], esi
jmp 0x1066a7e
cmp dword [ebp - 0x438], 0xd2af8
jne 0x1066a7e
cmp esi, 1
je 0x1066a7e
push edi
push dword [ebp - 0x430]
mov ecx, 0x10820c8
push 4
call fcn.01059acf
xor esi, esi
cmp dword [ebp - 0x42c], esi
je 0x1066ad2
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x440]
push eax
push esi
push ebx
push dword [ebp - 0x418]
call fcn.010658c0
cmp eax, esi
jge 0x1066aae
mov dword [ebp - 0x424], eax
jmp 0x1066ad2
cmp dword [ebp - 0x438], 0xd2af8
jne 0x1066ad2
cmp eax, 1
je 0x1066ad2
push esi
push dword [ebp - 0x430]
mov ecx, 0x10820c8
push 4
call fcn.01059acf
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x440]
push eax
push 1
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.010658c0
mov edi, eax
test edi, edi
jge 0x1066b34
cmp dword [ebp - 0x41c], 0
je 0x1066b2c
mov esi, 0x100d330
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1066b2c
push esi
push edi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x1066b59
mov dword [ebp - 0x424], edi
jmp 0x1066b59
cmp dword [ebp - 0x438], 0xd2af8
jne 0x1066b59
cmp edi, 1
je 0x1066b59
push 0
push dword [ebp - 0x430]
mov ecx, 0x10820c8
push 4
call fcn.01059acf
xor esi, esi
cmp dword [ebp - 0x42c], esi
je 0x1066bae
mov ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x440]
push eax
push 1
push ebx
push dword [ebp - 0x418]
call fcn.010658c0
cmp eax, esi
jge 0x1066b8a
mov dword [ebp - 0x424], eax
jmp 0x1066bae
cmp dword [ebp - 0x438], 0xd2af8
jne 0x1066bae
cmp eax, 1
je 0x1066bae
push esi
push dword [ebp - 0x430]
mov ecx, 0x10820c8
push 4
call fcn.01059acf
push dword [ebp - 0x428]
mov ecx, dword [ebp - 0x420]
push dword [ebp - 0x418]
call fcn.01064141
mov edi, eax
cmp edi, esi
jge 0x1066c04
cmp dword [ebp - 0x41c], esi
je 0x1066bfe
mov esi, 0x100d378
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1066bfe
push esi
push edi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x1066c04
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x1066c29
mov ecx, dword [ebp - 0x420]
push ebx
push dword [ebp - 0x418]
call fcn.01064141
test eax, eax
jge 0x1066c29
mov dword [ebp - 0x424], eax
mov ecx, dword [ebp - 0x420]
push 1
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.01063ff5
mov edi, eax
test edi, edi
jge 0x1066c82
cmp dword [ebp - 0x41c], 0
je 0x1066c7c
mov esi, 0x100d358
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1066c7c
push esi
push edi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x1066c82
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x1066ca9
mov ecx, dword [ebp - 0x420]
push 1
push ebx
push dword [ebp - 0x418]
call fcn.01063ff5
test eax, eax
jge 0x1066ca9
mov dword [ebp - 0x424], eax
mov eax, dword [0x10821d0]
mov ecx, dword [ebp - 0x420]
and eax, 8
push eax
push 1
push dword [ebp - 0x428]
push dword [ebp - 0x418]
call fcn.010656ff
mov edi, eax
test edi, edi
jge 0x1066d0b
cmp dword [ebp - 0x41c], 0
je 0x1066d05
mov esi, 0x100d3e8
push esi
push dword [ebp - 0x41c]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
je 0x1066d05
push esi
push edi
push 0x100e478
push 3
call fcn.0105e5ad
add esp, 0x10
jmp 0x1066d0b
mov dword [ebp - 0x424], edi
cmp dword [ebp - 0x42c], 0
je 0x1066d3b
mov eax, dword [0x10821d0]
mov ecx, dword [ebp - 0x420]
and eax, 8
push eax
push 1
push ebx
push dword [ebp - 0x418]
call fcn.010656ff
test eax, eax
jge 0x1066d3b
mov dword [ebp - 0x424], eax
push dword [ebp - 0x428]
mov ecx, dword [ebp - 0x420]
push dword [ebp - 0x418]
call fcn.0106523b
test eax, eax
jge 0x1066d5c
mov dword [ebp - 0x424], eax
cmp dword [ebp - 0x42c], 0
je 0x1066d81
mov ecx, dword [ebp - 0x420]
push ebx
push dword [ebp - 0x418]
call fcn.0106523b
test eax, eax
jge 0x1066d81
mov dword [ebp - 0x424], eax
mov eax, dword [0x10821d0]
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.01065373
mov esi, eax
test esi, esi
jge 0x1066db0
mov dword [ebp - 0x424], esi
cmp dword [ebp - 0x42c], 0
je 0x1066ddd
mov eax, dword [0x10821d0]
mov ecx, dword [ebp - 0x420]
and eax, 8
push eax
push 1
push ebx
push edi
call fcn.01065373
mov esi, eax
test esi, esi
jge 0x1066ddd
mov dword [ebp - 0x424], esi
test byte [0x10821d0], 8
jne 0x1066e42
push dword [ebp - 0x428]
mov ecx, dword [ebp - 0x420]
push edi
call fcn.01064af8
test eax, eax
jge 0x1066e02
mov dword [ebp - 0x424], eax
push dword [ebp - 0x428]
mov ecx, dword [ebp - 0x420]
push edi
call fcn.010649b4
mov esi, eax
test esi, esi
jge 0x1066e20
mov dword [ebp - 0x424], esi
cmp dword [ebp - 0x42c], 0
je 0x1066e42
mov ecx, dword [ebp - 0x420]
push ebx
push edi
call fcn.010649b4
mov esi, eax
test esi, esi
jge 0x1066e42
mov dword [ebp - 0x424], esi
mov ebx, dword [ebp - 0x424]
push dword [ebp - 0x418]
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
jmp 0x1066e8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, edi
jne 0x1066e65
push 0x57
pop eax
cmp eax, edi
jle 0x1066e71
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
push esi
lea eax, [ebp - 0x20c]
push eax
push 0x100e444
push 2
call fcn.0105e5ad
add esp, 0x10
mov ebx, edi
push dword [ebp - 0x434]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test esi, esi
jl 0x1066ec8
test ebx, ebx
jl 0x1066ec8
mov edi, 0x10820c8
mov ecx, edi
call fcn.010576f1
test eax, eax
je 0x1066f0d
mov ecx, edi
call fcn.010576f1
movzx ebx, al
shr ebx, 3
and ebx, 1
or ebx, 0xd2af8
jmp 0x1066f0d
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x100e410
push 2
call fcn.0105e5ad
mov edi, 0x10820c8
add esp, 0x10
mov ecx, edi
call fcn.010576f1
test eax, eax
je 0x1066f07
mov ecx, edi
call fcn.010576f1
movzx ebx, al
shr ebx, 3
and ebx, 1
or ebx, 0xc00d2afa
jmp 0x1066f0d
test esi, esi
jge 0x1066f0d
mov ebx, esi
push dword [ebp - 0x434]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
cmp dword [ebp - 0x41c], 0
pop ecx
je 0x1066f2e
push dword [ebp - 0x41c]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
cmp dword [ebp - 0x430], 0
je 0x1066f43
push dword [ebp - 0x430]
call sub.msvcrt.dll_void___cdecl_operator_delete___void__
pop ecx
push 1
mov ecx, edi
call fcn.01059a9c
lea ecx, [ebp - 0x440]
call fcn.01067ccb
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.01047417
leave
ret 0xc