Function at 0x4f71e0
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.00580ff0
mov edx, ebx
mov byte [esp + 0x1c], 0
and edx, 0x3000
add esp, 0xc
cmp edx, 0x3000
jne 0x4f726b
mov eax, 0xc00000f0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057ee0f
mov esp, ebp
pop ebp
ret 0x14
cmp dword [edi], 0
jne 0x4f7292
cmp dword [edi + 4], 0
jne 0x4f7292
mov eax, 0xc0000030
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057ee0f
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 0x4f74df
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 0x4f730e
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 0x4f731e
cmp eax, 2
jne 0x4f74df
mov edi, edi
test dl, dl
je 0x4f74df
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
cmp dword [edi + 0x28], eax
jne 0x4f734c
mov dword [edi + 0x28], 1
mov eax, dword [edi + 4]
test eax, eax
je 0x4f735d
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 0x4f73d6
mov eax, dword [ebx + 4]
jmp 0x4f73d8
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 dword [edi + 0x28]
push dword [edi + 0x20]
push dword [edi + 0x18]
push dword [edi + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithLogonW]
mov edi, edi
test eax, eax
je 0x4f7408
xor esi, esi
jmp 0x4f742e
cmp dword [0x62dbb0], 0xffffffff
jae 0x4f741c
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x4f7426
lea esp, [esp]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
test ebx, ebx
je 0x4f7448
lea ecx, ds:[ebx - 8]
or edx, 0xffffffff
lock xadd dword [ecx + 4], edx
dec edx
jne 0x4f7448
call fcn.004fbe40
test esi, esi
js 0x4f74a3
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x4f7461
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 0x4f7471
mov dword [edx], eax
jmp 0x4f747c
test eax, eax
je 0x4f747c
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
test edx, edx
je 0x4f74b6
mov dword [edx], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057ee0f
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4f74b2
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4f74c6
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.0057ee0f
mov esp, ebp
pop ebp
ret 0x14
nop
test ebx, 0x1000
je 0x4f75b6
push dword [edi + 0x18]
lea eax, [esp + 0x14]
push 0x1000
push eax
call sym.SystemInformer.exe_PhOpenProcess
mov edi, edi
test eax, eax
jns 0x4f751e
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057ee0f
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [0x635f50]
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 0x4f7573
cmp dword [esp + 0x88], 5
jne 0x4f7573
mov ecx, dword [esp + 0x8c]
lea eax, [esp + 0xc]
push eax
mov edx, 0xf01ff
call fcn.00523b40
mov esi, eax
push dword [esp + 0x10]
call dword [sym.imp.ntdll.dll_NtClose]
lea ecx, [ecx]
test esi, esi
jns 0x4f75a3
lfence
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057ee0f
mov esp, ebp
pop ebp
ret 0x14
mov eax, ebx
shr eax, 0x11
and eax, 0xffffff01
mov dword [esp + 0x10], eax
jmp 0x4f771a
jmp 0x4f75c0
test ebx, 0x2000
je 0x4f7666
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 0x4f764e
cmp dword [0x62dbb0], 0xffffffff
jae 0x4f762b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0057ee0f
mov esp, ebp
pop ebp
ret 0x14
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.0057ee0f
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 0x4f771a
mov esi, dword [edi + 0x24]
test esi, esi
jne 0x4f76fb
mov ecx, dword ds:[edi + 0x18]
mov esi, 2
mov al, byte [ecx]
xor al, 0xe
test al, 0x1f
jne 0x4f76fb
push str.NT_AUTHORITY
push ecx
call fcn.00582b3e
add esp, 8
test eax, eax
jne 0x4f76fb
mov ecx, dword ds:[edi + 0x1c]
mov al, byte [ecx]
xor al, 0xf3
test al, 0x1f
jne 0x4f76b6
push str.SYSTEM
push ecx
call fcn.00582b3e
add esp, 8
test eax, eax
je 0x4f76f6
mov ecx, dword ds:[edi + 0x1c]
mov al, byte [ecx]
xor al, 0xc
test al, 0x1f
jne 0x4f76d9
push str.LOCAL_SERVICE
push ecx
call fcn.00582b3e
add esp, 8
test eax, eax
je 0x4f76f6
mov ecx, dword [edi + 0x1c]
mov al, byte ds:[ecx]
xor al, 0xe
test al, 0x1f
jne 0x4f76fb
push str.NETWORK_SERVICE
push ecx
call fcn.00582b3e
add esp, 8
test eax, eax
jne 0x4f76fb
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 0x4f75fa
lea ebx, [ebx]
test ebx, 0x10000
je 0x4f7796
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 0x4f7796
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 0x4f778f
cmp dword [esp + 0x8c], 1
jne 0x4f778f
push dword ds:[esp + 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
mov dword [esp + 0xc], esi
jmp 0x4f7819
push esi
call dword [sym.imp.ntdll.dll_NtClose]
cmp byte ds:[esp + 0x10], 0
je 0x4f7819
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 0x4f7584
mov eax, dword [esp + 0x88]
mov dword [esp + 0xc], eax
lea esp, [esp]
test ebx, 0x20000
je 0x4f7874
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 0x4f7874
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.0057ee0f
mov esp, ebp
pop ebp
ret 0x14
test ebx, 0x80000
je 0x4f78a4
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 0x4f784e
cmp dword [edi + 0xc], 0
jne 0x4f78db
call fcn.00520b20
test eax, eax
je 0x4f78db
push 0
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
call fcn.00520b20
mov esi, eax
mov ecx, eax
call dword [0x5a28f0]
call esi
cmp dword [esp + 0x14], 0
je 0x4f78db
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.00520c40
test eax, eax
je 0x4f7936
mov ecx, dword ds:[esp + 0x14]
test ecx, ecx
je 0x4f7936
push ecx
call fcn.00520c40
mov esi, eax
mov ecx, eax
call dword [0x5a28f0]
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.0057ee0f
mov esp, ebp
pop ebp
ret 0x14