Function at 0x408760
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push 0x44
lea eax, [esp + 0x20]
push ebp
xor esi, esi
push eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], ebp
call fcn.00462100
xor eax, eax
mov ecx, 5
add esp, 0xc
mov dword [0x48cd0c], eax
mov dword [0x48cd10], eax
mov dword [0x48cd14], eax
mov dword [0x48cd18], eax
mov word [esp + 0x4c], cx
mov dword [esp + 0x24], str.Winsta0Winlogon
mov dword [esp + 0x1c], 0x44
call fcn.004084b0
call fcn.00408290
mov eax, dword [0x4a66dc]
cmp eax, ebp
je 0x4087c8
call eax
lea eax, [esp + 0x10]
call fcn.004086b0
test eax, eax
je 0x408a03
mov edx, dword [esp + 0x10]
push ebp
push edx
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
push ebp
test eax, eax
je 0x408900
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push 0x48cd0c
lea ecx, [esp + 0x20]
push ecx
push ebp
push edx
push 0x408
push ebp
push ebp
push ebp
push 0x48cc08
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x40883f
mov dword [0x4a66e4], ebp
mov dword [esp + 0x18], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4088d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe9
jne 0x4088d6
cmp dword [0x4a66e8], 1
jne 0x4088d6
mov eax, dword [0x4a66e4]
inc eax
cmp eax, 3
mov dword [0x4a66e4], eax
jle 0x4088d6
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.winsta.dll
call edi
push str.user32.dll
mov esi, eax
call edi
xor edi, edi
mov ebx, eax
test esi, esi
je 0x408895
push str.WinStationConnectW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test ebx, ebx
je 0x4088a7
push str.LockWorkStation
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebp, eax
test edi, edi
je 0x4088c9
mov ecx, dword [0x4a66dc]
xor eax, eax
test ecx, ecx
je 0x4088b9
call ecx
push 0
push 0x47a56c
push eax
push 0
push 0
call edi
call ebp
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
xor ebp, ebp
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x4089ec
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [esp + 0x10]
push 0x48cd0c
lea ecx, [esp + 0x20]
push ecx
push ebp
push ebp
push 8
push ebp
push ebp
push ebp
push 0x48cc08
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x408957
mov dword [0x4a66e4], ebp
mov dword [esp + 0x18], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe9
jne 0x4089ec
cmp dword [0x4a66e8], 1
jne 0x4089ec
mov eax, dword [0x4a66e4]
inc eax
cmp eax, 3
mov dword [0x4a66e4], eax
jle 0x4089ec
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.winsta.dll
call edi
push str.user32.dll
mov esi, eax
call edi
xor edi, edi
mov ebx, eax
test esi, esi
je 0x4089ad
push str.WinStationConnectW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test ebx, ebx
je 0x4089bf
push str.LockWorkStation
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebp, eax
test edi, edi
je 0x4089e1
mov ecx, dword [0x4a66dc]
xor eax, eax
test ecx, ecx
je 0x4089d1
call ecx
push 0
push 0x47a56c
push eax
push 0
push 0
call edi
call ebp
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret