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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a33dd
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x4e54fc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 0
call fcn.00406d20
mov ecx, eax
test ecx, ecx
je 0x40e20b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionTerminal_Server_
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.004051b0
test al, al
jne 0x40db13
push 0x3d
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionTerminal_Server_
lea ecx, [ebp - 0x14]
call fcn.004056b0
push 1
push esi
push 0x2c
push str.Shell
mov edx, str.SoftwareMicrosoftWindowsCurrentVersionPoliciesSystem
mov byte [ebp - 4], 2
mov ecx, SysReAllocString
call fcn.0040b270
push 1
push esi
push 0x2c
push str.Shell
mov edx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
mov ecx, SysReAllocString
call fcn.0040b270
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionRun
mov ecx, SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
mov ecx, SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx
mov ecx, SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorerRun
mov ecx, SysReAllocString
call fcn.0040aba0
add esp, 0x40
call fcn.00420e60
mov ebx, dword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
test al, al
jne 0x40dbce
cmp byte [0x4ff7c0], 0
jne 0x40dbc5
push 0x4ff7bc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
mov byte [0x4ff7c0], 1
cmp dword [0x4ff7bc], 0
je 0x40dc30
call fcn.00420e60
test al, al
je 0x40dbe1
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionRun
mov byte [ebp - 4], 3
mov ecx, SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionRunOnce
mov ecx, SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionRunOnceEx
mov ecx, SysReAllocString
call fcn.0040aba0
add esp, 0x18
mov byte [ebp - 4], 2
call fcn.00420e60
test al, al
je 0x40dc30
push dword [ebp - 0x18]
call ebx
push 1
push esi
push 0x2c
push str.UserInitMprLogonScript
mov edx, str.Environment
mov ecx, SysReAllocString
call fcn.0040b270
push 1
push esi
push 0x20
push str.Load
mov edx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
mov ecx, SysReAllocString
call fcn.0040b270
push 1
push esi
push 0x20
push 0x4c703c
mov edx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
mov ecx, SysReAllocString
call fcn.0040b270
push str.InstallSoftwareMicrosoftWindowsCurrentVersionRunOnce
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00404f30
mov byte [ebp - 4], 4
mov ecx, SysReAllocString
mov edx, dword [eax]
push 1
push esi
call fcn.0040aba0
mov byte [ebp - 4], 2
or edi, 0xffffffff
mov edx, dword [ebp - 0x18]
add esp, 0x44
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40dcc4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.InstallSoftwareMicrosoftWindowsCurrentVersionRunOnceEx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00404f30
mov byte [ebp - 4], 5
mov ecx, SysReAllocString
mov edx, dword [eax]
push 1
push esi
call fcn.0040aba0
mov byte [ebp - 4], 2
add esp, 0x14
mov edx, dword [ebp - 0x18]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40dd0a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.InstallSoftwareMicrosoftWindowsCurrentVersionRun
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00404f30
mov byte [ebp - 4], 6
mov ecx, SysReAllocString
mov edx, dword [eax]
push 1
push esi
call fcn.0040aba0
mov byte [ebp - 4], 2
add esp, 0x14
mov edx, dword [ebp - 0x18]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40dd50
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [0x4e5f70], 0
je 0x40e1bd
call fcn.00420e60
test al, al
je 0x40dd70
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
push 1
push esi
push 0x2c
push str.StartupPrograms
mov edx, str.SystemCurrentControlSetControlTerminal_ServerWds_rdpwd
mov byte [ebp - 4], 7
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
push 1
push esi
push 0x2c
push str.AppSetup
mov edx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionRun
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorerRun
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnceEx
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
add esp, 0x40
mov edx, str.SoftwareMicrosoftWindowsCurrentVersionPoliciesSystem
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
push 1
push esi
push 0x2c
push str.Shell
call fcn.0040b270
push 1
push esi
push 0x2c
push str.Shell
mov edx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
push 1
push esi
push 0x20
push str.AlternateShell
mov edx, str.SYSTEMCurrentControlSetControlSafeBoot
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
push 1
push esi
push 0x20
push str.TaskMan
mov edx, str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogon
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
add esp, 0x40
mov edx, str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogon
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
push 1
push esi
push 0x2c
push str.UserInit
call fcn.0040b270
push 1
push esi
push 0
push str.VmApplet
mov edx, str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogon
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
push 1
push esi
mov edx, str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogonAlternateShellsAvailableShells
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
push 0x2c
push str.UserInitMprLogonScript
mov edx, str.Environment
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
push 1
push esi
mov edx, str.SOFTWAREMicrosoftActive_SetupInstalled_Components
call fcn.0040e220
add esp, 0x40
mov edx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
push 1
push esi
push 0x2c
push str.IconServiceLib
call fcn.0040b270
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindows_CE_ServicesAutoStartOnConnect
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindows_CE_ServicesAutoStartDisconnect
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 0x20019
push str.SystemCurrentControlSetControlSafeBootOption
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x24], 0
xorps xmm0, xmm0
push reloc.OLEAUT32.dll_SysReAllocString
push eax
movq qword [ebp - 0x2c], xmm0
call fcn.0041c8b0
add esp, 0x30
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40df7e
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 4
push ecx
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push 0
push str.UseAlternateShell
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40df7e
cmp dword [ebp - 0x20], 4
jne 0x40df7e
push 1
push esi
push 0x20
push str.AlternateShell
mov edx, str.SYSTEMCurrentControlSetControlSafeBoot
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
add esp, 0x10
push 1
push esi
mov edx, str.SOFTWAREMicrosoftWindowsCurrentVersionRunOnce
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
mov eax, dword [ebp - 0x2c]
add esp, 8
test eax, eax
je 0x40dfa1
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 2
call fcn.00420e60
test al, al
je 0x40dfb3
push dword [ebp - 0x1c]
call ebx
cmp byte [0x4e5f70], 0
je 0x40e1bd
call fcn.00420e60
test al, al
jne 0x40dff3
cmp byte [0x4ff7c0], al
jne 0x40dfea
push 0x4ff7bc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
mov byte [0x4ff7c0], 1
cmp dword [0x4ff7bc], 0
je 0x40e05d
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionRun
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionRunOnce
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionRunOnceEx
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftActive_SetupInstalled_Components
call fcn.0040e220
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftWindows_CE_ServicesAutoStartOnConnect
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
push 1
push esi
mov edx, str.SOFTWAREWow6432NodeMicrosoftWindows_CE_ServicesAutoStartOnDisconnect
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040aba0
add esp, 0x30
call fcn.00420e60
test al, al
je 0x40e070
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
push str.InstallSoftwareMicrosoftWindowsCurrentVersionRunOnce
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00404f30
mov byte [ebp - 4], 0xa
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
mov edx, dword [eax]
push 1
push esi
call fcn.0040aba0
mov byte [ebp - 4], 9
add esp, 0x14
mov edx, dword [ebp - 0x1c]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e0ba
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.InstallSoftwareMicrosoftWindowsCurrentVersionRunOnceEx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00404f30
mov byte [ebp - 4], 0xb
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
mov edx, dword [eax]
push 1
push esi
call fcn.0040aba0
mov byte [ebp - 4], 9
add esp, 0x14
mov edx, dword [ebp - 0x1c]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e100
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 1
push esi
push 0x2c
push str.InitialProgram
mov edx, str.SYSTEMCurrentControlSetControlTerminal_ServerWinStationsRDP_Tcp
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040b270
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00404f30
mov byte [ebp - 4], 0xc
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
mov edx, dword [eax]
push 1
push esi
call fcn.0040aba0
mov edx, dword [ebp - 0x1c]
add esp, 0x24
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e15b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00420e60
test al, al
jne 0x40e18e
cmp byte [0x4ff7c0], al
jne 0x40e185
push 0x4ff7bc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
mov byte [0x4ff7c0], 1
cmp dword [0x4ff7bc], 0
je 0x40e1af
call fcn.00420e60
test al, al
je 0x40e1a1
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
call fcn.00420e60
test al, al
je 0x40e1af
push dword [ebp - 0x1c]
call ebx
call fcn.00420e60
test al, al
je 0x40e1bd
push dword [ebp - 0x20]
call ebx
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x40e1d5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp + 0x30]
test ecx, ecx
je 0x40e1ed
mov edx, dword [ecx]
lea eax, [ebp + 0xc]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047df69
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00406ac0
int3