Function at 0x410140
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
xor ebx, ebx
push 0x44
mov esi, eax
lea eax, [ebp - 0x58]
push ebx
xor edi, edi
push eax
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], ebx
call fcn.004b2d10
xor eax, eax
mov ecx, 5
add esp, 0xc
mov dword [0x4ef1f8], eax
mov dword [0x4ef1fc], eax
mov dword [0x4ef200], eax
mov dword [0x4ef204], eax
mov word [ebp - 0x28], cx
mov dword [ebp - 0x50], str.Winsta0Winlogon
mov dword [ebp - 0x58], 0x44
call fcn.0040fdb0
call fcn.0040fb80
mov eax, dword [0x54489c]
cmp eax, ebx
je 0x4101a6
call eax
lea eax, [ebp - 4]
call fcn.00410080
cmp eax, ebx
je 0x410447
mov edx, dword [ebp - 4]
push ebx
push edx
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
push ebx
test eax, eax
je 0x410309
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
push 0x4ef1f8
lea ecx, [ebp - 0x58]
push ecx
push ebx
push edx
push 0x408
push ebx
push ebx
push ebx
push 0x4eecd8
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x410216
mov dword [0x544720], ebx
mov dword [ebp - 8], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4102e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe9
jne 0x4102e3
mov edi, 1
cmp dword [0x544724], edi
jne 0x4102c5
mov eax, dword [0x544720]
add eax, edi
mov dword [0x544720], eax
cmp eax, 3
jle 0x4102e3
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.winsta.dll
call edi
push str.user32.dll
mov esi, eax
call edi
mov edi, eax
mov dword [ebp - 0x10], ebx
test esi, esi
je 0x41027b
push str.WinStationConnectW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test edi, edi
je 0x41028d
push str.LockWorkStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
cmp dword [ebp - 0x10], 0
je 0x4102b6
test ebx, ebx
je 0x4102b6
mov ecx, dword [0x54489c]
xor eax, eax
test ecx, ecx
je 0x4102a5
call ecx
push 0
push 0x4d6794
push eax
push 0
push 0
call dword [ebp - 0x10]
call ebx
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
xor ebx, ebx
jmp 0x4102e3
mov ecx, dword [ebp - 4]
push 0x408
push ecx
mov ecx, dword [ebp - 0xc]
push esi
call fcn.0040f6b0
add esp, 0xc
mov dword [0x544720], ebx
mov dword [ebp - 8], edi
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x410433
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 4]
push 0x4ef1f8
lea edx, [ebp - 0x58]
push edx
push ebx
push ebx
push 8
push ebx
push ebx
push ebx
push 0x4eecd8
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x41035a
mov dword [0x544720], ebx
mov dword [ebp - 8], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe9
jne 0x410433
mov edi, 1
cmp dword [0x544724], edi
jne 0x410419
mov eax, dword [0x544720]
add eax, edi
mov dword [0x544720], eax
cmp eax, 3
jle 0x410433
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.winsta.dll
call edi
push str.user32.dll
mov esi, eax
call edi
mov edi, eax
mov dword [ebp - 0x10], ebx
test esi, esi
je 0x4103bf
push str.WinStationConnectW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test edi, edi
je 0x4103d1
push str.LockWorkStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
cmp dword [ebp - 0x10], 0
je 0x4103fa
test ebx, ebx
je 0x4103fa
mov ecx, dword [0x54489c]
xor eax, eax
test ecx, ecx
je 0x4103e9
call ecx
push 0
push 0x4d6794
push eax
push 0
push 0
call dword [ebp - 0x10]
call ebx
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push 8
push ecx
push esi
xor ecx, ecx
call fcn.0040f6b0
add esp, 0xc
mov dword [0x544720], ebx
mov dword [ebp - 8], edi
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret