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

Disassembly:
push 0xffffffffffffffff
push 0x5cfca0
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x194], eax
push esi
push edi
mov eax, dword [0x65d4e4]
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 0x5026d2
cmp byte [ecx], 0
je 0x5026d2
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 0x5022d3
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x18c]
call fcn.00409790
push 4
push 0
push str.__t_r_n
lea ecx, [esp + 0x190]
mov dword [esp + 0x1b8], 2
call fcn.0049f210
push eax
push 0
lea ecx, [esp + 0x18c]
call fcn.00407f00
cmp dword [esp + 0x198], 0
jne 0x502345
cmp dword [esp + 0x19c], 0x10
jb 0x502793
mov ecx, dword [esp + 0x188]
push ecx
call fcn.00595eb8
jmp 0x502790
push 0x40
lea edx, [esp + 0x148]
push 0
push edx
or edi, 0xffffffff
call fcn.005b5540
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 0x5023b4
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 0x5025ea
call fcn.0040b040
push 0x5f4348
lea edx, [esp + 0x188]
push edx
lea eax, [esp + 0x48]
push 0x5f433c
push eax
mov byte [esp + 0x1bc], 3
call fcn.00409b60
add esp, 8
push eax
call fcn.00409240
add esp, 8
push eax
call fcn.00409b60
add esp, 8
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x44]
call fcn.004094f0
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1ac], 4
jb 0x50244a
mov eax, dword [eax + 4]
jmp 0x50244d
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessA
push 0x107
push str..common_function.cpp
push 0x802
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x24]
call fcn.0040bf30
lea ecx, [esp + 0x8c]
mov byte [esp + 0x1ac], 2
call fcn.00409e00
lea edx, [esp + 0x8c]
push edx
mov dword [esp + 0x90], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
xor edi, edi
cmp dword [esp + 0x1bc], 1
jne 0x5025ab
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 0x502595
cmp dword [esp + 0x1c8], 0
mov edi, 1
je 0x502595
push edi
push 2
lea ecx, [esp + 0xc8]
call fcn.0040b040
lea edx, [esp + 0x184]
push edx
lea eax, [esp + 0xc4]
push 0x5f42ec
push eax
mov byte [esp + 0x1b8], 5
call fcn.00409b60
add esp, 8
push eax
call fcn.00409240
add esp, 8
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0xc4]
call fcn.004094f0
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1ac], 6
jb 0x502547
mov eax, dword [eax + 4]
jmp 0x50254a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessA
push 0x111
push str..common_function.cpp
push 0x802
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x24]
call fcn.0040bf30
lea ecx, [esp + 0xc0]
mov byte [esp + 0x1ac], 2
call fcn.00409dd0
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 0x5025d2
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x10]
push eax
call esi
mov esi, 0x10
jmp 0x5026b2
mov edx, dword [esp + 0xc]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
mov esi, 0x10
jmp 0x5026b2
call fcn.0040b040
mov byte [esp + 0x1ac], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x5f42e4
lea ecx, [esp + 0x18c]
push ecx
lea edx, [esp + 0x4c]
push 0x5f433c
push edx
call fcn.00409b60
add esp, 8
push eax
call fcn.00409240
add esp, 8
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x44]
call fcn.004094f0
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1ac], 8
jb 0x502656
mov eax, dword [eax + 4]
jmp 0x502659
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessA
push 0x123
push str..common_function.cpp
push 0x802
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x24]
call fcn.0040bf30
lea ecx, [esp + 0x8c]
mov byte [esp + 0x1ac], 2
call fcn.00409e00
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0x90], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
cmp dword [esp + 0x19c], esi
jb 0x5026cb
mov edx, dword [esp + 0x188]
push edx
call fcn.00595eb8
add esp, 4
mov eax, edi
jmp 0x502796
push 1
push 2
lea ecx, [esp + 0xc8]
call fcn.0040b040
lea eax, [esp + 0xc0]
push 0x62b300
push eax
mov dword [esp + 0x1b4], 0
call fcn.00409b60
add esp, 8
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0xc4]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1ac], 1
jb 0x50272a
mov eax, dword [eax + 4]
jmp 0x50272d
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessA
push 0xef
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x3c], esi
jb 0x502761
mov edx, dword [esp + 0x28]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0x10c]
mov dword [esp + 0x1ac], 0xffffffff
call fcn.00409e00
lea eax, [esp + 0x10c]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005cdcde
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.005b1988
add esp, 0x1a4
ret 0x1c