Function at 0x4099d7
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54c
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp + 8]
lea eax, [ebp - 0x204]
push eax
call edi
mov ebx, str..
lea eax, [ebp - 0x54c]
push ebx
push eax
call edi
lea eax, [ebp - 0x204]
push 0x2a
push eax
call fcn.0040c57a
pop ecx
test eax, eax
pop ecx
jne 0x409a2c
lea eax, [ebp - 0x204]
push 0x3f
push eax
call fcn.0040c57a
pop ecx
test eax, eax
pop ecx
je 0x409a53
lea eax, [ebp - 0x204]
push eax
call fcn.0040bdf6
pop ecx
lea ecx, [ebp - 0x204]
cmp eax, ecx
jbe 0x409a53
lea esi, [eax - 1]
lea eax, [ebp - 0x54c]
push esi
push eax
call edi
and byte [esi], 0
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 4
jl 0x409c73
lea eax, [ebp - 0x104]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x204]
push eax
call esi
test eax, eax
je 0x409c73
lea eax, [ebp - 0x104]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x204]
push eax
call esi
test eax, eax
je 0x409c73
mov eax, dword [0x417888]
test eax, eax
je 0x409ade
push eax
lea eax, [ebp - 0x204]
push eax
call esi
test eax, eax
je 0x409c73
mov eax, dword [0x417c40]
cmp byte [eax], 0
je 0x409afa
push eax
lea eax, [ebp - 0x204]
push eax
call esi
test eax, eax
je 0x409c73
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x104]
push ebx
push eax
call esi
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x104]
push 0x17
push eax
call fcn.0040af95
add esp, 0xc
mov ebx, 0x4140ec
test eax, eax
jne 0x409ba7
test byte [ebp - 0x34c], 0x10
je 0x409b98
cmp byte [ebp - 0x44c], 0x2e
je 0x409b98
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
call edi
lea eax, [ebp - 0x104]
push ebx
push eax
call esi
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x104]
push eax
call esi
lea eax, [ebp - 0x54c]
push eax
lea eax, [ebp - 0x104]
push eax
call esi
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push eax
call fcn.004099d7
pop ecx
pop ecx
lea eax, [ebp - 0x44c]
push eax
call fcn.0040afd7
pop ecx
jmp 0x409b37
lea eax, [ebp - 0x44c]
push eax
call fcn.0040b014
cmp dword [ebp + 0xc], 0
pop ecx
je 0x409c66
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
call edi
lea eax, [ebp - 0x54c]
push eax
lea eax, [ebp - 0x104]
push eax
call esi
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x104]
push 7
push eax
call fcn.0040af95
add esp, 0xc
test eax, eax
jne 0x409c59
test byte [ebp - 0x34c], 0x10
jne 0x409c4a
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push eax
call edi
lea eax, [ebp - 0x104]
push ebx
push eax
call esi
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x104]
push eax
call esi
lea eax, [ebp - 0x104]
push 0
push eax
call fcn.0040af72
lea eax, [ebp - 0x104]
push eax
call fcn.0040acb8
add esp, 0xc
lea eax, [ebp - 0x44c]
push eax
call fcn.0040afd7
pop ecx
jmp 0x409bf6
lea eax, [ebp - 0x44c]
push eax
call fcn.0040b014
pop ecx
lea eax, [ebp - 0x204]
push eax
call fcn.0040ac77
pop ecx
pop edi
pop esi
pop ebx
leave
ret