Function at 0x4058e0
Capabilities:
Get common file path
Get program files directory
Persist via run registry key
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x4696c1
mov eax, dword fs:[0]
push eax
sub esp, 0xe78
mov eax, dword [0x491c04]
xor eax, esp
mov dword [esp + 0xe74], eax
push ebp
push esi
push edi
mov eax, dword [0x491c04]
xor eax, esp
push eax
lea eax, [esp + 0xe88]
mov dword fs:[0], eax
mov edi, dword [esp + 0xe98]
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], 0
mov ebp, 1
mov dword [esp + 0xe90], ebp
call fcn.0043a5f9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405953
push 0x80004005
call fcn.004025a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
xor ecx, ecx
push 0x12a
push ecx
lea edx, [esp + 0x65a]
push edx
mov byte [esp + 0xe9c], 2
mov word [esp + 0x65c], cx
call fcn.00450600
mov eax, dword [esp + 0xeac]
push eax
lea ecx, [esp + 0x84]
push 0x1f4
push ecx
mov dword [esp + 0x64], ebp
mov dword [esp + 0x60], 0x104
call fcn.0044fb64
add esp, 0x18
cmp byte [esp + 0x74], 0x5b
je 0x405a07
lea edx, [esp + 0x74]
push edx
mov ecx, edi
call fcn.00429010
lea eax, [esi - 0x10]
mov dword [esp + 0x14], ebp
mov byte [esp + 0xe90], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4059ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0xe9c]
mov byte [esp + 0xe90], 0
call fcn.004290f0
mov eax, edi
jmp 0x40616a
call fcn.004039b0
mov edi, eax
mov al, 0x5d
xor esi, esi
cmp byte [esp + 0x74], al
je 0x405a20
add esi, ebp
cmp byte [esp + esi + 0x74], al
jne 0x405a18
lea ecx, [esi + 1]
push ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x270]
push eax
call fcn.00450680
lea ecx, [esp + esi + 0x81]
push ecx
lea edx, [esp + 0x46c]
push 0x1f4
push edx
mov byte [esp + esi + 0x281], 0
call fcn.0044fb64
add esp, 0x18
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x34]
call fcn.00424c00
lea ecx, [esp + 0x3c]
mov byte [esp + 0xe90], 3
call fcn.00429080
sub esp, 0xc
lea eax, [esp + 0x274]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0xea0], 4
call fcn.00429010
call fcn.004287d0
add esp, 0xc
cmp eax, 0xb
ja case.0x405aa9.619
jmp dword [eax*4 + 0x406194]
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push ebp
push 0x2a
lea ecx, [esp + 0x270]
push ecx
push 0
call esi
lea edx, [esp + 0x268]
push 0x473030
push edx
call fcn.0045043d
add esp, 8
test eax, eax
jne 0x405aed
push ebp
push 0x26
lea eax, [esp + 0x270]
push eax
push 0
call esi
lea ecx, [esp + 0x268]
push ecx
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fb64
lea eax, [esp + 0x468]
push eax
lea ecx, [esp + 0x84]
push 0x1f4
push ecx
call fcn.0044fe2d
add esp, 0x18
jmp case.0x405aa9.619
mov ecx, 0x49487c
call fcn.00429000
cmp eax, 3
je 0x405b50
mov edx, dword [0x494880]
push edx
lea eax, [esp + 0x78]
push 0x1f4
push eax
call fcn.0044fb64
add esp, 0xc
jmp 0x405b8c
mov ecx, 0x49487c
call fcn.00429000
sub eax, ebp
push eax
push ebp
lea ecx, [esp + 0x70]
push ecx
mov ecx, 0x49487c
call fcn.00429310
mov eax, dword [eax + 4]
push eax
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fb64
add esp, 0xc
lea ecx, [esp + 0x68]
call fcn.004290f0
lea eax, [esp + 0x45c]
push eax
lea ecx, [esp + 0x78]
push 0x1f4
push ecx
call fcn.0044fe2d
lea eax, [esp + 0x80]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405bb0
sub eax, edx
cmp eax, 3
jae case.0x405aa9.619
push 0x47317c
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fe2d
add esp, 0xc
jmp case.0x405aa9.619
lea eax, [esp + 0x45c]
push eax
lea ecx, [esp + 0x78]
push 0x1f4
push ecx
call fcn.0044fb64
add esp, 0xc
jmp case.0x405aa9.619
push 0x118
lea edx, [esp + 0x26c]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 0x268]
push eax
lea ecx, [esp + 0x78]
push 0x1f4
push ecx
call fcn.0044fb64
lea edx, [esp + 0x468]
push edx
lea eax, [esp + 0x84]
push 0x1f4
push eax
call fcn.0044fe2d
add esp, 0x18
jmp case.0x405aa9.619
push ebp
push 0x25
lea ecx, [esp + 0x270]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea edx, [esp + 0x268]
push edx
lea eax, [esp + 0x78]
push 0x1f4
push eax
call fcn.0044fb64
lea ecx, [esp + 0x468]
push ecx
lea edx, [esp + 0x84]
push 0x1f4
push edx
call fcn.0044fe2d
add esp, 0x18
jmp case.0x405aa9.619
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jge 0x405ce8
lea ecx, [esp + 0x74]
push ecx
mov esi, dword [esp + 0x1c]
mov ecx, esi
call fcn.00429010
lea ecx, [esp + 0x3c]
mov dword [esp + 0x14], ebp
mov byte [esp + 0xe90], 3
call fcn.004290f0
lea ecx, [esp + 0x30]
mov byte [esp + 0xe90], 2
call fcn.00424c20
lea ecx, [esp + 0x10]
call fcn.00402b70
jmp 0x406154
lea edx, [esp + 0x24]
push edx
push 0x10
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x405d33
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x268]
push ecx
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
jne 0x405aed
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x14]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea eax, [esp + 0x74]
push eax
jmp 0x405ca9
lea edx, [esp + 0x268]
push edx
push 0x118
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [esp + 0x268]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405d60
sub eax, edx
cmp byte [esp + eax + 0x267], 0x5c
jne 0x405c10
lea eax, [esp + 0x268]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405d81
sub eax, edx
mov byte [esp + eax + 0x267], cl
jmp 0x405c10
push 0
push 5
lea ecx, [esp + 0x270]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [esp + 0x268]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405db4
sub eax, edx
cmp byte [esp + eax + 0x267], 0x5c
jne 0x405de1
lea eax, [esp + 0x268]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405dd1
sub eax, edx
mov byte [esp + eax + 0x267], cl
lea edx, [esp + 0x268]
push edx
lea eax, [esp + 0x78]
push 0x1f4
push eax
call fcn.0044fb64
lea ecx, [esp + 0x468]
push ecx
lea edx, [esp + 0x84]
push 0x1f4
push edx
call fcn.0044fe2d
add esp, 0x18
jmp case.0x405aa9.619
push 0
push 0x1a
lea eax, [esp + 0x270]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [esp + 0x268]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405e38
sub eax, edx
cmp byte [esp + eax + 0x267], 0x5c
jne 0x405aed
lea eax, [esp + 0x268]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405e60
sub eax, edx
mov byte [esp + eax + 0x267], cl
jmp 0x405aed
lea edx, [esp + 0x2c]
push edx
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerShell_Folders
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x654]
push ecx
lea edx, [esp + 0x54]
push edx
push 0
push str.Common_Programs
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x650]
push edx
lea ecx, [esp + 0x24]
call fcn.00405840
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0xe94], 5
call fcn.00402de0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0xe90], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405f0b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fb64
add esp, 0xc
push 0x118
lea eax, [esp + 0x780]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.Start_MenuPrograms
lea ecx, [esp + 0x780]
push 0x12c
push ecx
call fcn.0044fe2d
add esp, 0xc
cmp edi, 3
je 0x405f59
cmp edi, 4
jne 0x405f73
lea edx, [esp + 0x77c]
push edx
lea eax, [esp + 0x78]
push 0x1f4
push eax
call fcn.0044fb64
add esp, 0xc
lea ecx, [esp + 0x45c]
push ecx
jmp 0x405bc7
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x34]
call fcn.00424c30
push ebp
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x473288
call fcn.00428f20
lea ecx, [esp + 0x40]
call fcn.00424d70
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x34], esp
push str.Common_Startup
call fcn.00428f20
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x40]
call fcn.00425320
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0xe94], 6
call fcn.00429100
lea ecx, [esp + 0x5c]
mov byte [esp + 0xe90], 4
call fcn.004290f0
mov ecx, dword [esp + 0x40]
push ecx
lea edx, [esp + 0x8ac]
push 0x1f4
push edx
call fcn.0044fb64
add esp, 0xc
lea ecx, [esp + 0x30]
call fcn.00425300
lea eax, [esp + 0x8a8]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406020
sub eax, edx
mov cl, 0x5c
cmp byte [esp + eax + 0x8a8], cl
je 0x40603f
sub eax, ebp
cmp byte [esp + eax + 0x8a8], cl
jne 0x406034
add eax, ebp
lea edx, [esp + eax + 0x8a8]
mov al, byte [edx]
xor ecx, ecx
test al, al
je 0x406061
add edx, ebp
mov byte [esp + ecx + 0xc90], al
mov al, byte [edx]
add ecx, ebp
test al, al
jne 0x406050
push str._Start_Menu__
lea eax, [esp + 0xaa0]
push 0x1f4
push eax
mov byte [esp + ecx + 0xc9c], 0
call fcn.0044fb64
lea ecx, [esp + 0xc9c]
push ecx
lea edx, [esp + 0xaac]
push 0x1f4
push edx
call fcn.0044fe2d
lea eax, [esp + 0x474]
push eax
lea ecx, [esp + 0xab8]
push 0x1f4
push ecx
call fcn.0044fe2d
add esp, 0x18
lea edx, [esp + 0xaa8]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.00429010
lea eax, [esp + 0x5c]
push eax
call fcn.004058e0
mov eax, dword [eax + 4]
push eax
lea ecx, [esp + 0x88]
push 0x1f4
push ecx
call fcn.0044fb64
add esp, 0x1c
lea ecx, [esp + 0x50]
call fcn.004290f0
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x74]
push edx
mov ecx, esi
call fcn.00429010
lea ecx, [esp + 0x3c]
mov dword [esp + 0x14], ebp
mov byte [esp + 0xe90], 3
call fcn.004290f0
lea ecx, [esp + 0x30]
mov byte [esp + 0xe90], 2
call fcn.00424c20
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov byte [esp + 0xe90], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406154
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0xe9c]
mov byte [esp + 0xe90], 0
call fcn.004290f0
mov eax, esi
mov ecx, dword [esp + 0xe88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xe74]
xor ecx, esp
call fcn.0044f51e
add esp, 0xe84
ret