Function at 0x422631
Capabilities:
Create process on windows
Query environment variable
Spoof parent pid

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x74
and dword [ebp - 0xc], 0
lea eax, [ebp - 0xc]
push ebx
push edi
mov dword [ebp - 0x14], ecx
mov ecx, str._SystemRoot_System32ATBroker.exe
push eax
call fcn.0041f78c
test eax, eax
js 0x422668
mov ecx, dword [ebp - 0xc]
or ebx, 0xffffffff
lea eax, [ecx + 0x104]
mov edi, eax
cmp eax, ecx
jae 0x422675
mov edi, ebx
mov eax, 0x80004005
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
and dword [ebp - 8], 0
lea ecx, [ebp - 8]
push edi
call fcn.004201fd
test al, al
jne 0x422690
mov edi, 0x8007000e
jmp 0x42283f
push edi
push dword [ebp - 8]
push str._SystemRoot_System32ATBroker.exe
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x4226c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x42283f
movzx edi, di
or edi, 0x80070000
jmp 0x42283f
cmp eax, edi
jbe 0x4226cf
mov edi, 0x8007007a
jmp 0x42283f
lea eax, [edi + 0x16]
cmp eax, edi
jb 0x42283a
lea ecx, [eax + 0x104]
cmp ecx, eax
jb 0x42283a
and dword [ebp - 0xc], 0
mov ebx, ecx
push ebx
lea ecx, [ebp - 0xc]
call fcn.004201fd
test al, al
jne 0x422705
mov edi, 0x8007000e
jmp 0x42282f
mov ecx, dword [ebp - 0x14]
mov eax, 0x4045b8
cmp byte [ecx + 0x2c], 0
jne 0x422718
mov eax, 0x402860
push eax
push dword [ecx]
push dword [ebp - 8]
push 0x404424
push ebx
push dword [ebp - 0xc]
call fcn.00405fdb
add esp, 0x18
test eax, eax
jns 0x42273d
mov edi, 0x80004005
jmp 0x42282f
push 0x48
pop edi
push edi
lea eax, [ebp - 0x74]
push 0
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll__o_memset
and dword [ebp - 0x14], 0
xor ebx, ebx
and dword [ebp - 0x10], ebx
add esp, 0xc
mov dword [ebp - 0x74], edi
xor edi, edi
cmp dword [ebp + 8], ebx
je 0x4227d1
lea edx, [ebp - 0x18]
call fcn.004225e8
test eax, eax
js 0x4227d1
lea eax, [ebp - 0x10]
push eax
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
xor eax, eax
test ebx, ebx
setne al
test ebx, ebx
je 0x4227a8
lea eax, [ebp - 0x10]
push eax
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
test eax, eax
je 0x4227d1
xor ecx, ecx
mov dword [ebp - 0x14], 1
push ecx
push ecx
push 4
lea eax, [ebp - 0x18]
push eax
push 0x20000
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
test eax, eax
je 0x4227d1
mov dword [ebp - 0x30], ebx
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x74]
push eax
xor eax, eax
push eax
push eax
push 0x1080000
push eax
push eax
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x422809
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42280e
mov edi, 0x80004005
cmp dword [ebp - 0x14], 0
je 0x42281b
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
test ebx, ebx
je 0x42282f
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0xc]
call fcn.0044177c
pop ecx
jmp 0x42283f
mov edi, 0x80004005
push dword [ebp - 8]
call fcn.0044177c
pop ecx
mov eax, edi
jmp 0x42266d