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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x17c
mov esi, dword [ebp + 8]
mov eax, dword [0x754040]
xor eax, ebp
mov dword [ebp - 0x10], eax
call dword [sym.imp.USER32.dll_GetShellWindow]
test eax, eax
je 0x59b378
lea ecx, [ebp - 0x14]
mov dword [ecx], 0
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x59b378
lea edi, [ebp - 0x18]
mov dword [edi], 0xffffffff
xor ebx, ebx
push dword [ebp - 0x14]
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [edi], ebx
mov ecx, edi
push eax
call fcn.004f2080
mov eax, dword [edi]
inc eax
cmp eax, 1
ja 0x59b3b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
cmovne eax, ecx
mov dword [esi], eax
mov dword [esi + 4], 2
mov eax, dword [ebp - 0x18]
inc eax
cmp eax, 2
jb 0x59b39d
call fcn.005080f0
push dword [ebp - 0x18]
call fcn.004f9550
add esp, 4
jmp 0x59b39d
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
cmovne eax, ecx
mov dword [esi], eax
mov dword [esi + 4], 2
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00550b46
mov eax, esi
add esp, 0x17c
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x28], 0x6c99d4
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebp - 0x188]
mov dword [edi], 0xffffffff
push edi
push 0x2000000
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x59b462
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
cmovne eax, ecx
mov dword [esi], eax
mov dword [esi + 4], 2
mov dword [ebp - 0x28], 0x6c99d4
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x59b433
test eax, eax
je 0x59b45e
push ecx
push eax
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], 0
test eax, eax
je 0x59b445
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x59b35d
push eax
call fcn.0054fc10
add esp, 4
jmp 0x59b35d
xor eax, eax
jmp 0x59b42c
lea ebx, [ebp - 0x28]
mov ecx, ebx
call fcn.0059f290
mov eax, dword [ebp - 0x188]
mov dword [ebx + 4], eax
mov ecx, ebx
lea eax, [ebp - 0x60]
mov dword [eax + 0x34], 0xffffffff
mov dword [eax - 4], 0x6c99c0
xor ebx, ebx
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax + 8], 0x11
mov dword [eax + 0x2c], ebx
movaps xmm0, xmmword [0x6d78b0]
movups xmmword [eax + 0xc], xmm0
movaps xmm0, xmmword [0x6d78c0]
movups xmmword [eax + 0x1c], xmm0
mov dword [eax + 0x30], ebx
mov byte [eax + 0x34], 1
lea eax, [ebp - 0x64]
push ebx
push eax
push str.SeImpersonatePrivilege
call fcn.0059b900
test al, al
je 0x59b5a9
mov dword [ebp - 0x74], 0x6c99d4
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x59b4ea
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x188], 0xffffffff
push edi
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x59b5d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
cmovne eax, ecx
mov dword [esi], eax
mov dword [esi + 4], 2
lea edi, [ebp - 0x60]
mov dword [ebp - 0x74], 0x6c99d4
mov eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x6c]
test ecx, ecx
je 0x59b559
xor edx, edx
test eax, eax
je 0x59b550
push ecx
push eax
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x6c], 0
mov eax, edx
test eax, eax
je 0x59b56b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x70], 0
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x59b57b
push eax
call fcn.0054fc10
add esp, 4
xor eax, eax
lea ecx, [ebp - 0x28]
push eax
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.0059f930
mov dword [ebp - 0x64], 0x6c99c0
push dword [ebp - 0x30]
call fcn.00495590
add esp, 4
mov ecx, edi
call fcn.0059fd20
jmp 0x59b40c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
cmovne eax, ecx
mov dword [esi], eax
mov dword [esi + 4], 2
lea edi, [ebp - 0x60]
jmp 0x59b58b
lea ebx, [ebp - 0x74]
mov ecx, ebx
call fcn.0059f290
mov eax, dword [ebp - 0x188]
mov dword [ebx + 4], eax
mov dword [ebp - 0x84], 0x6c99d4
xor ebx, ebx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x188], 0xffffffff
sub esp, 0x18
mov dword [esp + 0x14], edi
movaps xmm0, xmmword [0x6d78d0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x59b6aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
cmovne eax, ecx
mov dword [esi], eax
mov dword [esi + 4], 2
lea edi, [ebp - 0x60]
mov dword [ebp - 0x84], 0x6c99d4
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x7c]
test ecx, ecx
je 0x59b67f
xor edx, edx
test eax, eax
je 0x59b676
push ecx
push eax
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
mov edx, dword [ebp - 0x80]
mov dword [ebp - 0x7c], 0
mov eax, edx
test eax, eax
je 0x59b691
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x80], 0
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x59b52e
push eax
call fcn.0054fc10
add esp, 4
jmp 0x59b52e
lea ecx, [ebp - 0x84]
call fcn.0059f290
mov eax, dword [ebp - 0x188]
lea ecx, [ebp - 0x84]
mov dword [ecx + 4], eax
mov dword [ebp - 0x88], ebx
xorps xmm0, xmm0
movups xmmword [ebp - 0x98], xmm0
movups xmmword [ebp - 0xa8], xmm0
movups xmmword [ebp - 0xb8], xmm0
movups xmmword [ebp - 0xc8], xmm0
movups xmmword [ebp - 0xd8], xmm0
mov ecx, dword [ebp + 0xc]
push edi
call fcn.00494260
cmp byte [ebp - 0x17d], 0
jns 0x59b708
mov edi, dword [ebp - 0x188]
lea ebx, [ebp - 0xe4]
mov ecx, dword [ebp + 0xc]
push ebx
call fcn.004930c0
cmp byte [ebx + 0xb], 0
jns 0x59b723
mov ebx, dword [ebp - 0xe4]
lea ecx, [ebp - 0xd8]
lea edx, [ebp - 0xc8]
push ecx
push edx
xor ecx, ecx
push ecx
push ecx
push ecx
push edi
push ebx
push ecx
push dword [ebp - 0x80]
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
mov ebx, eax
lea ecx, [ebp - 0xe4]
call fcn.00508510
cmp byte [ebp - 0x17d], 0
jns 0x59b766
push dword [ebp - 0x188]
call fcn.0054fc10
add esp, 4
test ebx, ebx
lea edi, [ebp - 0x60]
jne 0x59b797
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
cmovne eax, ecx
mov dword [esi], eax
mov dword [esi + 4], 2
jmp 0x59b651
push dword [ebp - 0xd4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
dec eax
lea ebx, [ebp - 0xe4]
mov dword [ebx + 4], eax
mov dword [ebx], eax
mov ecx, ebx
push dword [ebp - 0xd8]
call fcn.00484970
mov ecx, ebx
call fcn.00484c60
mov dword [ebp - 0x14], eax
push 0x26
push 0x6d791c
call fcn.00507a00
add esp, 8
test eax, eax
jle 0x59b82b
lea ebx, [ebp - 0x188]
mov ecx, ebx
push 0xffffffffffffffff
push 0x27a
push 0x6d791c
call fcn.004904a0
lea eax, [ebp - 0x180]
push 0xd
push str.RunDeElevated
push eax
call fcn.004e58e0
add esp, 0xc
push 0x18
push str.:_Started_process__PID:
push eax
call fcn.004e58e0
add esp, 0xc
mov ecx, eax
push dword [ebp - 0x14]
call fcn.004114c0
mov ecx, ebx
call fcn.00490980
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
test eax, eax
jne 0x59b897
push 0x26
push 0x6d791c
call fcn.00507a00
add esp, 8
test eax, eax
jle 0x59b897
call fcn.005ccb70
lea ebx, [ebp - 0x188]
mov ecx, ebx
push eax
push 0xffffffffffffffff
push 0x27e
push 0x6d791c
call fcn.005ccd20
lea eax, [ebp - 0x180]
push 0xd
push str.RunDeElevated
push eax
call fcn.004e58e0
add esp, 0xc
push 0x23
push str.:_::AllowSetForegroundWindow_failed
push eax
call fcn.004e58e0
add esp, 0xc
mov ecx, ebx
call fcn.005ccd80
lea eax, [ebp - 0x188]
mov dword [eax], 0
lea ecx, [ebp - 0xe4]
push eax
call fcn.005c8bd0
test al, al
je 0x59b8be
xor ecx, ecx
inc ecx
mov eax, dword [ebp - 0x188]
jmp 0x59b8df
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, 0x80004005
cmovne eax, ecx
mov ecx, 2
mov dword [esi], eax
mov dword [esi + 4], ecx
lea ecx, [ebp - 0xe4]
call fcn.004fa820
jmp 0x59b651