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

Disassembly:
push 0xffffffffffffffff
push 0x5cecfc
mov eax, dword fs:[0]
push eax
sub esp, 0x1a4
mov eax, dword [0x65b4e4]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65b4e4]
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 0x501e4c
cmp byte [esi], 0
je 0x501e4c
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 0x5018f0
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x1a0]
call fcn.004098b0
push 4
push ebp
mov ebx, 2
push str.__t_r_n
lea ecx, [esp + 0x1a4]
mov dword [esp + 0x1cc], ebx
call fcn.0049f800
push eax
push ebp
lea ecx, [esp + 0x1a0]
call fcn.00408170
cmp dword [esp + 0x1ac], ebp
jne 0x501960
cmp dword [esp + 0x1b0], 0x10
jb 0x501f00
mov ecx, dword [esp + 0x19c]
push ecx
call fcn.00594e98
jmp 0x501efd
push 0x40
lea edx, [esp + 0x15c]
push ebp
push edx
mov dword [esp + 0x40], ebp
call fcn.005b4520
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 0x501a96
push 1
push ebx
lea ecx, [esp + 0xdc]
call fcn.0040b160
mov byte [esp + 0x1c0], 3
call ebp
push eax
lea edx, [esp + 0xd8]
push str.CreateEnvironmentBlock_error
push edx
call fcn.00409c80
add esp, 8
mov ecx, eax
call fcn.004024e0
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xd8]
call fcn.00409610
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x1c0], 4
jb 0x501a37
mov eax, dword [eax + 4]
jmp 0x501a3a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x311
push str..common_function.cpp
push 0xf0000000
call fcn.00409980
mov ecx, eax
call fcn.004fa910
lea ecx, [esp + 0x38]
call fcn.0040c050
lea ecx, [esp + 0x120]
mov byte [esp + 0x1c0], bl
call fcn.00409f20
lea ecx, [esp + 0x120]
push ecx
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005cccbe
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 0x501d2a
cmp dword [esp + 0x1d8], 1
jne 0x501ce6
push 1
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040b160
push esi
lea eax, [esp + 0x58]
push 0x5f3384
push eax
mov byte [esp + 0x1cc], 5
call fcn.00409c80
add esp, 8
push eax
call fcn.00409c80
add esp, 8
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x58]
call fcn.00409610
mov edi, 0x10
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 6
jb 0x501b37
mov eax, dword [eax + 4]
jmp 0x501b3a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x31b
push str..common_function.cpp
push 0x802
call fcn.00409980
mov ecx, eax
call fcn.004fa910
lea ecx, [esp + 0x38]
call fcn.0040c050
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.00409ef0
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 0x501c41
cmp dword [esp + 0x1e4], 0
je 0x501c41
push 1
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040b160
lea ecx, [esp + 0x198]
push ecx
lea edx, [esp + 0x58]
push 0x5f32ec
push edx
mov byte [esp + 0x1cc], 7
call fcn.00409c80
add esp, 8
push eax
call fcn.00409360
add esp, 8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x58]
call fcn.00409610
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 8
jb 0x501bf7
mov eax, dword [eax + 4]
jmp 0x501bfa
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x321
push str..common_function.cpp
push 0x802
call fcn.00409980
mov ecx, eax
call fcn.004fa910
lea ecx, [esp + 0x38]
call fcn.0040c050
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.00409ef0
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.0040b160
mov eax, dword [esi]
push eax
lea ecx, [esp + 0x58]
push 0x5f336c
push ecx
mov byte [esp + 0x1cc], 9
call fcn.00409c80
add esp, 8
mov ecx, eax
call fcn.004024e0
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x58]
call fcn.00409610
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 0xa
jb 0x501ca7
mov eax, dword [eax + 4]
jmp 0x501caa
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x329
push str..common_function.cpp
push 0x802
call fcn.00409980
mov ecx, eax
call fcn.004fa910
lea ecx, [esp + 0x38]
call fcn.0040c050
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.00409ef0
jmp 0x501ceb
mov edi, 0x10
mov eax, dword [esp + 0x2c]
cmp dword [eax], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x501d12
mov ecx, dword [esp + 0x1c]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x20]
push eax
call esi
mov esi, 1
jmp 0x501e16
mov edx, dword [esp + 0x1c]
push edx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
mov esi, 1
jmp 0x501e16
push 1
push ebx
lea ecx, [esp + 0xdc]
call fcn.0040b160
mov byte [esp + 0x1c0], 0xb
call ebp
push eax
push str.__error:
push edi
push 0x5f3350
push esi
lea ecx, [esp + 0xe8]
push 0x5f333c
push ecx
call fcn.00409c80
add esp, 8
push eax
call fcn.00409c80
add esp, 8
push eax
call fcn.00409c80
add esp, 8
mov ecx, eax
call fcn.004194e0
push eax
call fcn.00409c80
add esp, 8
mov ecx, eax
call fcn.004024e0
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0xd8]
call fcn.00409610
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x1c0], 0xc
jb 0x501db2
mov eax, dword [eax + 4]
jmp 0x501db5
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x337
push str..common_function.cpp
push 0x802
call fcn.00409980
mov ecx, eax
call fcn.004fa910
lea ecx, [esp + 0x38]
call fcn.0040c050
lea ecx, [esp + 0x120]
mov byte [esp + 0x1c0], bl
call fcn.00409f20
lea eax, [esp + 0x120]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005cccbe
mov esi, dword [esp + 0x38]
add esp, 4
mov edi, 0x10
cmp dword [esp + 0x18], 0
je 0x501e2c
mov eax, dword [esp + 0x14]
test eax, eax
je 0x501e2c
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
cmp dword [esp + 0x1b0], edi
jb 0x501e45
mov ecx, dword [esp + 0x19c]
push ecx
call fcn.00594e98
add esp, 4
mov eax, esi
jmp 0x501f02
push 1
push 2
lea ecx, [esp + 0x5c]
call fcn.0040b160
lea edx, [esp + 0x54]
push 0x62a1a0
push edx
mov dword [esp + 0x1c8], ebp
call fcn.00409c80
add esp, 8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x58]
call fcn.00409610
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1c0], 1
jb 0x501e97
mov eax, dword [eax + 4]
jmp 0x501e9a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x2f8
push str..common_function.cpp
push 0xf0000000
call fcn.00409980
mov ecx, eax
call fcn.004fa910
cmp dword [esp + 0x50], esi
jb 0x501ece
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.00594e98
add esp, 4
lea ecx, [esp + 0xa0]
mov dword [esp + 0x1c0], 0xffffffff
call fcn.00409f20
lea edx, [esp + 0xa0]
push edx
mov dword [esp + 0xa4], vtable.std::ios_base.0
call fcn.005cccbe
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.005b0968
add esp, 0x1b0
ret 0x20