Function at 0x409855
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, 0x4143c8
lea eax, [ebp - 0x54c]
push ebx
push eax
call edi
lea eax, [ebp - 0x204]
push 0x2a
push eax
call fcn.0040c3d7
pop ecx
test eax, eax
pop ecx
jne 0x4098aa
lea eax, [ebp - 0x204]
push 0x3f
push eax
call fcn.0040c3d7
pop ecx
test eax, eax
pop ecx
je 0x4098d1
lea eax, [ebp - 0x204]
push eax
call fcn.0040bc53
pop ecx
lea ecx, [ebp - 0x204]
cmp eax, ecx
jbe 0x4098d1
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 0x409af1
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 0x409af1
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 0x409af1
mov eax, dword [0x417870]
test eax, eax
je 0x40995c
push eax
lea eax, [ebp - 0x204]
push eax
call esi
test eax, eax
je 0x409af1
mov eax, dword [0x417c20]
cmp byte [eax], 0
je 0x409978
push eax
lea eax, [ebp - 0x204]
push eax
call esi
test eax, eax
je 0x409af1
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.0040adf2
add esp, 0xc
mov ebx, 0x41410c
test eax, eax
jne 0x409a25
test byte [ebp - 0x34c], 0x10
je 0x409a16
cmp byte [ebp - 0x44c], 0x2e
je 0x409a16
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.00409855
pop ecx
pop ecx
lea eax, [ebp - 0x44c]
push eax
call fcn.0040ae34
pop ecx
jmp 0x4099b5
lea eax, [ebp - 0x44c]
push eax
call fcn.0040ae71
cmp dword [ebp + 0xc], 0
pop ecx
je 0x409ae4
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.0040adf2
add esp, 0xc
test eax, eax
jne 0x409ad7
test byte [ebp - 0x34c], 0x10
jne 0x409ac8
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.0040adcf
lea eax, [ebp - 0x104]
push eax
call fcn.0040ab36
add esp, 0xc
lea eax, [ebp - 0x44c]
push eax
call fcn.0040ae34
pop ecx
jmp 0x409a74
lea eax, [ebp - 0x44c]
push eax
call fcn.0040ae71
pop ecx
lea eax, [ebp - 0x204]
push eax
call fcn.0040aaf5
pop ecx
pop edi
pop esi
pop ebx
leave
ret