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

Disassembly:
push 0xffffffffffffffff
push 0x469711
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.0043a5e3
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4057f3
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.004504b0
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.0044fb53
add esp, 0x18
cmp byte [esp + 0x74], 0x5b
je 0x4058a7
lea edx, [esp + 0x74]
push edx
mov ecx, edi
call fcn.00429050
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 0x40588c
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.00429130
mov eax, edi
jmp 0x405ffa
call fcn.00403970
mov edi, eax
mov al, 0x5d
xor esi, esi
cmp byte [esp + 0x74], al
je 0x4058c0
add esi, ebp
cmp byte [esp + esi + 0x74], al
jne 0x4058b8
lea ecx, [esi + 1]
push ecx
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0x270]
push eax
call fcn.00450530
lea ecx, [esp + esi + 0x81]
push ecx
lea edx, [esp + 0x46c]
push 0x1f4
push edx
mov byte [esp + esi + 0x281], 0
call fcn.0044fb53
add esp, 0x18
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x34]
call fcn.00424c50
lea ecx, [esp + 0x3c]
mov byte [esp + 0xe90], 3
call fcn.004290c0
sub esp, 0xc
lea eax, [esp + 0x274]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov byte [esp + 0xea0], 4
call fcn.00429050
call fcn.00428810
add esp, 0xc
cmp eax, 0xb
ja case.0x405949.619
jmp dword [eax*4 + 0x406024]
push ebp
push 0x26
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.0044fb53
lea ecx, [esp + 0x468]
push ecx
lea edx, [esp + 0x84]
push 0x1f4
push edx
call fcn.0044fe1d
add esp, 0x18
jmp case.0x405949.619
mov ecx, 0x49487c
call fcn.00429040
cmp eax, 3
je 0x4059c5
mov eax, dword [0x494880]
push eax
lea ecx, [esp + 0x78]
push 0x1f4
push ecx
call fcn.0044fb53
add esp, 0xc
jmp 0x405a01
mov ecx, 0x49487c
call fcn.00429040
sub eax, ebp
push eax
push ebp
lea edx, [esp + 0x70]
push edx
mov ecx, 0x49487c
call fcn.00429350
mov eax, dword [eax + 4]
push eax
lea eax, [esp + 0x78]
push 0x1f4
push eax
call fcn.0044fb53
add esp, 0xc
lea ecx, [esp + 0x68]
call fcn.00429130
lea ecx, [esp + 0x45c]
push ecx
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fe1d
lea eax, [esp + 0x80]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405a25
sub eax, edx
cmp eax, 3
jae case.0x405949.619
push 0x47317c
lea eax, [esp + 0x78]
push 0x1f4
push eax
call fcn.0044fe1d
add esp, 0xc
jmp case.0x405949.619
lea ecx, [esp + 0x45c]
push ecx
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fb53
add esp, 0xc
jmp case.0x405949.619
push 0x118
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x268]
push ecx
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fb53
lea eax, [esp + 0x468]
push eax
lea ecx, [esp + 0x84]
push 0x1f4
push ecx
call fcn.0044fe1d
add esp, 0x18
jmp case.0x405949.619
push ebp
push 0x25
lea edx, [esp + 0x270]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [esp + 0x268]
push eax
lea ecx, [esp + 0x78]
push 0x1f4
push ecx
call fcn.0044fb53
lea edx, [esp + 0x468]
push edx
lea eax, [esp + 0x84]
push 0x1f4
push eax
call fcn.0044fe1d
add esp, 0x18
jmp case.0x405949.619
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jge 0x405b5d
lea edx, [esp + 0x74]
push edx
mov esi, dword [esp + 0x1c]
mov ecx, esi
call fcn.00429050
lea ecx, [esp + 0x3c]
mov dword [esp + 0x14], ebp
mov byte [esp + 0xe90], 3
call fcn.00429130
lea ecx, [esp + 0x30]
mov byte [esp + 0xe90], 2
call fcn.00424c70
lea ecx, [esp + 0x10]
call fcn.00402b30
jmp 0x405fe4
lea eax, [esp + 0x24]
push eax
push 0x10
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jge 0x405b77
lea ecx, [esp + 0x74]
push ecx
jmp 0x405b1e
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x268]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
jne 0x405a85
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 0x405b1e
lea edx, [esp + 0x268]
push edx
push 0x118
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [esp + 0x268]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405bd6
sub eax, edx
cmp byte [esp + eax + 0x267], 0x5c
jne 0x405ad1
lea eax, [esp + 0x268]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405bf7
sub eax, edx
mov byte [esp + eax + 0x267], cl
jmp 0x405ad1
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]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405c30
sub eax, edx
cmp byte [esp + eax + 0x267], 0x5c
jne 0x405963
lea eax, [esp + 0x268]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405c51
sub eax, edx
mov byte [esp + eax + 0x267], cl
jmp 0x405963
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 0x405c84
sub eax, edx
cmp byte [esp + eax + 0x267], 0x5c
jne 0x405cb1
lea eax, [esp + 0x268]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405ca1
sub eax, edx
mov byte [esp + eax + 0x267], cl
lea ecx, [esp + 0x268]
push ecx
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fb53
lea eax, [esp + 0x468]
push eax
lea ecx, [esp + 0x84]
push 0x1f4
push ecx
call fcn.0044fe1d
add esp, 0x18
jmp case.0x405949.619
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.004056e0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0xe94], 5
call fcn.00402da0
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 0x405d80
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.0044fb53
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.0044fe1d
add esp, 0xc
cmp edi, 3
je 0x405dce
cmp edi, 4
jne 0x405de8
lea edx, [esp + 0x77c]
push edx
lea eax, [esp + 0x78]
push 0x1f4
push eax
call fcn.0044fb53
add esp, 0xc
lea ecx, [esp + 0x45c]
push ecx
lea edx, [esp + 0x78]
push 0x1f4
push edx
call fcn.0044fe1d
add esp, 0xc
jmp case.0x405949.619
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x34]
call fcn.00424c80
push ebp
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x473288
call fcn.00428f60
lea ecx, [esp + 0x40]
call fcn.00424dc0
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x34], esp
push str.Common_Startup
call fcn.00428f60
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x40]
call fcn.00425370
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0xe94], 6
call fcn.00429140
lea ecx, [esp + 0x5c]
mov byte [esp + 0xe90], 4
call fcn.00429130
mov ecx, dword [esp + 0x40]
push ecx
lea edx, [esp + 0x8ac]
push 0x1f4
push edx
call fcn.0044fb53
add esp, 0xc
lea ecx, [esp + 0x30]
call fcn.00425350
lea eax, [esp + 0x8a8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405ea3
sub eax, edx
mov cl, 0x5c
cmp byte [esp + eax + 0x8a8], cl
je 0x405ecb
jmp 0x405ec0
sub eax, ebp
cmp byte [esp + eax + 0x8a8], cl
jne 0x405ec0
add eax, ebp
lea edx, [esp + eax + 0x8a8]
mov al, byte [edx]
xor ecx, ecx
test al, al
je 0x405ef1
lea esp, [esp]
add edx, ebp
mov byte [esp + ecx + 0xc90], al
mov al, byte [edx]
add ecx, ebp
test al, al
jne 0x405ee0
push str._Start_Menu__
lea eax, [esp + 0xaa0]
push 0x1f4
push eax
mov byte [esp + ecx + 0xc9c], 0
call fcn.0044fb53
lea ecx, [esp + 0xc9c]
push ecx
lea edx, [esp + 0xaac]
push 0x1f4
push edx
call fcn.0044fe1d
lea eax, [esp + 0x474]
push eax
lea ecx, [esp + 0xab8]
push 0x1f4
push ecx
call fcn.0044fe1d
add esp, 0x18
lea edx, [esp + 0xaa8]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
call fcn.00429050
lea eax, [esp + 0x5c]
push eax
call fcn.00405780
mov eax, dword [eax + 4]
push eax
lea ecx, [esp + 0x88]
push 0x1f4
push ecx
call fcn.0044fb53
add esp, 0x1c
lea ecx, [esp + 0x50]
call fcn.00429130
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x74]
push edx
mov ecx, esi
call fcn.00429050
lea ecx, [esp + 0x3c]
mov dword [esp + 0x14], ebp
mov byte [esp + 0xe90], 3
call fcn.00429130
lea ecx, [esp + 0x30]
mov byte [esp + 0xe90], 2
call fcn.00424c70
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 0x405fe4
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.00429130
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.0044f50d
add esp, 0xe84
ret