Function at 0x407920
Capabilities:
Enumerate processes
Get common file path
Query or enumerate registry value

Disassembly:
sub esp, 0x548
mov eax, dword [0x435ad8]
xor eax, esp
mov dword [esp + 0x544], eax
mov eax, dword [esp + 0x54c]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x20], eax
call fcn.00407880
test eax, eax
je 0x407bfc
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.WTSGetActiveConsoleSessionId
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
xor ebx, ebx
push ebx
push 2
mov edi, eax
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x407bfc
lea ecx, [esp + 0x28]
push ecx
push esi
mov dword [esp + 0x30], 0x128
call sub.KERNEL32.dll_Process32First
test eax, eax
jne 0x4079a3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407bfc
mov ebp, dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
lea esp, [esp]
lea edx, [esp + 0x4c]
push str.explorer.exe
push edx
call fcn.004160ce
add esp, 8
test eax, eax
jne 0x4079e4
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x24]
push eax
push ecx
mov dword [esp + 0x2c], ebx
call ebp
test eax, eax
je 0x4079e4
cmp dword [esp + 0x24], edi
je 0x407a82
lea edx, [esp + 0x28]
push edx
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x4079b0
mov ebp, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
push ebp
push ebx
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
cmp ebp, ebx
je 0x407bfc
lea eax, [esp + 0x14]
push eax
push 8
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x407a7a
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push ebx
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push 1
push edx
call ebx
mov eax, dword [esp + 0x10]
push eax
call fcn.00415cb2
mov edx, dword [esp + 0x14]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
push edx
mov esi, eax
mov eax, dword [esp + 0x1c]
push esi
push 1
push eax
call ebx
test eax, eax
jne 0x407a8b
test esi, esi
je 0x407a73
push esi
call fcn.00415816
add esp, 4
mov ecx, dword [esp + 0x14]
push ecx
call edi
push ebp
call edi
jmp 0x407bfc
mov ebp, dword [esp + 0x30]
jmp 0x4079f7
mov eax, dword [esi]
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidA]
push esi
call fcn.00415816
mov ecx, dword [esp + 0x18]
add esp, 4
push ecx
call edi
push ebp
call edi
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x407bfc
push 0x1ff
lea edx, [esp + 0x355]
push 0
push edx
mov dword [esp + 0x24], 0
mov byte [esp + 0x35c], 0
call fcn.00418020
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList_s
lea eax, [esp + 0x364]
push 0x200
push eax
call fcn.00414cf3
mov ecx, dword [esp + 0x38]
add esp, 0x1c
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea edx, [esp + 0x18]
push edx
push 0x20019
push 0
lea eax, [esp + 0x35c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x407bfc
push 0xff
push eax
lea ecx, [esp + 0x159]
push ecx
mov byte [esp + 0x15c], al
call fcn.00418020
mov ecx, dword [esp + 0x24]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x154]
push eax
push 0
push 0
push str.ProfileImagePath
push ecx
mov dword [esp + 0x28], pe_nt_image_headers32
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0xff
lea edx, [esp + 0x255]
push 0
push edx
mov byte [esp + 0x25c], 0
call fcn.00418020
add esp, 0xc
lea eax, [esp + 0x250]
push eax
push 0
push 0
push 0x28
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea ecx, [esp + 0x150]
push ecx
lea eax, [esp + 0x254]
call fcn.004077d0
add esp, 4
test eax, eax
jne 0x407bf1
lea eax, [esp + 0x150]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407bd0
sub eax, edx
push eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x154]
push edx
push eax
call fcn.004161c2
add esp, 0xc
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x554]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004149ab
add esp, 0x548
ret