Function at 0x408ac0
Capabilities:
Enumerate processes
Get session user name
Get user security identifier
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x468
mov eax, dword [0x47f034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x458], eax
mov ebx, 0x1000
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x454], eax
call fcn.00408730
mov ecx, eax
test ecx, ecx
je 0x4090de
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x468], SysStringLen
mov dword [ebp - 0x464], SysStringLen
lea esi, [eax + 0x10]
xor eax, eax
mov dword [ebp - 0x44c], esi
mov dword [ebp - 0x440], eax
lea ecx, [ebp - 0x448]
xor edi, edi
push ecx
push 0x20119
push edi
push dword [ebp - 0x454]
mov dword [ebp - 0x444], edi
push dword [ebp + eax*4 - 0x468]
mov dword [ebp - 0x448], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408c40
mov edi, dword [ebp - 0x448]
mov dword [ebp - 0x444], edi
test eax, eax
jne 0x408c40
test ebx, ebx
js 0x4090e8
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or ecx, eax
jge 0x408b9b
push ebx
lea ecx, [ebp - 0x44c]
call fcn.004094f0
mov esi, dword [ebp - 0x44c]
lea eax, [ebx + ebx]
xor ebx, ebx
mov dword [ebp - 0x43c], eax
lea eax, [ebp - 0x43c]
push eax
push esi
lea eax, [ebp - 0x450]
push eax
push ebx
push str.UserSID
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
jne 0x408c0d
mov eax, dword [ebp - 0x450]
cmp eax, 1
je 0x408bdd
cmp eax, 2
je 0x408bdd
lea edi, [ebx + 0xd]
jmp 0x408c0d
mov ecx, dword [ebp - 0x43c]
test esi, esi
je 0x408c07
test ecx, ecx
je 0x408c02
test cl, 1
jne 0x408bfb
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], bx
je 0x408c07
mov edi, 0xd
jmp 0x408c0d
xor eax, eax
mov word [esi], ax
mov ebx, ecx
shr ebx, 1
xor edi, edi
push dword [esi - 8]
push esi
call fcn.0043b47d
add esp, 8
test eax, eax
js 0x4090e8
cmp eax, dword [esi - 8]
jg 0x4090e8
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test edi, edi
jne 0x408c40
cmp dword [esi - 0xc], ecx
jne 0x408d48
cmp dword [esi - 0xc], 0
lea edx, [esi - 0x10]
mov edi, dword [edx]
je 0x408c90
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x408c6c
cmp dword [esi - 8], 0
jl 0x4090e8
xor eax, eax
mov dword [esi - 0xc], 0
mov word [esi], ax
jmp 0x408c90
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x408c80
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x44c], esi
mov eax, dword [ebp - 0x444]
test eax, eax
je 0x408ca1
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x440]
inc eax
mov dword [ebp - 0x440], eax
cmp eax, 2
jne 0x408b26
push 0x228
xor edi, edi
mov dword [ebp - 0x440], 0
lea eax, [ebp - 0x434]
push edi
push eax
call fcn.0041d840
add esp, 0xc
push edi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
cmp ebx, 0xffffffff
je 0x408d09
lea eax, [ebp - 0x438]
mov dword [ebp - 0x438], 0x22c
push eax
push ebx
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x408d80
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or ebx, 0xffffffff
cmp dword [esi - 0xc], 0
jne 0x408fda
add esi, 0xfffffff0
push esi
call fcn.00408390
mov edi, dword [ebp - 0x458]
add eax, 0x10
add esp, 4
mov dword [edi], eax
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4090c9
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4090c9
add esi, 0xfffffff0
push esi
call fcn.00408390
mov edi, dword [ebp - 0x458]
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov eax, dword [ebp - 0x444]
test eax, eax
je 0x4090b4
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4090b4
lea eax, [ebp - 0x414]
push str.explorer.exe
push eax
call fcn.0043b634
add esp, 8
test eax, eax
je 0x408dab
lea eax, [ebp - 0x438]
push eax
push ebx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x408d80
jmp 0x408de6
push dword [ebp - 0x430]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
lea eax, [ebp - 0x440]
push eax
push 0xf01ff
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push edi
mov dword [ebp - 0x450], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x450]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x408d09
push dword [ebp - 0x440]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x408d09
lea eax, [ebp - 0x460]
mov dword [ebp - 0x460], 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x408d09
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
je 0x408d09
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 0
call fcn.00408730
mov ecx, eax
test ecx, ecx
je 0x4090f2
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
lea eax, [ebp - 0x45c]
mov dword [ebp - 0x43c], edi
push eax
lea eax, [ebp - 0x444]
push eax
push 0
lea eax, [ebp - 0x448]
push eax
push 0
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
push dword [ebp - 0x448]
call fcn.0043ad8a
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x408ecd
or ebx, 0xffffffff
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x408d0c
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x408d0c
mov eax, dword [ebp - 0x444]
lea ecx, [eax + eax]
test ecx, ecx
js 0x4090e8
mov eax, dword [edi - 8]
mov edx, 1
sub edx, dword [edi - 4]
sub eax, ecx
or edx, eax
jge 0x408f01
push ecx
lea ecx, [ebp - 0x43c]
call fcn.004094f0
mov edi, dword [ebp - 0x43c]
lea eax, [ebp - 0x45c]
push eax
lea eax, [ebp - 0x444]
push eax
push edi
lea eax, [ebp - 0x448]
push eax
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
push dword [edi - 8]
mov dword [ebp - 0x450], eax
push edi
call fcn.0043b47d
add esp, 8
test eax, eax
js 0x4090e8
cmp eax, dword [edi - 8]
jg 0x4090e8
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
cmp dword [ebp - 0x450], ecx
je 0x408fae
lea eax, [ebp - 0x43c]
push eax
push ebx
call sub.ADVAPI32.dll_ConvertSidToStringSidW
mov edx, dword [ebp - 0x43c]
test edx, edx
jne 0x408f76
xor ecx, ecx
jmp 0x408f8f
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408f80
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x44c]
call fcn.0040a1e0
push dword [ebp - 0x43c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x44c]
push ebx
call fcn.0043ad85
or ebx, 0xffffffff
add esp, 4
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x408d0c
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x408d0c
xor ebx, ebx
nop dword [eax]
mov edi, dword [ebp + ebx*4 - 0x468]
lea eax, [ebp - 0x440]
push eax
push 0xf013f
push 0
push dword [ebp - 0x454]
mov dword [ebp - 0x440], 0
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x409018
mov edi, dword [ebp - 0x440]
jmp 0x409054
lea eax, [ebp - 0x45c]
mov dword [ebp - 0x43c], 0
push eax
lea eax, [ebp - 0x43c]
push eax
push 0
push 0xf013f
push 0
push 0
push 0
push dword [ebp - 0x454]
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x409093
mov edi, dword [ebp - 0x43c]
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409060
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push esi
push 1
push 0
push str.UserSID
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test edi, edi
je 0x409093
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebx
cmp ebx, 2
jne 0x408fe0
add esi, 0xfffffff0
push esi
call fcn.00408390
mov edi, dword [ebp - 0x458]
add esp, 4
add eax, 0x10
mov dword [edi], eax
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4090c9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041afcb
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.004012b5
push 0x80070057
call fcn.004012b5
push 0x80004005
call fcn.004012b5
int3