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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
mov eax, dword [0x62f040]
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.005826f0
mov edx, ebx
mov byte [esp + 0x1c], 0
and edx, 0x3000
add esp, 0xc
cmp edx, 0x3000
jne 0x4f784b
mov eax, 0xc00000f0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0058078f
mov esp, ebp
pop ebp
ret 0x14
cmp dword [edi], 0
jne 0x4f7872
cmp dword [edi + 4], 0
jne 0x4f7872
mov eax, 0xc0000030
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0058078f
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 0x4f7abf
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 0x4f78ee
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 0x4f78fe
cmp eax, 2
jne 0x4f7abf
mov edi, edi
test dl, dl
je 0x4f7abf
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 0x4f792c
mov dword [edi + 0x28], 1
mov eax, dword [edi + 4]
test eax, eax
je 0x4f793d
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 0x4f79b6
mov eax, dword [ebx + 4]
jmp 0x4f79b8
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 0x4f79e8
xor esi, esi
jmp 0x4f7a0e
cmp dword [0x62fbb0], 0xffffffff
jae 0x4f79fc
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
jmp 0x4f7a06
lea esp, [esp]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.SystemInformer.exe_PhDosErrorToNtStatus
mov esi, eax
test ebx, ebx
je 0x4f7a28
lea ecx, ds:[ebx - 8]
or edx, 0xffffffff
lock xadd dword [ecx + 4], edx
dec edx
jne 0x4f7a28
call fcn.004fc420
test esi, esi
js 0x4f7a83
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x4f7a41
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 0x4f7a51
mov dword [edx], eax
jmp 0x4f7a5c
test eax, eax
je 0x4f7a5c
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
test edx, edx
je 0x4f7a96
mov dword [edx], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0058078f
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4f7a92
push eax
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4f7aa6
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.0058078f
mov esp, ebp
pop ebp
ret 0x14
nop
test ebx, 0x1000
je 0x4f7b96
push dword [edi + 0x18]
lea eax, [esp + 0x14]
push 0x1000
push eax
call sym.SystemInformer.exe_PhOpenProcess
mov edi, edi
test eax, eax
jns 0x4f7afe
lfence
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0058078f
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [0x637e88]
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 0x4f7b53
cmp dword [esp + 0x88], 5
jne 0x4f7b53
mov ecx, dword [esp + 0x8c]
lea eax, [esp + 0xc]
push eax
mov edx, 0xf01ff
call fcn.00524b00
mov esi, eax
push dword [esp + 0x10]
call dword [sym.imp.ntdll.dll_NtClose]
lea ecx, [ecx]
test esi, esi
jns 0x4f7b83
lfence
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.0058078f
mov esp, ebp
pop ebp
ret 0x14
mov eax, ebx
shr eax, 0x11
and eax, 0xffffff01
mov dword [esp + 0x10], eax
jmp 0x4f7cfa
jmp 0x4f7ba0
test ebx, 0x2000
je 0x4f7c46
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 0x4f7c2e
cmp dword [0x62fbb0], 0xffffffff
jae 0x4f7c0b
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.0058078f
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.0058078f
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 0x4f7cfa
mov esi, dword [edi + 0x24]
test esi, esi
jne 0x4f7cdb
mov ecx, dword ds:[edi + 0x18]
mov esi, 2
mov al, byte [ecx]
xor al, 0xe
test al, 0x1f
jne 0x4f7cdb
push str.NT_AUTHORITY
push ecx
call fcn.0058423e
add esp, 8
test eax, eax
jne 0x4f7cdb
mov ecx, dword ds:[edi + 0x1c]
mov al, byte [ecx]
xor al, 0xf3
test al, 0x1f
jne 0x4f7c96
push str.SYSTEM
push ecx
call fcn.0058423e
add esp, 8
test eax, eax
je 0x4f7cd6
mov ecx, dword ds:[edi + 0x1c]
mov al, byte [ecx]
xor al, 0xc
test al, 0x1f
jne 0x4f7cb9
push str.LOCAL_SERVICE
push ecx
call fcn.0058423e
add esp, 8
test eax, eax
je 0x4f7cd6
mov ecx, dword [edi + 0x1c]
mov al, byte ds:[ecx]
xor al, 0xe
test al, 0x1f
jne 0x4f7cdb
push str.NETWORK_SERVICE
push ecx
call fcn.0058423e
add esp, 8
test eax, eax
jne 0x4f7cdb
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 0x4f7bda
lea ebx, [ebx]
test ebx, 0x10000
je 0x4f7d76
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 0x4f7d76
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 0x4f7d6f
cmp dword [esp + 0x8c], 1
jne 0x4f7d6f
push dword ds:[esp + 0xc]
call dword [sym.imp.ntdll.dll_NtClose]
mov dword [esp + 0xc], esi
jmp 0x4f7df9
push esi
call dword [sym.imp.ntdll.dll_NtClose]
cmp byte ds:[esp + 0x10], 0
je 0x4f7df9
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 0x4f7b64
mov eax, dword [esp + 0x88]
mov dword [esp + 0xc], eax
lea esp, [esp]
test ebx, 0x20000
je 0x4f7e54
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 0x4f7e54
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.0058078f
mov esp, ebp
pop ebp
ret 0x14
test ebx, 0x80000
je 0x4f7e84
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 0x4f7e2e
cmp dword [edi + 0xc], 0
jne 0x4f7ebb
call fcn.00521b00
test eax, eax
je 0x4f7ebb
push 0
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
call fcn.00521b00
mov esi, eax
mov ecx, eax
call dword [0x5a48f4]
call esi
cmp dword [esp + 0x14], 0
je 0x4f7ebb
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.00521c20
test eax, eax
je 0x4f7f16
mov ecx, dword ds:[esp + 0x14]
test ecx, ecx
je 0x4f7f16
push ecx
call fcn.00521c20
mov esi, eax
mov ecx, eax
call dword [0x5a48f4]
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.0058078f
mov esp, ebp
pop ebp
ret 0x14