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

Disassembly:
mov eax, 0x100a0
call fcn.00412710
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 0x40f35f
xor eax, eax
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.004126f3
add esp, 0x100a0
ret
push 0x44
lea eax, [esp + 0x20]
push 0
push eax
call fcn.00412740
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.0040bc90
add esp, 0x14
test eax, eax
je 0x40f3d0
push 0
lea edx, [esi + 2]
push edx
push 0xc00003ec
push 1
call fcn.004050e0
push 1
push 1
push 2
push esi
call fcn.0040e4c0
add esp, 0x20
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.004126f3
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.004126d2
add esp, 0x18
test eax, eax
jge 0x40f43d
push 0
push str.start_service
push str.command_line
push 0xc00003eb
push 1
call fcn.004050e0
push 1
push 1
push 2
push esi
call fcn.0040e4c0
add esp, 0x24
pop edi
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.004126f3
add esp, 0x100a0
ret
push esi
call fcn.0040e610
mov eax, dword [esi + 0x403f8]
add esp, 4
test eax, eax
je 0x40f459
push eax
call fcn.00404e70
add esp, 4
mov eax, dword [esi + 0x40414]
test eax, eax
je 0x40f46c
push eax
call fcn.00404e20
add esp, 4
lea edx, [esp + 0x20]
push edx
push esi
call fcn.00408f80
add esp, 8
test eax, eax
je 0x40f4d2
push 0
lea eax, [esi + 2]
push eax
push 0xc000041b
push 1
call fcn.004050e0
add esp, 0x10
cmp dword [esi + 0x40420], 0
jne 0x40f4a2
call dword [sym.imp.KERNEL32.dll_FreeConsole]
lea ecx, [esp + 0x20]
push ecx
call fcn.004088c0
push 1
push 1
push 4
push esi
call fcn.0040e4c0
add esp, 0x14
pop edi
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.004126f3
add esp, 0x100a0
ret
xor cl, cl
test dword [esp + 0x4c], 0x100
je 0x40f4e0
mov cl, 1
mov eax, dword [esi + 0x4041c]
mov edx, dword [esi + 0x40400]
and eax, 0xc1e0
or edx, dword [esi + 0x40404]
je 0x40f4fc
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 0x40f58b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push eax
call fcn.00404fa0
add esp, 4
push eax
push edi
lea edx, [esi + 2]
push edx
push 0xc00003f2
push 1
call fcn.004050e0
lea eax, [esp + 0x38]
push eax
call fcn.004088c0
mov ecx, dword [esi + 0x70508]
push ecx
call fcn.00404f70
push 1
push 1
push 3
push esi
call fcn.0040e4c0
add esp, 0x30
pop edi
pop esi
mov ecx, dword [esp + 0x1009c]
xor ecx, esp
call fcn.004126f3
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.00409d20
add esp, 8
test eax, eax
je 0x40f5ba
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
lea eax, [esp + 0x20]
push eax
call fcn.004088c0
add esp, 4
cmp dword [esi + 0x40420], 0
jne 0x40f5d6
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov ecx, dword [esi + 0x70508]
push ecx
call fcn.00404f70
mov edx, dword [esi + 0x40400]
add esp, 4
or edx, dword [esi + 0x40404]
je 0x40f694
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 0x40f628
mov eax, dword [esp + 0xc]
and eax, dword [esi + 0x40400]
mov dword [esp + 8], eax
jmp 0x40f657
mov eax, dword [esi + 0x40400]
push 0
mov dword [esp + 0xc], eax
call edi
push eax
call fcn.00404fa0
add esp, 4
push eax
lea ecx, [esi + 2]
push ecx
push 0x8000042d
push 1
call fcn.004050e0
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 0x40f689
push eax
call edi
push eax
call fcn.00404fa0
add esp, 4
push eax
lea eax, [esi + 2]
push eax
push 0xc000042e
push 2
call fcn.004050e0
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 0x40f703
push edi
push 0x41dc80
push 0xffffffffffffffff
lea edx, [esp + 0x90]
push 0x10
push edx
call fcn.004126d2
push 0x4e20
push 0x41dc80
push 0xffffffffffffffff
lea eax, [esp + 0x84]
push 0x10
push eax
call fcn.004126d2
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.004050e0
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 0x40f761
mov eax, dword [esi + 0x70480]
cmp eax, edi
jbe 0x40f757
mov ecx, dword [esi + 0x704b8]
sub eax, edi
push eax
push ecx
call ebx
cmp eax, ebp
jne 0x40f761
mov dword [esi + 0x704c8], 0
cmp dword [esi + 0x7047c], 0
pop ebp
pop ebx
je 0x40f77f
cmp dword [esi + 0x704c8], 0
jne 0x40f77f
mov dword [esi + 0x704c8], 1
mov ecx, dword [esp + 0x100a4]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.004126f3
add esp, 0x100a0
ret