Function at 0x4099d3
Capabilities:
Persist via winlogon helper dll registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x5e5620]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x42c], eax
mov eax, dword [ebp + 0xc]
push 0x20000
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x418], 0x8000
call fcn.0041917f
pop ecx
lea ecx, [ebp - 0x418]
mov dword [ebp - 0x430], eax
push ecx
mov ecx, dword [ebp - 0x418]
xor ebx, ebx
shl ecx, 2
push ecx
push eax
call dword [0x5eb8c8]
test eax, eax
je 0x409c3c
push esi
push edi
push 6
pop ecx
shr dword [ebp - 0x418], 2
lea edi, [ebp - 0x20c]
and dword [ebp - 0x420], ebx
lea eax, [ebp - 0x1f2]
mov esi, str.Explorer.exe
rep movsd dword es:[edi], dword [esi]
push 0x1ee
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.0054ee80
add esp, 0xc
mov dword [ebp - 0x434], 0x208
lea eax, [ebp - 0x420]
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x20c]
push eax
push 0
push 0
push str.Shell
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.0054f08a
pop ecx
mov esi, eax
pop ecx
mov ecx, esi
add esi, 2
test ecx, ecx
jne 0x409ad2
lea esi, [ebp - 0x20c]
push esi
call fcn.00552a19
lea eax, [eax*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.0054e900
add esp, 0x10
xor edi, edi
cmp dword [ebp - 0x418], ebx
jbe 0x409c2c
cmp ebx, dword [ebp + 0x10]
jae 0x409c2c
mov eax, dword [ebp - 0x430]
push dword [eax + edi*4]
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x409c1f
and dword [ebp - 0x424], 0
lea eax, [ebp - 0x438]
push eax
push 4
lea eax, [ebp - 0x424]
push eax
push esi
call dword [0x5eb8cc]
test eax, eax
je 0x409c12
push 1
lea eax, [ebp - 0x414]
push eax
push dword [ebp - 0x424]
push esi
call dword [0x5eb8d0]
test eax, eax
je 0x409c12
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.00552def
pop ecx
pop ecx
test eax, eax
jne 0x409bbb
and dword [ebp - 0x41c], eax
lea eax, [ebp - 0x41c]
push eax
push 0x2000000
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x409bbb
mov eax, dword [ebp - 0x428]
mov ecx, dword [ebp - 0x42c]
mov byte [eax + ebx], 0
mov eax, dword [ebp - 0x41c]
mov dword [ecx + ebx*4], eax
inc ebx
cmp byte [0x5ebc5f], 0
je 0x409c12
lea eax, [ebp - 0x414]
push str.winlogon.exe
push eax
call fcn.00552def
pop ecx
pop ecx
test eax, eax
jne 0x409c12
and dword [ebp - 0x41c], eax
lea eax, [ebp - 0x41c]
push eax
push 0x2000000
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x409c12
mov eax, dword [ebp - 0x428]
mov ecx, dword [ebp - 0x42c]
mov byte [eax + ebx], 1
mov eax, dword [ebp - 0x41c]
mov dword [ecx + ebx*4], eax
inc ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [ebp - 0x418]
jb 0x409afe
push dword [ebp - 0x430]
call fcn.00419175
pop ecx
pop edi
mov eax, ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0054d24a
leave
ret