Function at 0x40f5c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe0c
mov eax, dword [0x439010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xe0c], eax
xor eax, eax
push 0xfe
push eax
mov word [ebp - 0x104], ax
lea eax, [ebp - 0x102]
push eax
mov dword [ebp - 0xe08], edi
call fcn.00413c30
xor eax, eax
push 0xfe
push eax
mov word [ebp - 0x204], ax
lea eax, [ebp - 0x202]
push eax
call fcn.00413c30
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add esp, 0x18
push 0x43ba60
push 0x80
call ebx
mov edx, 0x43ba60
lea ecx, [edx + 2]
jmp 0x40f640
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40f640
sub edx, ecx
mov ecx, 0x426f60
sar edx, 1
lea eax, [edx*2 + 0x43ba5e]
jmp 0x40f660
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f686
test dx, dx
je 0x40f682
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f686
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f660
xor eax, eax
jmp 0x40f68b
sbb eax, eax
or eax, 1
mov esi, 0x43ba60
test eax, eax
je 0x40f6b9
lea edi, [esi - 2]
jmp 0x40f6a0
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40f6a0
mov eax, dword [0x426f60]
mov dword [edi], eax
mov edi, dword [ebp - 0xe08]
push dword [ebp - 0xe0c]
push 0x43ba60
push 0x429794
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call edi
cmp eax, 0xffffffff
je 0x40f7ae
push 0x43ba60
push 0x80
call ebx
mov edx, 0x43ba60
lea ecx, [edx + 2]
jmp 0x40f710
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40f710
sub edx, ecx
mov ecx, 0x426f60
sar edx, 1
lea eax, [edx*2 + 0x43ba5e]
jmp 0x40f730
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40f756
test dx, dx
je 0x40f752
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40f756
add eax, 4
add ecx, 4
test dx, dx
jne 0x40f730
xor eax, eax
jmp 0x40f75b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f777
add esi, 0xfffffffe
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x40f762
mov eax, dword [0x426f60]
mov edi, esi
mov dword [edi], eax
push dword [ebp - 0xe0c]
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push 0x43ba60
push 0x429794
push dword [ebp - 0xe08]
call ebx
add esp, 0x10
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413026
mov esp, ebp
pop ebp
ret
call fcn.00412030
test eax, eax
jne 0x40f890
call fcn.00412090
test eax, eax
jne 0x40f890
cmp dword [0x43bf60], 0
lea eax, [ebp - 0x104]
push 0x100
push eax
je 0x40f860
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x40f8a6
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x104]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x206], ax
test ax, ax
jne 0x40f7f1
push str.Inf
lea eax, [ebp - 0x204]
push 0x80
push eax
call fcn.00414e8e
lea ecx, [ebp - 0x104]
add esp, 0xc
add ecx, 0xfffffffe
jmp 0x40f830
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40f830
mov eax, dword [str._system]
mov dword [ecx], eax
mov eax, dword [0x4297dc]
mov dword [ecx + 4], eax
mov eax, dword [0x4297e0]
mov dword [ecx + 8], eax
mov eax, dword [0x4297e4]
mov dword [ecx + 0xc], eax
jmp 0x40f943
push str.SysDir
push str.SoftwareMicrosoftWindowsCurrentVersionSetup
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00411f90
add esp, 0x14
test eax, eax
jne 0x40f943
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413026
mov esp, ebp
pop ebp
ret
push 0x100
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x40f8c6
push str.GetInfFile
call fcn.00401820
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413026
mov esp, ebp
pop ebp
ret
xor ecx, ecx
jmp 0x40f8d0
movzx eax, word [ebp + ecx - 0x104]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x206], ax
test ax, ax
jne 0x40f8d0
push str.Inf
lea eax, [ebp - 0x204]
push 0x80
push eax
call fcn.00414e8e
lea ecx, [ebp - 0x104]
add esp, 0xc
add ecx, 0xfffffffe
lea ebx, [ebx]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40f910
mov eax, dword [str._system32]
mov dword [ecx], eax
mov eax, dword [0x4297c8]
mov dword [ecx + 4], eax
mov eax, dword [0x4297cc]
mov dword [ecx + 8], eax
mov eax, dword [0x4297d0]
mov dword [ecx + 0xc], eax
mov eax, dword [0x4297d4]
mov dword [ecx + 0x10], eax
lea ecx, [ebp - 0x104]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f950
mov ebx, dword [ebp - 0xe0c]
sub ecx, edx
mov edx, ebx
sar ecx, 1
lea esi, [edx + 2]
lea ebx, [ebx]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40f970
mov eax, dword [ebp + 0x10]
sub edx, esi
sar edx, 1
dec eax
add ecx, edx
cmp ecx, eax
ja 0x40f8b3
mov esi, dword [ebp - 0xe08]
lea eax, [ebp - 0x104]
push ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push eax
push str._s_s
push esi
call ebx
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call edi
cmp eax, 0xffffffff
jne 0x40f798
push dword [ebp - 0xe0c]
lea eax, [ebp - 0x204]
push eax
push str._s_s
push esi
call ebx
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push esi
call edi
cmp eax, 0xffffffff
jne 0x40f798
cmp dword [0x43b64c], 0
jne 0x40fa6e
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [ebp - 0xa04]
push 0x200
push eax
push 0x9a
push dword [0x43b648]
call esi
test eax, eax
jle 0x40fa6e
push 0x200
lea eax, [ebp - 0x604]
push eax
push 0x9b
push dword [0x43b648]
call esi
test eax, eax
jle 0x40fa6e
lea eax, [ebp - 0x604]
push eax
push dword [ebp - 0xe08]
lea eax, [ebp - 0xa04]
push eax
lea eax, [ebp - 0xe04]
push str._s__s._n_s
push eax
call ebx
add esp, 0x14
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413026
mov esp, ebp
pop ebp
ret