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

Disassembly:
push 0xffffffffffffffff
push 0x5cfd5c
mov eax, dword fs:[0]
push eax
sub esp, 0x1a4
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
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 0x502e6c
cmp byte [esi], 0
je 0x502e6c
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 0x502910
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x1a0]
call fcn.00409790
push 4
push ebp
mov ebx, 2
push str.__t_r_n
lea ecx, [esp + 0x1a4]
mov dword [esp + 0x1cc], ebx
call fcn.0049f210
push eax
push ebp
lea ecx, [esp + 0x1a0]
call fcn.00407f00
cmp dword [esp + 0x1ac], ebp
jne 0x502980
cmp dword [esp + 0x1b0], 0x10
jb 0x502f20
mov ecx, dword [esp + 0x19c]
push ecx
call fcn.00595eb8
jmp 0x502f1d
push 0x40
lea edx, [esp + 0x15c]
push ebp
push edx
mov dword [esp + 0x40], ebp
call fcn.005b5540
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 0x502ab6
push 1
push ebx
lea ecx, [esp + 0xdc]
call fcn.0040b040
mov byte [esp + 0x1c0], 3
call ebp
push eax
lea edx, [esp + 0xd8]
push str.CreateEnvironmentBlock_error
push edx
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xd8]
call fcn.004094f0
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x1c0], 4
jb 0x502a57
mov eax, dword [eax + 4]
jmp 0x502a5a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x311
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x38]
call fcn.0040bf30
lea ecx, [esp + 0x120]
mov byte [esp + 0x1c0], bl
call fcn.00409e00
lea ecx, [esp + 0x120]
push ecx
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005cdcde
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 0x502d4a
cmp dword [esp + 0x1d8], 1
jne 0x502d06
push 1
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040b040
push esi
lea eax, [esp + 0x58]
push 0x5f4384
push eax
mov byte [esp + 0x1cc], 5
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x58]
call fcn.004094f0
mov edi, 0x10
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 6
jb 0x502b57
mov eax, dword [eax + 4]
jmp 0x502b5a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x31b
push str..common_function.cpp
push 0x802
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x38]
call fcn.0040bf30
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.00409dd0
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 0x502c61
cmp dword [esp + 0x1e4], 0
je 0x502c61
push 1
push ebx
lea ecx, [esp + 0x5c]
call fcn.0040b040
lea ecx, [esp + 0x198]
push ecx
lea edx, [esp + 0x58]
push 0x5f42ec
push edx
mov byte [esp + 0x1cc], 7
call fcn.00409b60
add esp, 8
push eax
call fcn.00409240
add esp, 8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x58]
call fcn.004094f0
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 8
jb 0x502c17
mov eax, dword [eax + 4]
jmp 0x502c1a
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x321
push str..common_function.cpp
push 0x802
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x38]
call fcn.0040bf30
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.00409dd0
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.0040b040
mov eax, dword [esi]
push eax
lea ecx, [esp + 0x58]
push 0x5f436c
push ecx
mov byte [esp + 0x1cc], 9
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x58]
call fcn.004094f0
cmp dword [eax + 0x18], edi
mov byte [esp + 0x1c0], 0xa
jb 0x502cc7
mov eax, dword [eax + 4]
jmp 0x502cca
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x329
push str..common_function.cpp
push 0x802
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x38]
call fcn.0040bf30
lea ecx, [esp + 0x54]
mov byte [esp + 0x1c0], bl
call fcn.00409dd0
jmp 0x502d0b
mov edi, 0x10
mov eax, dword [esp + 0x2c]
cmp dword [eax], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x502d32
mov ecx, dword [esp + 0x1c]
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x20]
push eax
call esi
mov esi, 1
jmp 0x502e36
mov edx, dword [esp + 0x1c]
push edx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
mov esi, 1
jmp 0x502e36
push 1
push ebx
lea ecx, [esp + 0xdc]
call fcn.0040b040
mov byte [esp + 0x1c0], 0xb
call ebp
push eax
push str.__error:
push edi
push 0x5f4350
push esi
lea ecx, [esp + 0xe8]
push 0x5f433c
push ecx
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.00419d50
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0xd8]
call fcn.004094f0
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0x1c0], 0xc
jb 0x502dd2
mov eax, dword [eax + 4]
jmp 0x502dd5
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x337
push str..common_function.cpp
push 0x802
call fcn.00409860
mov ecx, eax
call fcn.004fb930
lea ecx, [esp + 0x38]
call fcn.0040bf30
lea ecx, [esp + 0x120]
mov byte [esp + 0x1c0], bl
call fcn.00409e00
lea eax, [esp + 0x120]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005cdcde
mov esi, dword [esp + 0x38]
add esp, 4
mov edi, 0x10
cmp dword [esp + 0x18], 0
je 0x502e4c
mov eax, dword [esp + 0x14]
test eax, eax
je 0x502e4c
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
cmp dword [esp + 0x1b0], edi
jb 0x502e65
mov ecx, dword [esp + 0x19c]
push ecx
call fcn.00595eb8
add esp, 4
mov eax, esi
jmp 0x502f22
push 1
push 2
lea ecx, [esp + 0x5c]
call fcn.0040b040
lea edx, [esp + 0x54]
push 0x62b300
push edx
mov dword [esp + 0x1c8], ebp
call fcn.00409b60
add esp, 8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x58]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x1c0], 1
jb 0x502eb7
mov eax, dword [eax + 4]
jmp 0x502eba
add eax, 4
push eax
push str.BaseLib::CCreateProcess::CreateProcessWithToken
push 0x2f8
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x50], esi
jb 0x502eee
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0xa0]
mov dword [esp + 0x1c0], 0xffffffff
call fcn.00409e00
lea edx, [esp + 0xa0]
push edx
mov dword [esp + 0xa4], vtable.std::ios_base.0
call fcn.005cdcde
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.005b1988
add esp, 0x1b0
ret 0x20