Function at 0x4f71c0
Capabilities:
Create process on windows
Impersonate user

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
mov eax, dword [0x62d040]
xor eax, esp
mov dword [esp + 0x88], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x18]
push 0x40
mov dword [esp + 0x34], eax
lea eax, [esp + 0x48]
push 0
push eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x4c], 0x44
call fcn.00581cf0
mov edx, ebx
mov byte [esp + 0x1c], 0
and edx, 0x3000
add esp, 0xc
cmp edx, 0x3000
jne 0x4f724b
mov eax, 0xc00000f0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14
cmp dword [edi], 0
jne 0x4f7272
cmp dword [edi + 4], 0
jne 0x4f7272
mov eax, 0xc0000030
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14
mov dword [esp + 0x6c], 1
mov eax, 1
mov word [esp + 0x70], ax
mov eax, dword [edi + 0x10]
mov dword [esp + 0x48], eax
test ebx, 0x40000
je 0x4f7496
test edx, edx
sete al
xor edx, edx
test ebx, 0x10000
movzx eax, al
cmove edx, eax
mov dword [esp + 0x88], edx
test ebx, 0x20000
je 0x4f72ee
push 0
push 4
lea eax, [esp + 0x94]
or esi, 0xffffffff
push eax
push 0x18
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
mov eax, dword [esp + 0x88]
movzx edx, al
cmovns esi, dword [esp + 0x8c]
xor ecx, ecx
cmp dword [edi + 0x14], esi
cmovne edx, ecx
mov eax, dword [edi + 0x24]
test eax, eax
je 0x4f72fe
cmp eax, 2
jne 0x4f7496
mov edi, edi
test dl, dl
je 0x4f7496
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov eax, dword [edi + 4]
test eax, eax
je 0x4f732f
push eax
call sym.SystemInformer.exe_PhCreateString
mov dword [esp + 0x10], eax
mov esi, ebx
or esi, 2
cmp dword [edi + 0xc], 0
cmovne esi, ebx
mov ebx, dword [esp + 0x10]
mov ecx, esi
mov eax, esi
shr ecx, 5
and ecx, 1
mov edx, ecx
or edx, 2
test al, 0x40
cmove edx, ecx
mov ecx, edx
or ecx, 4
test al, 4
cmove ecx, edx
mov edx, ecx
or edx, 0x10
test al, 0x10
cmove edx, ecx
mov ecx, edx
or ecx, 0x400
test al, 2
cmove ecx, edx
mov edx, ecx
or edx, 0x80000
test al, 0x80
cmove edx, ecx
mov ecx, edx
or ecx, 0x1000000
test al, 8
cmove ecx, edx
mov edx, ecx
or edx, 0x4000000
test esi, 0x100
cmove edx, ecx
test ebx, ebx
je 0x4f73a9
mov eax, dword [ebx + 4]
jmp 0x4f73ab
xor eax, eax
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x44]
push ecx
push dword [edi + 8]
push dword [edi + 0xc]
push edx
push eax
push dword [edi]
push 1
push dword [edi + 0x20]
push dword [edi + 0x18]
push dword [edi + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
test eax, eax
je 0x4f73d8
xor esi, esi
jmp 0x4f73e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
test ebx, ebx
je 0x4f73fe
lea ecx, [ebx - 8]
or edx, 0xffffffff
lock xadd dword [ecx + 4], edx
dec edx
jne 0x4f73fe
call fcn.004fbfa0
mov edi, edi
test esi, esi
js 0x4f745f
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x4f7419
mov eax, dword [esp + 0x20]
mov dword [ecx], eax
mov eax, dword [esp + 0x24]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
test edx, edx
je 0x4f7429
mov dword [edx], eax
jmp 0x4f7434
test eax, eax
je 0x4f7434
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov edx, dword ds:[esp + 0x30]
mov eax, dword [esp + 0x1c]
test edx, edx
je 0x4f7472
mov dword [edx], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4f746e
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4f747d
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14
jmp 0x4f74a0
test ebx, 0x1000
je 0x4f7576
push dword [edi + 0x18]
lea eax, [esp + 0x14]
push 0x1000
push eax
call sym.SystemInformer.exe_PhOpenProcess
mov edi, edi
test eax, eax
jns 0x4f74de
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [0x6355f0]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x88], ecx
lea ecx, [esp + 0xc]
push ecx
push 0xf01ff
push eax
mov dword [esp + 0x98], eax
call dword [sym.imp.ntdll.dll_NtOpenProcessToken]
mov esi, eax
cmp esi, 0xc0000022
jne 0x4f7533
cmp dword [esp + 0x88], 5
jne 0x4f7533
mov ecx, dword [esp + 0x8c]
lea eax, [esp + 0xc]
push eax
mov edx, 0xf01ff
call fcn.00523b00
mov esi, eax
push dword [esp + 0x10]
call dword [sym.imp.ntdll.dll_NtClose]
lea ecx, [ecx]
test esi, esi
jns 0x4f7563
lfence
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14
mov eax, ebx
shr eax, 0x11
and eax, 0xffffff01
mov dword [esp + 0x10], eax
jmp 0x4f769a
test ebx, 0x2000
je 0x4f75e7
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x88]
push eax
push 0xc
lea eax, [esp + 0x20]
push eax
push 0xe
push dword [edi + 0x18]
push 0
call dword [sym.imp.WINSTA.dll_WinStationQueryInformationW]
test al, al
jne 0x4f75cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], eax
mov eax, ebx
shr eax, 0x11
and al, 1
mov byte [esp + 0x10], al
jmp 0x4f769a
mov esi, dword [edi + 0x24]
test esi, esi
jne 0x4f767b
mov ecx, dword ds:[edi + 0x18]
mov esi, 2
mov al, byte [ecx]
xor al, 0xe
test al, 0x1f
jne 0x4f767b
push str.NT_AUTHORITY
push ecx
call fcn.0058383e
add esp, 8
test eax, eax
jne 0x4f767b
mov ecx, dword ds:[edi + 0x1c]
mov al, byte [ecx]
xor al, 0xf3
test al, 0x1f
jne 0x4f7636
push str.SYSTEM
push ecx
call fcn.0058383e
add esp, 8
test eax, eax
je 0x4f7676
mov ecx, dword ds:[edi + 0x1c]
mov al, byte [ecx]
xor al, 0xc
test al, 0x1f
jne 0x4f7659
push str.LOCAL_SERVICE
push ecx
call fcn.0058383e
add esp, 8
test eax, eax
je 0x4f7676
mov ecx, dword [edi + 0x1c]
mov al, byte ds:[ecx]
xor al, 0xe
test al, 0x1f
jne 0x4f767b
push str.NETWORK_SERVICE
push ecx
call fcn.0058383e
add esp, 8
test eax, eax
jne 0x4f767b
mov esi, 5
lea eax, [esp + 0xc]
push eax
push 0
push esi
push dword [edi + 0x20]
push dword [edi + 0x18]
push dword [edi + 0x1c]
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
test eax, eax
je 0x4f75ac
lea ebx, [ebx]
test ebx, 0x10000
je 0x4f7716
lea eax, [esp + 0x90]
push eax
push 4
lea eax, [esp + 0x90]
push eax
push 0x13
push dword [esp + 0x1c]
call dword [sym.imp.ntdll.dll_NtQueryInformationToken]
test eax, eax
js 0x4f7716
mov esi, dword [esp + 0x88]
lea eax, [esp + 0x3c]
push eax
push 4
lea eax, [esp + 0x94]
push eax
push 8
push esi
call dword [sym.imp.ntdll.dll_NtQueryInformationToken]
test eax, eax
js 0x4f770f
cmp dword [esp + 0x8c], 1
jne 0x4f770f
push dword ds:[esp + 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
mov dword [esp + 0xc], esi
jmp 0x4f7799
push esi
call dword [sym.imp.ntdll.dll_NtClose]
cmp byte ds:[esp + 0x10], 0
je 0x4f7799
lea eax, [esp + 0x88]
mov dword [esp + 0x18], 0x18
push eax
push 1
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x28], 0
push eax
push 0xf01ff
push dword [esp + 0x20]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
call dword [sym.imp.ntdll.dll_NtDuplicateToken]
push dword ds:[esp + 0xc]
mov esi, eax
call dword [sym.imp.ntdll.dll_NtClose]
test esi, esi
js 0x4f7544
mov eax, dword [esp + 0x88]
mov dword [esp + 0xc], eax
lea esp, [esp]
test ebx, 0x20000
je 0x4f77f4
mov eax, dword [edi + 0x14]
push 4
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x8c]
push eax
push 0xc
push dword [esp + 0x18]
call dword [sym.imp.ntdll.dll_NtSetInformationToken]
mov esi, eax
test esi, esi
jns 0x4f77f4
lfence
push dword [esp + 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14
test ebx, 0x80000
je 0x4f7824
push 4
lea eax, [esp + 0x8c]
mov dword [esp + 0x8c], 1
push eax
push 0x1a
push dword [esp + 0x18]
call dword [sym.imp.ntdll.dll_NtSetInformationToken]
mov esi, eax
test esi, esi
js 0x4f77ce
cmp dword [edi + 0xc], 0
jne 0x4f785b
call fcn.00520cc0
test eax, eax
je 0x4f785b
push 0
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
call fcn.00520cc0
mov esi, eax
mov ecx, eax
call dword [0x5a38e4]
call esi
cmp dword [esp + 0x14], 0
je 0x4f785b
or ebx, 2
mov edx, dword [esp + 0x30]
mov eax, dword [edi + 0xc]
test eax, eax
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x38]
cmovne ecx, eax
push edx
push dword [esp + 0x40]
lea eax, [esp + 0x4c]
push dword [esp + 0x18]
push ebx
push eax
push dword [edi + 8]
push ecx
push dword [edi + 4]
push dword [edi]
call sym.SystemInformer.exe_PhCreateProcessWin32Ex
mov edi, eax
call fcn.00520e20
test eax, eax
je 0x4f78b6
mov ecx, dword ds:[esp + 0x14]
test ecx, ecx
je 0x4f78b6
push ecx
call fcn.00520e20
mov esi, eax
mov ecx, eax
call dword [0x5a38e4]
call esi
push dword ds:[esp + 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
mov ecx, dword [esp + 0x94]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0057fcaf
mov esp, ebp
pop ebp
ret 0x14