Function at 0x401220
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
pushal
mov dword [0x402250], 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
push 0x104
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
call fcn.004016d0
mov edx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x130], edx
lea eax, [ebp - 0x128]
push eax
push 0x20019
push 0
push 0x40206c
push 0x80000002
call dword [ebp - 0x130]
test eax, eax
je 0x4012df
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016c6
lea ecx, [ebp - 0x128]
push ecx
push 0x20019
push 0
push str.Classes
mov edx, dword [ebp - 0x128]
push edx
call dword [ebp - 0x130]
test eax, eax
je 0x401312
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016c6
lea eax, [ebp - 0x128]
push eax
push 0x20019
push 0
push str.CLSID
mov ecx, dword [ebp - 0x128]
push ecx
call dword [ebp - 0x130]
test eax, eax
je 0x401345
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016c6
lea edx, [ebp - 0x128]
push edx
push 0x20019
push 0
push 0x402240
mov eax, dword [ebp - 0x128]
push eax
call dword [ebp - 0x130]
test eax, eax
je 0x401378
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016c6
lea ecx, [ebp - 0x128]
push ecx
push 0x20019
push 0
push 0x402244
mov edx, dword [ebp - 0x128]
push edx
call dword [ebp - 0x130]
test eax, eax
je 0x4013ab
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016c6
lea eax, [ebp - 0x128]
push eax
push 0x20019
push 0
push str.0000031A_0000_0000_C000_000000000046ProgID
mov ecx, dword [ebp - 0x128]
push ecx
call dword [ebp - 0x130]
test eax, eax
je 0x4013de
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016c6
lea edx, [ebp - 0x128]
push edx
push 0x20019
push 0
push str.844849984
mov eax, dword [ebp - 0x128]
push eax
call dword [ebp - 0x130]
test eax, eax
jne 0x401411
push 4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor eax, eax
jmp 0x4016c6
call fcn.00401000
mov ecx, dword [0x402248]
push ecx
call fcn.00401020
add esp, 4
mov dword [ebp - 0x148], eax
mov edx, dword [ebp - 0x148]
push edx
call fcn.00401120
add esp, 4
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x148]
push eax
push 0
mov ecx, dword [ebp - 0x140]
push ecx
call fcn.00401150
add esp, 0xc
mov edx, dword [ebp - 0x148]
mov dword [ebp - 0x150], edx
mov eax, dword [ebp - 0x144]
cmp eax, dword [ebp - 0x148]
jae 0x4014fc
mov ecx, dword [ebp - 0x150]
push ecx
mov edx, dword [ebp - 0x13c]
push edx
call fcn.00401160
add esp, 8
mov dword [ebp - 0x154], eax
mov eax, dword [ebp - 0x154]
push eax
mov ecx, dword [0x402248]
add ecx, dword [ebp - 0x124]
push ecx
mov edx, dword [ebp - 0x140]
add edx, dword [ebp - 0x144]
push edx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x11c]
add eax, dword [ebp - 0x13c]
add eax, dword [ebp - 0x124]
mov dword [ebp - 0x124], eax
mov ecx, dword [ebp - 0x144]
add ecx, dword [ebp - 0x13c]
mov dword [ebp - 0x144], ecx
mov edx, dword [ebp - 0x150]
sub edx, dword [ebp - 0x154]
mov dword [ebp - 0x150], edx
jmp 0x401464
mov eax, dword [ebp - 0x148]
push eax
mov ecx, dword [ebp - 0x140]
push ecx
call fcn.00401190
add esp, 8
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x15c], 0
call fcn.00401010
mov edx, dword [0x402248]
push edx
call fcn.00401020
add esp, 4
mov dword [ebp - 0x160], eax
mov eax, dword [ebp - 0x160]
push eax
call fcn.00401120
add esp, 4
mov dword [ebp - 0x120], eax
mov ecx, dword [ebp - 0x160]
push ecx
push 0
mov edx, dword [ebp - 0x120]
push edx
call fcn.00401150
add esp, 0xc
mov eax, dword [ebp - 0x160]
mov dword [ebp - 0x168], eax
mov ecx, dword [ebp - 0x15c]
cmp ecx, dword [ebp - 0x160]
jae 0x401611
mov edx, dword [ebp - 0x168]
push edx
mov eax, dword [ebp - 0x13c]
push eax
call fcn.00401160
add esp, 8
mov dword [ebp - 0x16c], eax
mov ecx, dword [ebp - 0x16c]
push ecx
mov edx, dword [0x402248]
add edx, dword [ebp - 0x124]
push edx
mov eax, dword [ebp - 0x120]
add eax, dword [ebp - 0x15c]
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 - 0x15c]
add edx, dword [ebp - 0x13c]
mov dword [ebp - 0x15c], edx
mov eax, dword [ebp - 0x168]
sub eax, dword [ebp - 0x16c]
mov dword [ebp - 0x168], eax
jmp 0x401579
mov ecx, dword [ebp - 0x160]
push ecx
mov edx, dword [ebp - 0x120]
push edx
call fcn.00401190
add esp, 8
mov eax, dword [ebp - 0x140]
mov ecx, dword [ebp - 0x120]
mov dword [eax], ecx
push 0x3f000
call fcn.00401120
add esp, 4
mov dword [ebp - 4], eax
lea edx, [ebp - 0x128]
push edx
push 0x20019
push 0
push str.SOFTWARE
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40166b
xor eax, eax
jmp 0x4016c6
push 0x3c400
mov eax, dword [ebp - 0x140]
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x300
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 4]
sub edx, 0x400000
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x120]
push ecx
call fcn.004010b0
add esp, 0xc
mov esp, dword [0x402250]
pop ecx
mov ecx, dword [ebp - 4]
add ecx, 0x3c370
mov edx, ecx
call 0x4016bd
pop eax
call 0x4016c3
pop eax
jmp edx
mov esp, ebp
pop ebp
ret