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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
xor ebx, ebx
push 0x20
pop esi
push esi
mov edi, eax
lea eax, [ebp - 0x58]
push ebx
push eax
mov byte [ebp - 2], bl
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
call fcn.00456fd0
add esp, 0xc
test byte [ebp + 0x10], 1
mov dword [ebp - 0x58], esi
mov dword [ebp - 0x50], edi
mov byte [ebp - 1], bl
je 0x4023bf
mov byte [ebp - 1], 1
mov esi, dword [ebp + 0x10]
push 0
pop eax
and esi, 2
setne al
lea ecx, [ebp - 8]
push ecx
push ebx
add eax, 2
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push edi
call dword [sym.imp.ADVAPI32.dll_LogonUserW]
test eax, eax
je 0x40259d
cmp esi, ebx
je 0x402417
lea eax, [ebp + 0xc]
push eax
push 1
push 2
push ebx
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x40259d
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
push 0x60000
push ebx
push str.winsta0
call dword [sym.imp.USER32.dll_OpenWindowStationW]
mov esi, eax
mov dword [ebp - 0x18], esi
cmp esi, ebx
je 0x40259d
cmp esi, 0xffffffff
je 0x40259d
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
push esi
mov dword [ebp - 0x20], eax
call dword [sym.imp.USER32.dll_SetProcessWindowStation]
test eax, eax
je 0x40259d
push 0x60081
push ebx
push ebx
push str.default
call dword [sym.imp.USER32.dll_OpenDesktopW]
mov edi, eax
mov dword [ebp - 0x1c], edi
cmp edi, ebx
je 0x40259d
cmp edi, 0xffffffff
je 0x40259d
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
call fcn.00402748
test al, al
je 0x40259d
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0xc]
mov word [ebp - 0x38], 0xb00
push esi
mov dword [ebp - 0x34], 0xf0000000
mov word [ebp - 0x2c], 0x400
mov dword [ebp - 0x28], 0xf037f
call fcn.004028d2
test al, al
je 0x40259d
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
mov word [ebp - 0x2c], bx
push edi
mov dword [ebp - 0x28], 0xf01ff
call fcn.00402add
test al, al
je 0x40259d
mov edi, dword [ebp + 0x20]
mov esi, dword [edi + 0x2c]
and esi, 0x100
mov dword [edi + 8], str.winsta0default
cmp dword [ebp + 0x14], ebx
je 0x40252d
push dword [ebp + 0x14]
call fcn.00455251
lea edi, [eax + 1]
xor ecx, ecx
push 2
pop edx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00455667
push edi
push dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
push eax
call fcn.0045704a
mov edi, dword [ebp + 0x20]
add esp, 0x14
cmp byte [ebp - 1], bl
je 0x402543
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 8]
call dword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x40259d
test byte [ebp + 0x10], 4
jne 0x40255b
push ebx
push dword [ebp - 8]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x40259d
push dword [ebp + 0x24]
mov eax, dword [ebp + 0x18]
push edi
push dword [ebp + 0x1c]
or eax, 0x400
push dword [ebp - 0x14]
push eax
push esi
push ebx
push ebx
push dword [ebp - 0x10]
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x40259d
cmp byte [ebp - 1], bl
je 0x402597
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 0x24]
call fcn.0040281c
mov byte [ebp - 2], 1
jmp 0x4025ae
cmp dword [ebp - 0x3c], ebx
je 0x4025ae
push dword [ebp - 0x3c]
push dword [ebp - 8]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
push dword [ebp - 0xc]
call fcn.00402ce8
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.USER32.dll_CloseWindowStation]
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_CloseDesktop]
push dword [ebp - 0x20]
call dword [sym.imp.USER32.dll_SetProcessWindowStation]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call fcn.0045526c
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov al, byte [ebp - 2]
pop edi
pop esi
pop ebx
leave
ret 0x20