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

Disassembly:
push ebp
mov ecx, 0x11
xor eax, eax
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x170]
push ebx
sub esp, 0x1c0
mov dword [ebp - 0x194], 1
rep stosd dword es:[edi], eax
mov ecx, dword [0x850160]
test ecx, ecx
je 0x518ea0
mov dword [esp + 4], 0
lea ebx, [ebp - 0x190]
mov dword [esp], 0
call dword [0x85016c]
sub esp, 8
mov edi, eax
mov dword [ebp - 0x1a0], eax
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x1356
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.CreateJobObjectW_failed__error__lu._n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], eax
call fcn.0050e8b0
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [0x85016c]
sub esp, 8
mov edi, eax
mov dword [ebp - 0x19c], eax
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x1358
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.CreateJobObjectW_failed__error__lu._n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
lea edi, [ebp - 0x12a]
setne al
mov dword [esp], eax
call fcn.0050e8b0
mov dword [esp + 8], 0x84fee0
mov dword [esp + 4], str.__s__process_wait
mov dword [esp], edi
call fcn.0050d7a0
lea eax, [ebp - 0x170]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x1000000
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateProcessA]
sub esp, 0x28
mov edx, eax
test eax, eax
jne 0x518930
cmp dword [esi + 0x34], 5
je 0x518ec0
mov dword [ebp - 0x198], edx
add ebx, 0x10
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x1364
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.CreateProcessA_error__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x198]
mov dword [esp], edx
call fcn.0050e8b0
lea eax, [ebp - 0x170]
cmp ebx, eax
jne 0x5188ce
lea eax, [ebp - 0x194]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x190]
mov dword [esp], eax
call dword [0x850160]
sub esp, 0xc
mov ebx, eax
mov eax, 0x136a
call fcn.0050dc60
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.IsProcessInJob_error__lu_n
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.0050e8b0
mov eax, dword [ebp - 0x194]
test eax, eax
je 0x518cd8
mov edx, dword [sym.imp.kernel32.dll_TerminateProcess]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x190]
mov dword [esp], eax
call edx
mov eax, 0x1383
sub esp, 8
call fcn.0050dc60
mov eax, dword [ebp - 0x190]
mov dword [esp], eax
call fcn.0057d980
mov eax, dword [ebp - 0x190]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x18c]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
mov edx, dword [ebp - 0x194]
test edx, edx
jne 0x518cb8
mov eax, dword [ebp - 0x1a0]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x19c]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [esp + 4], str.test_nested_jobs_0
mov dword [esp], 0
call dword [0x85016c]
sub esp, 8
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov edx, dword fs:[0x18]
mov dword [eax + 4], 0x1391
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x19c], edx
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp + 4], str.CreateJobObjectW_failed__error__lu._n
mov dword [ebp - 0x198], esi
mov dword [esp], eax
call fcn.0050e8b0
mov dword [esp + 4], str.test_nested_jobs_1
mov dword [esp], 0
call dword [0x85016c]
sub esp, 8
mov esi, eax
call fcn.0057d110
mov edx, dword [ebp - 0x19c]
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x1393
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str.CreateJobObjectW_failed__error__lu._n
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.0050e8b0
mov dword [esp + 8], 0x84fee0
mov dword [esp + 4], str.__s__process_nested_jobs_0
mov dword [esp], edi
call fcn.0050d7a0
call fcn.0057d110
lea ecx, [ebp - 0x190]
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x1396
mov dword [esp + 0x24], ecx
lea ecx, [ebp - 0x170]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateProcessA]
sub esp, 0x28
mov dword [esp], eax
mov dword [esp + 4], str.CreateProcess_failed_n
call fcn.0050e8b0
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x1398
mov eax, dword [ebp - 0x190]
mov dword [esp], eax
call fcn.0057d980
mov dword [esp + 8], 0x84fee0
mov dword [esp + 4], str.__s__process_nested_jobs_1
mov dword [esp], edi
call fcn.0050d7a0
call fcn.0057d110
lea ecx, [ebp - 0x170]
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x139a
lea eax, [ebp - 0x180]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateProcessA]
sub esp, 0x28
mov dword [esp], eax
mov dword [esp + 4], str.CreateProcess_failed_n
call fcn.0050e8b0
call fcn.0057d110
mov dword [eax], 0x5eee7f
mov dword [eax + 4], 0x139c
mov eax, dword [ebp - 0x180]
mov dword [esp], eax
call fcn.0057d980
mov eax, dword [ebp - 0x190]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x18c]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x180]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x17c]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x198]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [esp], esi
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x138a
call fcn.0050dc60
mov dword [esp], str.Test_process_is_already_in_job__cant_test_parenting_non_empty_job._n
call fcn.0050e770
jmp 0x518a2f
mov eax, dword [ebp - 0x180]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x19c]
mov dword [esp], eax
call dword [0x850164]
sub esp, 8
mov ebx, eax
mov eax, 0x136f
call fcn.0050dc60
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.AssignProcessToJobObject_error__lu_n
mov dword [esp + 8], eax
call fcn.0050e8b0
mov eax, dword [ebp - 0x190]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x1a0]
mov dword [esp], ecx
call dword [0x850164]
sub esp, 8
mov ebx, eax
mov eax, 0x1372
call fcn.0050dc60
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.AssignProcessToJobObject_error__lu_n
mov dword [esp + 8], eax
call fcn.0050e8b0
mov eax, dword [ebp - 0x190]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x19c]
mov dword [esp], eax
call dword [0x850164]
sub esp, 8
mov ebx, eax
mov eax, 0x1375
call fcn.0050dc60
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.AssignProcessToJobObject_succeeded_n
sete al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, 0x1376
call fcn.0050dc60
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.Got_unexpected_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 5
sete al
mov dword [esp], eax
call fcn.0050e8b0
mov edx, dword [sym.imp.kernel32.dll_TerminateProcess]
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x180]
mov dword [esp], eax
mov dword [ebp - 0x1a4], edx
call edx
mov eax, 0x1379
sub esp, 8
call fcn.0050dc60
mov eax, dword [ebp - 0x180]
mov dword [esp], eax
call fcn.0057d980
mov eax, dword [ebp - 0x180]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x17c]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x190]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x19c]
mov dword [esp], eax
call dword [0x850164]
sub esp, 8
mov dword [ebp - 0x198], eax
mov eax, 0x137e
call fcn.0050dc60
mov dword [esp + 4], str.AssignProcessToJobObject_succeeded_n
xor eax, eax
mov ecx, dword [ebp - 0x198]
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.0050e8b0
mov eax, 0x137f
call fcn.0050dc60
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.Got_unexpected_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 5
sete al
mov dword [esp], eax
call fcn.0050e8b0
mov edx, dword [ebp - 0x1a4]
jmp 0x5189d7
mov eax, 0x1351
call fcn.0050dc60
mov dword [esp], str.IsProcessInJob_not_available._n
call fcn.0050e770
jmp 0x518caa
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x518a21