Function at 0x407330
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x525e48
mov eax, dword fs:[0]
push eax
sub esp, 0x348
mov eax, dword [0x57f540]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov esi, ecx
lea ecx, [ebp - 0x2e8]
push ecx
push 0x8b
mov edi, edx
mov dword [ebp - 0x2fc], eax
mov dword [ebp - 0x2e8], ebx
mov dword [ebp - 0x2e4], ebx
mov dword [ebp - 0x21c], ebx
mov word [ebp - 0x218], 0x1000
mov dword [ebp - 0x2ec], ebx
mov dword [ebp - 0x2f8], ebx
mov dword [ebp - 0x2f4], ebx
mov dword [ebp - 0x2f0], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x407588
mov eax, dword [ebp - 0x2e8]
lea edx, [ebp - 0x2e4]
push edx
push 1
push 2
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x407588
lea ecx, [ebp - 0x2ec]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x1000
push 1
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x407588
mov eax, dword [ebp - 0x2ec]
push eax
mov dword [ebp - 0x2f4], 0x20
mov dword [ebp - 0x2f8], eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, dword [ebp - 0x2e4]
add eax, 8
push eax
lea eax, [ebp - 0x2f8]
push eax
push 0x19
push ecx
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x407588
push 0x44
lea edx, [ebp - 0x354]
push ebx
push edx
call fcn.00501560
add esp, 0xc
mov eax, esi
lea ecx, [ebp - 0x2c4]
mov dword [ebp - 0x354], 0x44
mov dword [ebp - 0x30c], ebx
mov dword [ebp - 0x308], ebx
mov dword [ebp - 0x304], ebx
mov dword [ebp - 0x300], ebx
call fcn.00401460
push eax
mov edx, 0x55f18c
lea eax, [ebp - 0x2e0]
mov dword [ebp - 4], ebx
call fcn.00409360
push eax
mov eax, 0x55f18c
lea ecx, [ebp - 0x2a8]
mov byte [ebp - 4], 1
call fcn.004093b0
add esp, 8
lea esi, [ebp - 0x2e0]
call fcn.004014a0
lea esi, [ebp - 0x2c4]
mov byte [ebp - 4], 4
call fcn.004014a0
mov eax, edi
lea ecx, [ebp - 0x238]
call fcn.00401460
push eax
mov edx, 0x55f190
lea eax, [ebp - 0x254]
mov byte [ebp - 4], 5
call fcn.00409360
add esp, 4
push ebx
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x2a8]
mov byte [ebp - 4], 6
call fcn.00408ec0
lea esi, [ebp - 0x254]
call fcn.004014a0
lea esi, [ebp - 0x238]
call fcn.004014a0
cmp dword [ebp - 0x294], 8
mov eax, dword [ebp - 0x2a8]
jae 0x407537
lea eax, [ebp - 0x2a8]
lea ecx, [ebp - 0x30c]
push ecx
lea edx, [ebp - 0x354]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
mov eax, dword [ebp - 0x2e4]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x407576
mov ecx, dword [ebp - 0x30c]
mov edx, dword [ebp - 0x2fc]
mov dword [ebp - 0x2f0], 1
mov dword [edx], ecx
lea esi, [ebp - 0x2a8]
mov dword [ebp - 4], 0xffffffff
call fcn.004014a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1fc
mov esi, eax
lea eax, [ebp - 0x210]
push ebx
push eax
mov dword [ebp - 0x214], 0x3f
call fcn.00501560
add esp, 0xc
cmp esi, ebx
je 0x4076fc
push ebx
push 0x100
lea ecx, [ebp - 0x214]
push ecx
push 0x400
push esi
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
xor edx, edx
mov edi, 7
lea eax, [ebp - 0x214]
mov word [ebp - 0x270], dx
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x260], ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x407600
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x214]
lea esi, [ebp - 0x270]
call fcn.004017b0
mov eax, esi
push eax
lea ecx, [ebp - 0x254]
mov dword [ebp - 4], edi
call fcn.004067b0
push eax
mov eax, str.Error:
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 8
call fcn.00409400
push eax
mov eax, 0x55f194
lea ecx, [ebp - 0x28c]
mov byte [ebp - 4], 9
call fcn.00402230
mov esi, 0x10
add esp, 0xc
cmp dword [ebp - 0x278], esi
jb 0x40767b
mov ecx, dword [ebp - 0x28c]
push ecx
call fcn.0040ba88
add esp, 4
mov edi, 0xf
mov dword [ebp - 0x278], edi
mov dword [ebp - 0x27c], ebx
mov byte [ebp - 0x28c], bl
cmp dword [ebp - 0x224], esi
jb 0x4076a9
mov edx, dword [ebp - 0x238]
push edx
call fcn.0040ba88
add esp, 4
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], bl
cmp dword [ebp - 0x240], esi
jb 0x4076d2
mov eax, dword [ebp - 0x254]
push eax
call fcn.0040ba88
add esp, 4
cmp dword [ebp - 0x25c], 8
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x244], ebx
mov byte [ebp - 0x254], bl
jb 0x4076fc
mov ecx, dword [ebp - 0x270]
push ecx
call fcn.0040ba88
add esp, 4
mov edx, dword [ebp - 0x308]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [ebp - 0x2e8]
cmp eax, ebx
je 0x40771e
push eax
call esi
mov dword [ebp - 0x2e8], ebx
mov eax, dword [ebp - 0x2e4]
cmp eax, ebx
je 0x407731
push eax
call esi
mov dword [ebp - 0x2e4], ebx
mov eax, dword [ebp - 0x2ec]
cmp eax, ebx
je 0x407742
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x2f0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004ff71d
mov esp, ebp
pop ebp
ret