Function at 0x40f580
Capabilities:
Create process on windows
Resume thread

Disassembly:
mov eax, 0x100a0
call fcn.00412cf0
mov eax, dword [0x422760]
xor eax, esp
mov dword [esp + 0x1009c], eax
push esi
mov esi, dword [esp + 0x100a8]
cmp dword [esi + 0x704b8], 0
mov byte [esi + 0x704c4], 0
mov byte [esi + 0x704c5], 1
je 0x40f5cf
xor eax, eax
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.00412cdc
add esp, 0x100a0
ret
push 0x44
lea eax, [esp + 0x20]
push 0
push eax
call fcn.00412d20
xor eax, eax
lea ecx, [esp + 0x28]
push ecx
push esi
mov dword [esp + 0x30], 0x44
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
call fcn.0040bec0
add esp, 0x14
test eax, eax
je 0x40f640
push 0
lea edx, [esi + 2]
push edx
push 0xc00003ec
push 1
call fcn.00405400
push 1
push 1
push 2
push esi
call fcn.0040e6e0
add esp, 0x20
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.00412cdc
add esp, 0x100a0
ret
push edi
lea eax, [esi + 0x28414]
push eax
lea edi, [esi + 0x18416]
push edi
push str.__s___s
push 0xffffffffffffffff
lea ecx, [esp + 0xb4]
push 0x8000
push ecx
call fcn.00412731
add esp, 0x18
test eax, eax
jge 0x40f6ad
push 0
push str.start_service
push str.command_line
push 0xc00003eb
push 1
call fcn.00405400
push 1
push 1
push 2
push esi
call fcn.0040e6e0
add esp, 0x24
pop edi
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.00412cdc
add esp, 0x100a0
ret
push esi
call fcn.0040e830
mov eax, dword [esi + 0x403f8]
add esp, 4
test eax, eax
je 0x40f6c9
push eax
call fcn.00405190
add esp, 4
mov eax, dword [esi + 0x40414]
test eax, eax
je 0x40f6dc
push eax
call fcn.00405140
add esp, 4
lea edx, [esp + 0x20]
push edx
push esi
call fcn.00409270
add esp, 8
test eax, eax
je 0x40f742
push 0
lea eax, [esi + 2]
push eax
push 0xc000041b
push 1
call fcn.00405400
add esp, 0x10
cmp dword [esi + 0x40420], 0
jne 0x40f712
call dword [sym.imp.KERNEL32.dll_FreeConsole]
lea ecx, [esp + 0x20]
push ecx
call fcn.00408bb0
push 1
push 1
push 4
push esi
call fcn.0040e6e0
add esp, 0x14
pop edi
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.00412cdc
add esp, 0x100a0
ret
xor cl, cl
test dword [esp + 0x4c], 0x100
je 0x40f750
mov cl, 1
mov eax, dword [esi + 0x4041c]
mov edx, dword [esi + 0x40400]
and eax, 0xc1e0
or edx, dword [esi + 0x40404]
je 0x40f76c
or eax, 4
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0x24]
push edx
lea edx, [esi + 0x30412]
push edx
push 0
push eax
movzx eax, cl
push eax
push 0
push 0
lea ecx, [esp + 0xc4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x40f7fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push eax
call fcn.004052c0
add esp, 4
push eax
push edi
lea edx, [esi + 2]
push edx
push 0xc00003f2
push 1
call fcn.00405400
lea eax, [esp + 0x38]
push eax
call fcn.00408bb0
mov ecx, dword [esi + 0x70508]
push ecx
call fcn.00405290
push 1
push 1
push 3
push esi
call fcn.0040e6e0
add esp, 0x30
pop edi
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.00412cdc
add esp, 0x100a0
ret
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
lea edi, [esi + 0x704f8]
push edi
push eax
mov dword [esi + 0x704b8], eax
mov dword [esi + 0x704bc], edx
call fcn.00409f50
add esp, 8
test eax, eax
je 0x40f82a
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
lea eax, [esp + 0x20]
push eax
call fcn.00408bb0
add esp, 4
cmp dword [esi + 0x40420], 0
jne 0x40f846
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov ecx, dword [esi + 0x70508]
push ecx
call fcn.00405290
mov edx, dword [esi + 0x40400]
add esp, 4
or edx, dword [esi + 0x40404]
je 0x40f904
mov edx, dword [esi + 0x704b8]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0xc]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetProcessAffinityMask]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40f898
mov eax, dword [esp + 0xc]
and eax, dword [esi + 0x40400]
mov dword [esp + 8], eax
jmp 0x40f8c7
mov eax, dword [esi + 0x40400]
push 0
mov dword [esp + 0xc], eax
call edi
push eax
call fcn.004052c0
add esp, 4
push eax
lea ecx, [esi + 2]
push ecx
push 0x8000042d
push 1
call fcn.00405400
mov eax, dword [esp + 0x1c]
add esp, 0x14
mov edx, dword [esi + 0x704b8]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetProcessAffinityMask]
test eax, eax
jne 0x40f8f9
push eax
call edi
push eax
call fcn.004052c0
add esp, 4
push eax
lea eax, [esi + 2]
push eax
push 0xc000042e
push 2
call fcn.00405400
add esp, 0x14
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi + 0x70480]
cmp edi, 0x4e20
jbe 0x40f973
push edi
push 0x41dc80
push 0xffffffffffffffff
lea edx, [esp + 0x90]
push 0x10
push edx
call fcn.00412731
push 0x4e20
push 0x41dc80
push 0xffffffffffffffff
lea eax, [esp + 0x84]
push 0x10
push eax
call fcn.00412731
push 0
lea ecx, [esp + 0x90]
push ecx
push str.NSSM
lea edx, [esp + 0xb8]
push edx
lea eax, [esi + 2]
push eax
push 0x40000425
push 2
call fcn.00405400
add esp, 0x44
mov edi, 0x4e20
mov ecx, dword [esi + 0x704b8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebp
push edi
push ecx
call ebx
lea edx, [esi + 0x70498]
mov ebp, eax
mov eax, dword [esi + 0x704b4]
push edx
push eax
mov dword [esi + 0x7049c], 4
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
cmp ebp, 0x102
jne 0x40f9d1
mov eax, dword [esi + 0x70480]
cmp eax, edi
jbe 0x40f9c7
mov ecx, dword [esi + 0x704b8]
sub eax, edi
push eax
push ecx
call ebx
cmp eax, ebp
jne 0x40f9d1
mov dword [esi + 0x704c8], 0
cmp dword [esi + 0x7047c], 0
pop ebp
pop ebx
je 0x40f9ef
cmp dword [esi + 0x704c8], 0
jne 0x40f9ef
mov dword [esi + 0x704c8], 1
mov ecx, dword [esp + 0x100a4]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.00412cdc
add esp, 0x100a0
ret