Function at 0x405660
Capabilities:
Get common file path
Persist via run registry key
Query or enumerate registry value
Set current directory

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x407bf6
push eax
mov dword fs:[0], esp
sub esp, 0x274
push ebx
push ebp
mov ebp, dword [esp + 0x28c]
push esi
push edi
cmp byte [ebp], 0x5b
jne 0x405be9
push ebp
call fcn.00405c10
mov cl, byte [ebp]
add esp, 4
xor eax, eax
cmp cl, 0x5d
je 0x4056ad
mov cl, byte [eax + ebp + 1]
inc eax
cmp cl, 0x5d
jne 0x4056a3
lea ecx, [eax + 1]
mov esi, ebp
mov edx, ecx
mov edi, 0x40d070
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [eax + 0x40d071], 0
lea edi, [eax + ebp + 1]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x40ce7c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 0x40d070
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, str._Program_Files_
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x405722
test cl, cl
je 0x40571e
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x405722
add eax, 2
add esi, 2
test cl, cl
jne 0x4056fa
xor eax, eax
jmp 0x405727
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4057c1
push 0x118
push 0x40cc88
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, str.C:Program_Files
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x40d070
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cl, byte [0x40cc88]
mov byte [0x40d070], cl
mov edi, 0x40d070
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40ce7c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x405be9
mov esi, 0x40b588
mov eax, 0x40d070
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4057f3
test cl, cl
je 0x4057ef
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4057f3
add eax, 2
add esi, 2
test cl, cl
jne 0x4057cb
xor eax, eax
jmp 0x4057f8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40581c
mov edi, 0x40c968
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x40578d
mov esi, str._Absolute_Directory_
mov eax, 0x40d070
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40584e
test cl, cl
je 0x40584a
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40584e
add eax, 2
add esi, 2
test cl, cl
jne 0x405826
xor eax, eax
jmp 0x405853
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40587c
mov edi, 0x40ce7c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x405be9
mov esi, str._Windows_Directory_
mov eax, 0x40d070
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4058ae
test cl, cl
je 0x4058aa
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4058ae
add eax, 2
add esi, 2
test cl, cl
jne 0x405886
xor eax, eax
jmp 0x4058b3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4058e9
push 0x118
push 0x40d070
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, 0x40d070
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x40578d
mov esi, str._Windows_System_
mov eax, 0x40d070
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40591b
test cl, cl
je 0x405917
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40591b
add eax, 2
add esi, 2
test cl, cl
jne 0x4058f3
xor eax, eax
jmp 0x405920
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x405956
push 0x118
push 0x40d070
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x40d070
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x40578d
mov esi, str._Windows_Desktop_
mov eax, 0x40d070
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x405988
test cl, cl
je 0x405984
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x405988
add eax, 2
add esi, 2
test cl, cl
jne 0x405960
xor eax, eax
jmp 0x40598d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4059f1
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x405be9
lea ecx, [esp + 0x20]
push ecx
push 0x10
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x405be9
mov edx, dword [esp + 0x20]
push 0x40d070
push edx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
jne 0x405770
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [esp + 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x405be9
mov esi, str._Start_Menu_
mov eax, 0x40d070
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x405a23
test cl, cl
je 0x405a1f
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x405a23
add eax, 2
add esi, 2
test cl, cl
jne 0x4059fb
xor eax, eax
jmp 0x405a28
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x405be9
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
mov ax, word [0x40df54]
mov ecx, 0x4a
mov word [esp + 0x2c], ax
xor eax, eax
lea edi, [esp + 0x2e]
mov ebx, 1
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x28c], 0
push ecx
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000002
mov dword [esp + 0x3c], ebx
stosw word es:[edi], ax
mov dword [esp + 0x38], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x405aa5
push 0
push 0x40b078
push 0x40b4f4
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405ad1
lea edx, [esp + 0x24]
lea eax, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x2c]
push eax
push ecx
push 0
push str.Common_Programs
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call sub.MFC42.DLL_AfxGetEmptyString
mov ecx, dword [eax]
lea edx, [esp + 0x2c]
mov dword [esp + 0x10], ecx
push edx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
mov byte [esp + 0x290], bl
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x28c], 0
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
push 0x118
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x15c]
mov edx, ecx
mov esi, edi
mov edi, ebp
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, str.Start_MenuPrograms
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x158]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x158]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x405bab
lea edi, [esp + 0x158]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40ce7c
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x28c], 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x284]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x280
ret