Function at 0x509bd0
Capabilities:
Create process on windows
Create process suspended
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x5db220
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0x194], eax
push esi
push edi
mov eax, dword [0x66d4f4]
xor eax, esp
push eax
lea eax, [esp + 0x1a4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1cc]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1b4]
test ecx, ecx
mov dword [esp + 0x1c], eax
je 0x50a052
cmp byte [ecx], 0
je 0x50a052
mov eax, ecx
mov dword [esp + 0x19c], 0xf
mov dword [esp + 0x198], 0
mov byte [esp + 0x188], 0
lea esi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x509c53
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x18c]
call fcn.00408ea0
push 4
push 0
push str.__t_r_n
lea ecx, [esp + 0x190]
mov dword [esp + 0x1b8], 2
call fcn.004a2f90
push eax
push 0
lea ecx, [esp + 0x18c]
call fcn.004076f0
cmp dword [esp + 0x198], 0
jne 0x509cc5
cmp dword [esp + 0x19c], 0x10
jb 0x50a113
mov ecx, dword [esp + 0x188]
push ecx
call fcn.005a1b1d
jmp 0x50a110
push 0x40
lea edx, [esp + 0x148]
push 0
push edx
or edi, 0xffffffff
call fcn.005c0cf0
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov ax, word [esp + 0x1c4]
mov esi, 0x10
add esp, 0xc
cmp dword [esp + 0x19c], esi
mov word [esp + 0x170], ax
mov eax, dword [esp + 0x188]
mov dword [esp + 0xc], 0
mov dword [esp + 0x140], 0x44
mov dword [esp + 0x16c], 1
jae 0x509d34
lea eax, [esp + 0x188]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x1c8]
lea edx, [esp + 0x144]
push edx
push 0
push 0
push ecx
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
push 1
lea ecx, [esp + 0x44]
push 2
je 0x509f6a
call fcn.0040a750
push 0x6012a8
lea edx, [esp + 0x188]
push edx
lea eax, [esp + 0x48]
push 0x60129c
push eax
mov byte [esp + 0x1bc], 3
call fcn.00409270
add esp, 8
push eax
call fcn.00408950
add esp, 8
push eax
call fcn.00409270
add esp, 8
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x44]
call fcn.00408c00
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1ac], 4
jb 0x509dca
mov eax, dword [eax + 4]
jmp 0x509dcd
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessA
push 0x107
push str..common_function.cpp
push 0x802
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x24]
call fcn.0040b640
lea ecx, [esp + 0x8c]
mov byte [esp + 0x1ac], 2
call fcn.00409510
lea edx, [esp + 0x8c]
push edx
mov dword [esp + 0x90], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
xor edi, edi
cmp dword [esp + 0x1bc], 1
jne 0x509f2b
mov eax, dword [esp + 0x1c0]
mov ecx, dword [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x509f15
cmp dword [esp + 0x1c8], 0
mov edi, 1
je 0x509f15
push edi
push 2
lea ecx, [esp + 0xc8]
call fcn.0040a750
lea edx, [esp + 0x184]
push edx
lea eax, [esp + 0xc4]
push 0x60124c
push eax
mov byte [esp + 0x1b8], 5
call fcn.00409270
add esp, 8
push eax
call fcn.00408950
add esp, 8
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0xc4]
call fcn.00408c00
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1ac], 6
jb 0x509ec7
mov eax, dword [eax + 4]
jmp 0x509eca
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessA
push 0x111
push str..common_function.cpp
push 0x802
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x24]
call fcn.0040b640
lea ecx, [esp + 0xc0]
mov byte [esp + 0x1ac], 2
call fcn.004094e0
mov edx, dword [esp + 0xc]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x1c]
push eax
mov dword [eax], 0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [esp + 0x20]
cmp dword [eax], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x509f52
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x10]
push eax
call esi
mov esi, 0x10
jmp 0x50a032
mov edx, dword [esp + 0xc]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
mov esi, 0x10
jmp 0x50a032
call fcn.0040a750
mov byte [esp + 0x1ac], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x601244
lea ecx, [esp + 0x18c]
push ecx
lea edx, [esp + 0x4c]
push 0x60129c
push edx
call fcn.00409270
add esp, 8
push eax
call fcn.00408950
add esp, 8
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x44]
call fcn.00408c00
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1ac], 8
jb 0x509fd6
mov eax, dword [eax + 4]
jmp 0x509fd9
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessA
push 0x123
push str..common_function.cpp
push 0x802
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x24]
call fcn.0040b640
lea ecx, [esp + 0x8c]
mov byte [esp + 0x1ac], 2
call fcn.00409510
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0x90], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
cmp dword [esp + 0x19c], esi
jb 0x50a04b
mov edx, dword [esp + 0x188]
push edx
call fcn.005a1b1d
add esp, 4
mov eax, edi
jmp 0x50a116
push 1
push 2
lea ecx, [esp + 0xc8]
call fcn.0040a750
lea eax, [esp + 0xc0]
push 0x63a684
push eax
mov dword [esp + 0x1b4], 0
call fcn.00409270
add esp, 8
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0xc4]
call fcn.00408c00
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1ac], 1
jb 0x50a0aa
mov eax, dword [eax + 4]
jmp 0x50a0ad
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessA
push 0xef
push str..common_function.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x3c], esi
jb 0x50a0e1
mov edx, dword [esp + 0x28]
push edx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0x10c]
mov dword [esp + 0x1ac], 0xffffffff
call fcn.00409510
lea eax, [esp + 0x10c]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
or eax, 0xffffffff
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.005bd2d7
add esp, 0x1a4
ret 0x1c