Function at 0x40afb2
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2c10
call fcn.00414000
cmp dword [0x41d950], 0xffffffff
push ebx
je 0x40afd1
push 1
pop eax
jmp 0x40b287
call fcn.0040af99
test eax, eax
je 0x40b285
xor ebx, ebx
cmp dword [0x420bd8], ebx
jne 0x40b285
cmp dword [0x41d950], 0xffffffff
push esi
push edi
mov dword [ebp - 8], ebx
mov dword [0x420bd8], 1
mov esi, 0x3ff
jne 0x40b145
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x1410]
push esi
push eax
push dword [0x423968]
call edi
push esi
lea eax, [ebp - 0xc10]
push 0x41da3c
push eax
call fcn.0040c67c
add esp, 0xc
lea eax, [ebp - 0xc0c]
push 0xa
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.004142d5
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0x400
push eax
lea eax, [ebp - 0x2410]
push eax
call fcn.0040babf
add esp, 0x14
test eax, eax
je 0x40b0a7
lea eax, [ebp - 0xc10]
push eax
call fcn.00413733
lea ebx, [ebp + eax*2 - 0xc10]
push esi
lea eax, [ebp - 0xc10]
push 0x41c35c
push eax
call fcn.0040c719
lea eax, [ebp - 0x2410]
push esi
push eax
lea eax, [ebp - 0xc10]
push eax
call fcn.0040c719
add esp, 0x1c
lea eax, [ebp - 0x1410]
push esi
push eax
lea eax, [ebp - 0x2c10]
push eax
call fcn.0040c67c
add esp, 0xc
cmp dword [0x4240b0], 0
je 0x40b128
call fcn.0040aee0
test eax, eax
je 0x40b128
lea eax, [ebp - 0x1c10]
push esi
push eax
push dword [0x423968]
call edi
lea eax, [ebp - 0x1c10]
push 0x5c
push eax
call fcn.00414068
pop ecx
test eax, eax
pop ecx
je 0x40b0f8
and word [eax], 0
lea eax, [ebp - 0x1c10]
push 0
push eax
lea eax, [ebp - 0xc10]
push eax
lea eax, [ebp - 0x1410]
push eax
push str.runas
push dword [ebp + 8]
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
xor ecx, ecx
cmp eax, 0x20
setge cl
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0
jne 0x40b197
push esi
lea eax, [ebp - 0x410]
push str.Error_running_program:
push eax
call fcn.0040c63d
add esp, 0xc
jmp 0x40b148
mov ebx, dword [ebp + 8]
cmp dword [ebp - 4], 0
jne 0x40b197
push esi
lea eax, [ebp - 0x410]
push 0x41da14
push eax
mov dword [0x420b40], 1
call fcn.0040c6bc
lea eax, [ebp - 0x1410]
push esi
push eax
lea eax, [ebp - 0x410]
push eax
call fcn.0040c780
add esp, 0x18
lea eax, [ebp - 0x410]
push 0x10010
push str.Error_
push eax
jmp 0x40b26d
push esi
lea eax, [ebp - 0x1410]
push str..pipeTcInstallPipe
push eax
call fcn.0040c67c
add esp, 0xc
test ebx, ebx
je 0x40b1b4
and word [ebx], 0
lea eax, [ebp - 0xc0c]
push esi
push eax
lea eax, [ebp - 0x1410]
push eax
call fcn.0040c719
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
add esp, 0xc
call esi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
mov dword [ebp - 4], eax
call edi
call esi
sub eax, dword [ebp - 4]
push eax
call fcn.00413bbe
pop ecx
mov ebx, 0x7d0
cmp eax, ebx
jge 0x40b22e
push 0x64
call edi
xor eax, eax
push eax
push eax
push 3
push eax
push eax
lea eax, [ebp - 0x1410]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [0x41d950], eax
jne 0x40b238
call esi
sub eax, dword [ebp - 4]
push eax
call fcn.00413bbe
pop ecx
jmp 0x40b1f4
mov eax, dword [0x41d950]
cmp eax, 0xffffffff
je 0x40b257
push 0
lea ecx, [ebp - 0x10]
push 0
push ecx
push eax
mov dword [ebp - 0x10], 2
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
mov dword [ebp - 8], 1
jmp 0x40b27e
push 0x10
push str.Error
mov dword [0x420b40], 1
push str.Failed_to_connect_to_elevated_process_
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 8]
pop edi
pop esi
jmp 0x40b287
xor eax, eax
pop ebx
leave
ret