Function at 0x40c6f7
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x45ebd8
call fcn.0045d320
sub esp, 0x60
push ebx
push esi
push edi
mov esi, ecx
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea ecx, [ebp - 0x18]
push dword [ebp + 0xc]
call fcn.004144ce
xor ebx, ebx
push 0x10
lea eax, [ebp - 0x28]
push ebx
push eax
mov dword [ebp - 4], ebx
call sub.MSVCRT.dll_memset
push 0x44
lea eax, [ebp - 0x6c]
pop edi
push edi
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
cmp dword [esi + 0x28], 0x50001
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x64], str.WinSta0Winlogon
mov dword [ebp - 0x10], ebx
jne 0x40c75f
cmp dword [ebp + 8], ebx
mov byte [ebp + 0xf], 1
ja 0x40c762
mov byte [ebp + 0xf], bl
movzx eax, byte [ebp + 0xf]
push eax
mov esi, 0x47a230
push dword [ebp + 8]
push str.RunApp__1_session_d_custom_d
push esi
call fcn.0041158a
add esp, 0x10
cmp byte [ebp + 0xf], bl
je 0x40c80c
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x18]
push eax
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00414407
push eax
push ebx
push ebx
push 1
push dword [ebp + 8]
call fcn.0040c367
mov edi, eax
add esp, 0x34
cmp edi, ebx
jne 0x40c7c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
jmp 0x40c86a
cmp dword [ebp - 0x28], ebx
jne 0x40c86a
push dword [ebp - 0x20]
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, ebx
mov dword [ebp - 0x28], eax
jne 0x40c86a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push dword [ebp - 0x20]
push str.ERROR:_OpenProcess__u__error_d
push eax
call fcn.004109c8
add esp, 0x10
lea eax, [ebp - 0x14]
push 0x465b58
push eax
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp + 8]
call fcn.0040c5db
mov dword [ebp + 0xc], eax
pop ecx
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x18]
push eax
lea eax, [ebp - 0x6c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00414407
push eax
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
cmp edi, ebx
jne 0x40c848
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40c86a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR:_CloseHandle_hToken___d
push esi
call fcn.00411572
add esp, 0xc
push dword [ebp - 0x10]
push edi
push str.RunApp__3__d_error_d
push esi
call fcn.0041158a
add esp, 0x10
cmp edi, ebx
jne 0x40c8a5
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push dword [ebp - 0x10]
push str.ERROR:_CreateProcessAsUser___error_d__session_d
push eax
call fcn.004109c8
add esp, 0x10
lea eax, [ebp - 0x14]
push 0x465b58
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x24], 0xffffffff
je 0x40c8d2
cmp dword [ebp - 0x24], ebx
je 0x40c8d2
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40c8d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR:_CloseHandle_pi.hThread___d
push esi
call fcn.00411572
add esp, 0xc
mov esi, dword [ebp - 0x28]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.00413ff7
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8