Function at 0x40f350
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x530455
mov eax, dword fs:[0]
push eax
sub esp, 0x314
mov eax, dword [0x58c804]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x218], 0
push 0xd
push str._SystemDrive_
mov eax, dword [ebp + 0xc]
push eax
call fcn.0052d3c1
add esp, 0xc
test eax, eax
jne 0x40f417
push 0x200
lea ecx, [ebp - 0x214]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, dword [ebp + 0xc]
add edx, 0xf
mov dword [ebp - 0x2a4], edx
lea eax, [ebp - 0x213]
mov dword [ebp - 0x2a8], eax
mov ecx, dword [ebp - 0x2a8]
mov dword [ebp - 0x2ac], ecx
mov edx, dword [ebp - 0x2a4]
mov al, byte [edx]
mov byte [ebp - 0x2ad], al
mov ecx, dword [ebp - 0x2a8]
mov dl, byte [ebp - 0x2ad]
mov byte [ecx], dl
mov eax, dword [ebp - 0x2a4]
add eax, 1
mov dword [ebp - 0x2a4], eax
mov ecx, dword [ebp - 0x2a8]
add ecx, 1
mov dword [ebp - 0x2a8], ecx
cmp byte [ebp - 0x2ad], 0
jne 0x40f3d4
push 8
push str._windir_
mov edx, dword [ebp + 0xc]
push edx
call fcn.0052d3c1
add esp, 0xc
test eax, eax
jne 0x40f4eb
push 0x200
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ecx, dword [ebp + 0xc]
add ecx, 0xa
mov dword [ebp - 0x2b4], ecx
mov edx, dword [ebp - 0x2b4]
mov dword [ebp - 0x2b8], edx
mov eax, dword [ebp - 0x2b4]
mov cl, byte [eax]
mov byte [ebp - 0x2b9], cl
add dword [ebp - 0x2b4], 1
cmp byte [ebp - 0x2b9], 0
jne 0x40f45c
mov edx, dword [ebp - 0x2b4]
sub edx, dword [ebp - 0x2b8]
mov eax, dword [ebp - 0x2b8]
mov dword [ebp - 0x2c0], eax
mov dword [ebp - 0x2c4], edx
lea ecx, [ebp - 0x214]
add ecx, 0xffffffff
mov dword [ebp - 0x2c8], ecx
mov edx, dword [ebp - 0x2c8]
mov al, byte [edx + 1]
mov byte [ebp - 0x2c9], al
add dword [ebp - 0x2c8], 1
cmp byte [ebp - 0x2c9], 0
jne 0x40f4a7
mov edi, dword [ebp - 0x2c8]
mov esi, dword [ebp - 0x2c0]
mov edx, dword [ebp - 0x2c4]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40f68e
push 8
push str._windir_
mov eax, dword [ebp + 0xc]
push eax
call fcn.0052d3c1
add esp, 0xc
test eax, eax
jne 0x40f5bf
push 0x200
lea ecx, [ebp - 0x214]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edx, dword [ebp + 0xc]
add edx, 8
mov dword [ebp - 0x2d0], edx
mov eax, dword [ebp - 0x2d0]
mov dword [ebp - 0x2d4], eax
mov ecx, dword [ebp - 0x2d0]
mov dl, byte [ecx]
mov byte [ebp - 0x2d5], dl
add dword [ebp - 0x2d0], 1
cmp byte [ebp - 0x2d5], 0
jne 0x40f530
mov eax, dword [ebp - 0x2d0]
sub eax, dword [ebp - 0x2d4]
mov ecx, dword [ebp - 0x2d4]
mov dword [ebp - 0x2dc], ecx
mov dword [ebp - 0x2e0], eax
lea edx, [ebp - 0x214]
add edx, 0xffffffff
mov dword [ebp - 0x2e4], edx
mov eax, dword [ebp - 0x2e4]
mov cl, byte [eax + 1]
mov byte [ebp - 0x2e5], cl
add dword [ebp - 0x2e4], 1
cmp byte [ebp - 0x2e5], 0
jne 0x40f57b
mov edi, dword [ebp - 0x2e4]
mov esi, dword [ebp - 0x2dc]
mov edx, dword [ebp - 0x2e0]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40f68e
push 0xb
push str._systemdir_
mov eax, dword [ebp + 0xc]
push eax
call fcn.0052d3c1
add esp, 0xc
test eax, eax
jne 0x40f68e
push 0x200
lea ecx, [ebp - 0x214]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, dword [ebp + 0xc]
add edx, 0xb
mov dword [ebp - 0x2ec], edx
mov eax, dword [ebp - 0x2ec]
mov dword [ebp - 0x2f0], eax
mov ecx, dword [ebp - 0x2ec]
mov dl, byte [ecx]
mov byte [ebp - 0x2f1], dl
add dword [ebp - 0x2ec], 1
cmp byte [ebp - 0x2f1], 0
jne 0x40f604
mov eax, dword [ebp - 0x2ec]
sub eax, dword [ebp - 0x2f0]
mov ecx, dword [ebp - 0x2f0]
mov dword [ebp - 0x2f8], ecx
mov dword [ebp - 0x2fc], eax
lea edx, [ebp - 0x214]
add edx, 0xffffffff
mov dword [ebp - 0x300], edx
mov eax, dword [ebp - 0x300]
mov cl, byte [eax + 1]
mov byte [ebp - 0x301], cl
add dword [ebp - 0x300], 1
cmp byte [ebp - 0x301], 0
jne 0x40f64f
mov edi, dword [ebp - 0x300]
mov esi, dword [ebp - 0x2f8]
mov edx, dword [ebp - 0x2fc]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0xc
push str._systemroot_
mov eax, dword [ebp + 0xc]
push eax
call fcn.0052d3c1
add esp, 0xc
test eax, eax
jne 0x40f75f
push 0x200
lea ecx, [ebp - 0x214]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edx, dword [ebp + 0xc]
add edx, 0xc
mov dword [ebp - 0x308], edx
mov eax, dword [ebp - 0x308]
mov dword [ebp - 0x30c], eax
mov ecx, dword [ebp - 0x308]
mov dl, byte [ecx]
mov byte [ebp - 0x30d], dl
add dword [ebp - 0x308], 1
cmp byte [ebp - 0x30d], 0
jne 0x40f6d3
mov eax, dword [ebp - 0x308]
sub eax, dword [ebp - 0x30c]
mov ecx, dword [ebp - 0x30c]
mov dword [ebp - 0x314], ecx
mov dword [ebp - 0x318], eax
lea edx, [ebp - 0x214]
add edx, 0xffffffff
mov dword [ebp - 0x31c], edx
mov eax, dword [ebp - 0x31c]
mov cl, byte [eax + 1]
mov byte [ebp - 0x31d], cl
add dword [ebp - 0x31c], 1
cmp byte [ebp - 0x31d], 0
jne 0x40f71e
mov edi, dword [ebp - 0x31c]
mov esi, dword [ebp - 0x314]
mov edx, dword [ebp - 0x318]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40f789
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
call fcn.00401c80
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x218]
or ecx, 1
mov dword [ebp - 0x218], ecx
mov eax, dword [ebp + 8]
jmp 0x40f80d
lea edx, [ebp - 0x214]
push edx
lea ecx, [ebp - 0x10]
call fcn.00401c80
mov dword [ebp - 4], 1
push 0x544268
push 0x544460
lea ecx, [ebp - 0x10]
call fcn.004127e0
mov eax, dword [ebp - 0x10]
sub eax, 0x10
mov dword [ebp - 0x288], eax
mov ecx, dword [ebp - 0x288]
push ecx
call fcn.0040e870
add esp, 4
mov dword [ebp - 0x28c], eax
mov edx, dword [ebp - 0x28c]
add edx, 0x10
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov byte [ebp - 4], 2
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x218]
or ecx, 1
mov dword [ebp - 0x218], ecx
mov dword [ebp - 4], 3
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.00402030
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0051555a
mov esp, ebp
pop ebp
ret