Function at 0x4221a0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
xor edi, edi
lea eax, [ebp - 0x58]
push 0x44
push edi
push eax
mov esi, ecx
mov dword [ebp - 8], edi
call fcn.004b67a0
add esp, 0xc
mov dword [ebp - 0x50], str.Winsta0Winlogon
xorps xmm0, xmm0
mov dword [ebp - 0x58], 0x44
mov eax, 5
movdqu xmmword [0x4f8fb8], xmm0
mov word [ebp - 0x28], ax
call fcn.00421e00
call fcn.00421bc0
mov eax, dword [0x503bcc]
test eax, eax
je 0x4221f6
call eax
lea ecx, [ebp - 4]
call fcn.004220e0
test eax, eax
je 0x4224a1
push 0
push dword [ebp - 4]
lea eax, [ebp - 8]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
push 0
test eax, eax
je 0x422363
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x4f8fb8
lea eax, [ebp - 0x58]
push eax
push 0
push dword [ebp - 8]
push 0x408
push 0
push 0
push 0
push 0x5041d0
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x422268
mov dword [0x4f8b7c], edi
mov edi, 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x42233f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe9
jne 0x42233f
cmp dword [0x4f8b48], 1
jne 0x422319
mov eax, dword [0x4f8b7c]
inc eax
mov dword [0x4f8b7c], eax
cmp eax, 3
jle 0x42233f
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.winsta.dll
call esi
push str.user32.dll
mov dword [ebp - 0xc], eax
call esi
mov edx, dword [ebp - 0xc]
xor ebx, ebx
mov ecx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor esi, esi
mov dword [ebp - 0x10], eax
test edx, edx
je 0x4222d8
push str.WinStationConnectW
push edx
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4222e6
push str.LockWorkStation
push eax
call ecx
mov esi, eax
test ebx, ebx
je 0x42230c
test esi, esi
je 0x42230c
mov ecx, dword [0x503bcc]
xor eax, eax
test ecx, ecx
je 0x4222fc
call ecx
push 0
push 0x4e15ac
push eax
push 0
push 0
call ebx
call esi
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x42233f
sub esp, 0xc
mov ecx, esi
push dword [ebp - 8]
push 0x408
sub esp, 0x14
push dword [ebp - 4]
call fcn.00421690
mov dword [0x4f8b7c], edi
add esp, 0x2c
mov edi, 1
mov eax, dword [ebp - 8]
test eax, eax
je 0x422498
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x4f8fb8
lea eax, [ebp - 0x58]
push eax
push 0
push 0
push 8
push 0
push 0
push 0
push 0x5041d0
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x4223b5
mov dword [0x4f8b7c], edi
mov edi, 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe9
jne 0x422498
cmp dword [0x4f8b48], 1
jne 0x422476
mov eax, dword [0x4f8b7c]
inc eax
mov dword [0x4f8b7c], eax
cmp eax, 3
jle 0x422498
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.winsta.dll
call esi
push str.user32.dll
mov dword [ebp - 0x10], eax
call esi
mov edx, dword [ebp - 0x10]
xor ebx, ebx
mov ecx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor esi, esi
mov dword [ebp - 0xc], eax
test edx, edx
je 0x422425
push str.WinStationConnectW
push edx
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x422433
push str.LockWorkStation
push eax
call ecx
mov esi, eax
test ebx, ebx
je 0x422459
test esi, esi
je 0x422459
mov ecx, dword [0x503bcc]
xor eax, eax
test ecx, ecx
je 0x422449
call ecx
push 0
push 0x4e15ac
push eax
push 0
push 0
call ebx
call esi
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
sub esp, 0xc
mov ecx, esi
push 0
push 8
sub esp, 0x14
push dword [ebp - 4]
call fcn.00421690
mov dword [0x4f8b7c], edi
add esp, 0x2c
mov edi, 1
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret