Function at 0x401220
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
pushal
mov dword [0x4022f0], ebp
mov dword [ebp - 0x144], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x158], eax
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x13c], 0x64
mov dword [ebp - 0x11c], 1
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x138], 1
mov dword [ebp - 0x118], 3
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x13c], 0x64
mov dword [ebp - 0x11c], 1
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x138], 1
mov dword [ebp - 0x118], 3
push 0x104
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
call fcn.00401700
push 1
call dword [sym.imp.USER32.dll_GetSystemMetrics]
cmp eax, 0xc8
jge 0x4012fe
xor eax, eax
jmp 0x4016f2
mov edx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x15c], edx
lea eax, [ebp - 0x128]
push eax
push 0x20019
push 0
push 0x402088
push 0x80000002
call dword [ebp - 0x15c]
test eax, eax
je 0x40133b
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016f2
lea ecx, [ebp - 0x128]
push ecx
push 0x20019
push 0
push str.Classes
mov edx, dword [ebp - 0x128]
push edx
call dword [ebp - 0x15c]
test eax, eax
je 0x40136e
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016f2
lea eax, [ebp - 0x128]
push eax
push 0x20019
push 0
push str.CLSID
mov ecx, dword [ebp - 0x128]
push ecx
call dword [ebp - 0x15c]
test eax, eax
je 0x4013a1
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016f2
lea edx, [ebp - 0x128]
push edx
push 0x20019
push 0
push str.00000507_0000_0010_8000_00AA006D2EA4
mov eax, dword [ebp - 0x128]
push eax
call dword [ebp - 0x15c]
test eax, eax
je 0x4013d4
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016f2
lea ecx, [ebp - 0x128]
push ecx
push 0x20019
push 0
push str.VersionIndependentProgID
mov edx, dword [ebp - 0x128]
push edx
call dword [ebp - 0x15c]
test eax, eax
je 0x401407
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016f2
lea eax, [ebp - 0x128]
push eax
push 0x20019
push 0
push str.844849984
mov ecx, dword [ebp - 0x128]
push ecx
call dword [ebp - 0x15c]
test eax, eax
jne 0x40143a
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016f2
call fcn.00401000
mov edx, dword [0x4022e8]
push edx
call fcn.00401020
add esp, 4
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x148]
push eax
call fcn.00401100
add esp, 4
mov dword [ebp - 0x140], eax
mov ecx, dword [ebp - 0x148]
push ecx
push 0
mov edx, dword [ebp - 0x140]
push edx
call fcn.00401140
add esp, 0xc
mov eax, dword [ebp - 0x148]
mov dword [ebp - 0x150], eax
mov ecx, dword [ebp - 0x144]
cmp ecx, dword [ebp - 0x148]
jae 0x401525
mov edx, dword [ebp - 0x150]
push edx
mov eax, dword [ebp - 0x13c]
push eax
call fcn.00401150
add esp, 8
mov dword [ebp - 0x154], eax
mov ecx, dword [ebp - 0x154]
push ecx
mov edx, dword [0x4022e8]
add edx, dword [ebp - 0x124]
push edx
mov eax, dword [ebp - 0x140]
add eax, dword [ebp - 0x144]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x11c]
add ecx, dword [ebp - 0x13c]
add ecx, dword [ebp - 0x124]
mov dword [ebp - 0x124], ecx
mov edx, dword [ebp - 0x144]
add edx, dword [ebp - 0x13c]
mov dword [ebp - 0x144], edx
mov eax, dword [ebp - 0x150]
sub eax, dword [ebp - 0x154]
mov dword [ebp - 0x150], eax
jmp 0x40148d
mov ecx, dword [ebp - 0x148]
push ecx
mov edx, dword [ebp - 0x140]
push edx
call fcn.00401180
add esp, 8
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x160], 0
call fcn.00401010
mov eax, dword [0x4022e8]
push eax
call fcn.00401020
add esp, 4
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp - 0x164]
push ecx
call fcn.00401100
add esp, 4
mov dword [ebp - 0x120], eax
mov edx, dword [ebp - 0x164]
push edx
push 0
mov eax, dword [ebp - 0x120]
push eax
call fcn.00401140
add esp, 0xc
mov ecx, dword [ebp - 0x164]
mov dword [ebp - 0x16c], ecx
mov edx, dword [ebp - 0x160]
cmp edx, dword [ebp - 0x164]
jae 0x401638
mov eax, dword [ebp - 0x16c]
push eax
mov ecx, dword [ebp - 0x13c]
push ecx
call fcn.00401150
add esp, 8
mov dword [ebp - 0x170], eax
mov edx, dword [ebp - 0x170]
push edx
mov eax, dword [0x4022e8]
add eax, dword [ebp - 0x124]
push eax
mov ecx, dword [ebp - 0x120]
add ecx, dword [ebp - 0x160]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x11c]
add edx, dword [ebp - 0x13c]
add edx, dword [ebp - 0x124]
mov dword [ebp - 0x124], edx
mov eax, dword [ebp - 0x160]
add eax, dword [ebp - 0x13c]
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 0x16c]
sub ecx, dword [ebp - 0x170]
mov dword [ebp - 0x16c], ecx
jmp 0x4015a1
mov edx, dword [ebp - 0x164]
push edx
mov eax, dword [ebp - 0x120]
push eax
call fcn.00401180
add esp, 8
mov ecx, dword [ebp - 0x140]
mov edx, dword [ebp - 0x120]
mov dword [ecx], edx
push 0x17000
call fcn.00401100
add esp, 4
mov dword [ebp - 4], eax
lea eax, [ebp - 0x128]
push eax
push 0x20019
push 0
push str.SOFTWARE
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x401692
xor eax, eax
jmp 0x4016f2
push 0x15100
mov ecx, dword [ebp - 0x140]
push ecx
mov edx, dword [ebp - 4]
add edx, 0x200
push edx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 4]
sub eax, 0x400000
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x120]
push edx
call fcn.00401030
add esp, 0xc
mov esp, dword [0x4022f0]
pop ecx
mov ecx, dword [ebp - 4]
add ecx, 0x14f40
mov edx, ecx
call 0x4016e3
pop eax
call 0x4016e9
pop eax
call 0x4016ef
pop eax
jmp edx
mov esp, ebp
pop ebp
ret