Function at 0x401730
Capabilities:
Get common file path

Disassembly:
sub esp, 0x788
mov dl, byte [0x40bee4]
push ebx
push ebp
push esi
push edi
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], dl
mov byte [esp + 0x90], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x91]
push 0x40bc50
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x80
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, 0x40bc50
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
push ecx
push 0x40bc50
call fcn.00404670
push 0x409180
push eax
call fcn.004045a0
add esp, 0x10
test eax, eax
je 0x4017d9
mov edi, 0x409180
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x40bc50
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebp, dword [esp + 0x7a8]
mov ebx, dword [esp + 0x7a0]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push ebp
push 0x40bc50
push str._s_s
push ebx
call esi
add esp, 0x10
lea eax, [esp + 0x110]
push 0x4000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
je 0x4018ad
push 0x40bc50
push 0x80
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, 0x40bc50
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
push ecx
push 0x40bc50
call fcn.00404670
push 0x409180
push eax
call fcn.004045a0
add esp, 0x10
test eax, eax
je 0x40188c
mov edi, 0x409180
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x40bc50
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push ebp
push 0x40bc50
push str._s_s
push ebx
call esi
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x788
ret
call fcn.00403540
test eax, eax
jne 0x401993
call fcn.00403580
test eax, eax
jne 0x401993
mov eax, dword [0x40bee0]
push 0x80
test eax, eax
lea eax, [esp + 0x14]
push eax
je 0x401969
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x401902
push str.GetInfFile
call fcn.00404280
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x788
ret
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x90]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x90]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Inf
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._system
jmp 0x401a23
push str.SysDir
push str.SoftwareMicrosoftWindowsCurrentVersionSetup
push 0x80000002
call fcn.00403e60
add esp, 0x14
test eax, eax
jne 0x401a4e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x788
ret
lea ecx, [esp + 0x10]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x4019c1
push str.GetInfFile
call fcn.00404280
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x788
ret
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x90]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x90]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Inf
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._system32
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x10]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x7a4]
not ecx
dec ecx
add edx, ecx
dec eax
cmp edx, eax
jbe 0x401a83
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x788
ret
lea ecx, [esp + 0x10]
push ebp
push ecx
push 0x409110
push ebx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_OpenFile]
add esp, 0x10
lea edx, [esp + 0x110]
push 0x4000
push edx
push ebx
call edi
cmp eax, 0xffffffff
jne 0x40189d
lea eax, [esp + 0x90]
push ebp
push eax
push 0x409110
push ebx
call esi
add esp, 0x10
lea ecx, [esp + 0x110]
push 0x4000
push ecx
push ebx
call edi
cmp eax, 0xffffffff
jne 0x40189d
mov eax, dword [0x40bedc]
test eax, eax
jne 0x401b55
mov eax, dword [0x40bed4]
lea edx, [esp + 0x198]
push 0x200
push edx
push 0x9a
push eax
call fcn.004030c0
add esp, 0x10
test eax, eax
jle 0x401b55
mov edx, dword [0x40bed4]
lea ecx, [esp + 0x398]
push 0x200
push ecx
push 0x9b
push edx
call fcn.004030c0
add esp, 0x10
test eax, eax
jle 0x401b55
lea eax, [esp + 0x398]
lea ecx, [esp + 0x198]
push eax
push ebx
push ecx
lea edx, [esp + 0x5a4]
push str._s__s._n_s
push edx
call esi
add esp, 0x14
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x788
ret