Function at 0x401d60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov dword [ebp - 4], 0
mov eax, 1
test eax, eax
je 0x40211f
cmp dword [ebp - 4], 2
jne 0x401d88
jmp 0x40211f
cmp dword [ebp - 4], 0
jne 0x401de8
push 0x104
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
movsx eax, byte [ebp + eax - 0x111]
cmp eax, 0x5c
jne 0x401dd4
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
movsx edx, byte [ebp + eax - 0x111]
cmp edx, 0x2f
je 0x401de6
push 0x404590
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x401e4c
cmp dword [ebp - 4], 1
jne 0x401e4c
lea ecx, [ebp - 0x110]
push ecx
push 0
push 0
push 0x801a
push 0
call dword [sym.imp.SHFOLDER.dll_SHGetFolderPathA]
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
movsx eax, byte [ebp + eax - 0x111]
cmp eax, 0x5c
jne 0x401e3a
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
movsx edx, byte [ebp + eax - 0x111]
cmp edx, 0x2f
je 0x401e4c
push 0x404590
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, dword [ebp - 4]
neg ecx
sbb ecx, ecx
and ecx, 0xffffffeb
add ecx, 0x16
push ecx
call fcn.00401420
add esp, 4
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x114], 0
cmp dword [ebp - 4], 0
jne 0x401e8e
mov dword [ebp - 0x118], section..data
mov dword [ebp - 0x114], 0x16
jmp 0x401eaf
cmp dword [ebp - 4], 0
jne 0x401eaa
mov dword [ebp - 0x118], str.Microsoft_.
mov dword [ebp - 0x114], 1
jmp 0x401eaf
jmp 0x40211f
mov edx, dword [ebp - 0x11c]
shl edx, 6
add edx, dword [ebp - 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x401f55
mov byte [ebp - 0x11d], 0
push 0x40458c
mov eax, dword [ebp - 0x11c]
shl eax, 6
add eax, dword [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x401efa
mov byte [ebp - 0x11d], 1
mov ecx, dword [ebp - 0x11c]
shl ecx, 6
add ecx, dword [ebp - 0x118]
push ecx
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov al, byte [ebp - 0x11d]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x110]
push edx
call fcn.00401a60
add esp, 0xc
movzx eax, al
test eax, eax
je 0x401f3d
jmp 0x40211f
mov ecx, dword [ebp - 0x11c]
shl ecx, 6
mov edx, dword [ebp - 0x118]
mov byte [edx + ecx], 0
jmp 0x40211a
mov eax, dword [ebp - 0x11c]
cmp eax, dword [ebp - 0x114]
jae 0x401f8e
mov ecx, dword [ebp - 0x11c]
shl ecx, 6
add ecx, dword [ebp - 0x118]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x401f8e
mov edx, dword [ebp - 0x11c]
add edx, 1
mov dword [ebp - 0x11c], edx
jmp 0x401f55
mov eax, dword [ebp - 0x11c]
cmp eax, dword [ebp - 0x114]
jne 0x40209a
mov dword [ebp - 0x11c], 0
mov ecx, dword [ebp - 0x11c]
cmp ecx, dword [ebp - 0x114]
jae 0x401fe3
mov edx, dword [ebp - 0x11c]
shl edx, 6
add edx, dword [ebp - 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x401fe3
mov eax, dword [ebp - 0x11c]
add eax, 1
mov dword [ebp - 0x11c], eax
jmp 0x401faa
mov ecx, dword [ebp - 0x11c]
cmp ecx, dword [ebp - 0x114]
jne 0x402012
cmp dword [ebp - 4], 0
jne 0x402000
mov dword [ebp - 4], 1
jmp 0x40200d
cmp dword [ebp - 4], 1
jne 0x40200d
mov dword [ebp - 4], 2
jmp 0x402095
mov byte [ebp - 0x11e], 0
push 0x40458c
mov edx, dword [ebp - 0x11c]
shl edx, 6
add edx, dword [ebp - 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x40203f
mov byte [ebp - 0x11e], 1
mov eax, dword [ebp - 0x11c]
shl eax, 6
add eax, dword [ebp - 0x118]
push eax
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dl, byte [ebp - 0x11e]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x110]
push ecx
call fcn.00401a60
add esp, 0xc
movzx edx, al
test edx, edx
je 0x402082
jmp 0x40211f
mov eax, dword [ebp - 0x11c]
shl eax, 6
mov ecx, dword [ebp - 0x118]
mov byte [ecx + eax], 0
jmp 0x40211a
mov byte [ebp - 0x11f], 0
push 0x40458c
mov edx, dword [ebp - 0x11c]
shl edx, 6
add edx, dword [ebp - 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x4020c7
mov byte [ebp - 0x11f], 1
mov eax, dword [ebp - 0x11c]
shl eax, 6
add eax, dword [ebp - 0x118]
push eax
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dl, byte [ebp - 0x11f]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x110]
push ecx
call fcn.00401a60
add esp, 0xc
movzx edx, al
test edx, edx
je 0x402107
jmp 0x40211f
mov eax, dword [ebp - 0x11c]
shl eax, 6
mov ecx, dword [ebp - 0x118]
mov byte [ecx + eax], 0
jmp 0x401d70
mov esp, ebp
pop ebp
ret