Function at 0x401489
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x484
mov eax, dword [0x417008]
xor eax, esp
mov dword [esp + 0x480], eax
push ebx
push esi
push edi
lea eax, [esp + 0xc]
mov dword [esp + 0x14], ecx
push eax
xor ebx, ebx
push 0x28
mov dword [0x41917c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x20]
push eax
push str.SeTcbPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x4014ef
lea eax, [esp + 0x20]
xor edx, edx
push eax
inc edx
mov ecx, esi
call fcn.004013df
pop ecx
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
lea edi, [esp + 0x28]
stosd dword es:[edi], eax
push 0x44
pop esi
push esi
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x40]
push eax
call fcn.00406cb0
mov dword [esp + 0x44], esi
lea edi, [esp + 0x394]
mov esi, str.winsta0Default
mov dword [esp + 0x4c], ebx
add esp, 0xc
lea ecx, [esp + 0x80]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00401345
call fcn.004011d5
lea edi, [esp + 0x80]
dec edi
test eax, eax
je 0x40155d
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40154a
mov esi, 0x4155b0
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x40156e
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40155d
mov esi, 0x4155c0
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x388]
push 0xa
push ecx
push eax
mov dword [esp + 0x2c], eax
call fcn.0040f9aa
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0xc]
mov dword [esp + 0x14], eax
push ecx
push 0x1ab
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x18]
push eax
push str.SeTcbPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x4015cd
lea eax, [esp + 0x18]
xor edx, edx
push eax
inc edx
mov ecx, esi
call fcn.004013df
pop ecx
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push ecx
push 1
push 2
push ebx
push ebx
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
push 4
lea eax, [esp + 0x24]
push eax
push 0xc
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push 0x22
pop eax
lea edx, [esp + 0x80]
mov word [esp + 0x180], ax
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x40160e
lea edi, [esp + 0x180]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40161f
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x180]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40163d
mov ax, word [0x4155d0]
mov word [edi], ax
lea edi, [esp + 0x180]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401656
lea eax, [esp + 0x28]
mov esi, str._START
push eax
lea eax, [esp + 0x3c]
push eax
push ebx
push ebx
push 0x20
push ebx
push ebx
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x19c]
push ebx
push eax
push ebx
push dword [esp + 0x38]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4016a1
push dword [esp + 0x28]
call esi
push dword [esp + 0x2c]
call esi
push dword [esp + 0x10]
call esi
push dword [esp + 0x14]
call esi
push dword [esp + 0xc]
call esi
lea eax, [esp + 0xc]
mov dword [esp + 0xc], ebx
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov edi, dword [esp + 0xc]
test edi, edi
je 0x401712
lea eax, [esp + 0x18]
push eax
push str.SeTcbPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x401701
lea eax, [esp + 0x18]
xor edx, edx
push eax
mov ecx, edi
call fcn.004013df
pop ecx
test eax, eax
je 0x401701
mov ebx, dword [esp + 0xc]
jmp 0x40170b
push dword [esp + 0xc]
call esi
mov dword [esp + 0xc], ebx
test ebx, ebx
je 0x401712
push ebx
call esi
push 0xffffffffffffffff
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetProcessWorkingSetSize]
mov ecx, dword [esp + 0x48c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004021da
mov esp, ebp
pop ebp
ret