Function at 0x50a200
Capabilities:
Create process on windows
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x5db2dc
mov eax, dword fs:[0]
push eax
sub esp, 0x1a4
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
xor eax, esp
push eax
lea eax, [esp + 0x1b8]
mov dword fs:[0], eax
mov esi, dword [esp + 0x1d0]
mov eax, dword [esp + 0x1c8]
mov edi, dword [esp + 0x1cc]
xor ebp, ebp
cmp esi, ebp
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], eax
je 0x50a7ec
cmp byte [esi], 0
je 0x50a7ec
mov eax, esi
mov dword [esp + 0x1b0], 0xf
mov dword [esp + 0x1ac], ebp
mov byte [esp + 0x19c], 0
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x50a290
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x1a0]
call fcn.00408ea0
push 4
push ebp
mov ebx, 2
push str.__t_r_n
lea ecx, [esp + 0x1a4]
mov dword [esp + 0x1cc], ebx
call fcn.004a2f90
push eax
push ebp
lea ecx, [esp + 0x1a0]
call fcn.004076f0
cmp dword [esp + 0x1ac], ebp
jne 0x50a300
cmp dword [esp + 0x1b0], 0x10
jb 0x50a8a0
mov ecx, dword [esp + 0x19c]
push ecx
call fcn.005a1b1d
jmp 0x50a89d
push 0x40
lea edx, [esp + 0x15c]
push ebp
push edx
mov dword [esp + 0x40], ebp
call fcn.005c0cf0
add esp, 0xc
xor eax, eax
push ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov ax, word [esp + 0x1d8]
push edi
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x160], 0x44
mov dword [esp + 0x168], str.winsta0default
mov dword [esp + 0x18c], 1
mov word [esp + 0x190], ax
mov dword [esp + 0x20], ebp
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jne 0x50a436
push 1
push ebx
lea ecx, [esp + 0xdc]
call fcn.0040a750
mov byte [esp + 0x1c0], 3
call ebp
push eax
lea edx, [esp + 0xd8]
push str.CreateEnvironmentBlock_error
push edx
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xd8]
call fcn.00408c00
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x1c0], 4
jb 0x50a3d7
mov eax, dword [eax + 4]
jmp 0x50a3da
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x311
push str..common_function.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x38]
call fcn.0040b640
lea ecx, [esp + 0x120]
mov byte [esp + 0x1c0], bl
call fcn.00409510
lea ecx, [esp + 0x120]
push ecx
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005d9cc4
mov eax, dword [esp + 0x1c]
add esp, 4
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x1e4]
neg eax
lea ecx, [esp + 0x158]
push ecx
push 0
sbb eax, eax
and eax, dword [esp + 0x20]
or edx, 0x410
push eax
push edx
push 0
push 0
push 0
push esi
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x50a6ca
cmp dword [esp + 0x1d8], 1
jne 0x50a686
push 1
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040a750
push esi
lea eax, [esp + 0x58]
push 0x6012e4
push eax
mov byte [esp + 0x1cc], 5
call fcn.00409270
add esp, 8
push eax
call fcn.00409270
add esp, 8
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x58]
call fcn.00408c00
mov edi, 0x10
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 6
jb 0x50a4d7
mov eax, dword [eax + 4]
jmp 0x50a4da
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x31b
push str..common_function.cpp
push 0x802
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x38]
call fcn.0040b640
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.004094e0
mov edx, dword [esp + 0x1dc]
mov eax, dword [esp + 0x1c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x50a5e1
cmp dword [esp + 0x1e4], 0
je 0x50a5e1
push 1
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040a750
lea ecx, [esp + 0x198]
push ecx
lea edx, [esp + 0x58]
push 0x60124c
push edx
mov byte [esp + 0x1cc], 7
call fcn.00409270
add esp, 8
push eax
call fcn.00408950
add esp, 8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x58]
call fcn.00408c00
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 8
jb 0x50a597
mov eax, dword [eax + 4]
jmp 0x50a59a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x321
push str..common_function.cpp
push 0x802
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x38]
call fcn.0040b640
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.004094e0
mov ecx, dword [esp + 0x1c]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
push esi
push edx
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push 1
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040a750
mov eax, dword [esi]
push eax
lea ecx, [esp + 0x58]
push 0x6012cc
push ecx
mov byte [esp + 0x1cc], 9
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x58]
call fcn.00408c00
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 0xa
jb 0x50a647
mov eax, dword [eax + 4]
jmp 0x50a64a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x329
push str..common_function.cpp
push 0x802
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x38]
call fcn.0040b640
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.004094e0
jmp 0x50a68b
mov edi, 0x10
mov eax, dword [esp + 0x2c]
cmp dword [eax], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x50a6b2
mov ecx, dword [esp + 0x1c]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x20]
push eax
call esi
mov esi, 1
jmp 0x50a7b6
mov edx, dword [esp + 0x1c]
push edx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
mov esi, 1
jmp 0x50a7b6
push 1
push ebx
lea ecx, [esp + 0xdc]
call fcn.0040a750
mov byte [esp + 0x1c0], 0xb
call ebp
push eax
push str.__error:
push edi
push 0x6012b0
push esi
lea ecx, [esp + 0xe8]
push 0x60129c
push ecx
call fcn.00409270
add esp, 8
push eax
call fcn.00409270
add esp, 8
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419cd0
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0xd8]
call fcn.00408c00
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x1c0], 0xc
jb 0x50a752
mov eax, dword [eax + 4]
jmp 0x50a755
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x337
push str..common_function.cpp
push 0x802
call fcn.00408f70
mov ecx, eax
call fcn.00512650
lea ecx, [esp + 0x38]
call fcn.0040b640
lea ecx, [esp + 0x120]
mov byte [esp + 0x1c0], bl
call fcn.00409510
lea eax, [esp + 0x120]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005d9cc4
mov esi, dword [esp + 0x38]
add esp, 4
mov edi, 0x10
cmp dword [esp + 0x18], 0
je 0x50a7cc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x50a7cc
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
cmp dword [esp + 0x1b0], edi
jb 0x50a7e5
mov ecx, dword [esp + 0x19c]
push ecx
call fcn.005a1b1d
add esp, 4
mov eax, esi
jmp 0x50a8a2
push 1
push 2
lea ecx, [esp + 0x5c]
call fcn.0040a750
lea edx, [esp + 0x54]
push 0x63a684
push edx
mov dword [esp + 0x1c8], ebp
call fcn.00409270
add esp, 8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x58]
call fcn.00408c00
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1c0], 1
jb 0x50a837
mov eax, dword [eax + 4]
jmp 0x50a83a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x2f8
push str..common_function.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x50], esi
jb 0x50a86e
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0xa0]
mov dword [esp + 0x1c0], 0xffffffff
call fcn.00409510
lea edx, [esp + 0xa0]
push edx
mov dword [esp + 0xa4], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x1b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.005bd2d7
add esp, 0x1b0
ret 0x20