Function at 0x402358
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x430
push ebx
push esi
push edi
mov esi, ecx
mov edi, eax
mov eax, dword [esi + 0x46b8]
xor ebx, ebx
cmp eax, 4
mov dword [ebp - 8], ebx
jne 0x40246a
cmp dword [esi + 0x590c], ebx
je 0x402398
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
mov dword [ebp - 4], ebx
call fcn.004032ff
jmp 0x402818
mov esi, 0x208
push esi
lea eax, [ebp - 0x21e]
push ebx
push eax
mov word [ebp - 0x220], bx
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
lea eax, [ebp - 0x42e]
push ebx
push eax
mov word [ebp - 0x430], bx
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x220]
add esp, 0xc
push eax
call fcn.00405df3
mov dword [esp], str.winlogon.exe
call sub.msvcrt.dll_wcslen
mov esi, eax
pop ecx
lea eax, [ebp - 0x220]
push eax
call sub.msvcrt.dll_wcslen
lea eax, [esi + eax + 1]
cmp eax, 0x104
pop ecx
jae 0x40241b
lea eax, [ebp - 0x220]
push str.winlogon.exe
push eax
lea eax, [ebp - 0x430]
call fcn.00405d9b
pop ecx
pop ecx
jmp 0x402422
mov word [ebp - 0x430], bx
mov esi, dword [ebp + 8]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x430]
push eax
push esi
mov dword [ebp - 4], ebx
call fcn.0040218a
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x402885
push dword [ebp + 0x20]
lea eax, [esi + 0x800]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.004036cc
jmp 0x402844
cmp eax, 5
jne 0x402528
lea eax, [esi + 0x46bc]
push eax
call sub.msvcrt.dll_wcslen
cmp eax, ebx
pop ecx
jle 0x402885
push eax
lea edx, [esi + 0x46bc]
push edx
mov dword [ebp - 4], ebx
call fcn.00406060
pop ecx
pop ecx
test eax, eax
lea eax, [ebp - 4]
push eax
push edx
je 0x4024b4
call sub.msvcrt.dll__wtoi
pop ecx
push eax
push dword [ebp + 8]
call fcn.004021d5
jmp 0x4024bc
push dword [ebp + 8]
call fcn.0040218a
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x402885
cmp dword [esi + 0x590c], ebx
mov eax, dword [ebp + 8]
je 0x402501
push dword [ebp - 4]
call fcn.004032cb
push dword [ebp + 0x20]
or edi, 0x400
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
jmp 0x402521
push dword [ebp + 0x20]
add eax, 0x800
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.004036cc
cmp eax, ebx
jmp 0x402846
cmp eax, 9
jne 0x40255b
lea eax, [esi + 0x48c6]
push eax
call fcn.00406b64
cmp eax, ebx
je 0x402885
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 8]
mov dword [ebp - 4], ebx
call fcn.004021d5
mov dword [ebp - 8], eax
cmp eax, ebx
jmp 0x4024c1
cmp eax, 8
jne 0x40263a
push 0x35
push str.ServicesActive
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
je 0x40257d
push eax
call fcn.004012fe
pop ecx
cmp dword [esi + 0x590c], ebx
mov dword [ebp - 4], ebx
jne 0x40259b
push dword [ebp + 8]
call fcn.00402276
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x402885
lea eax, [ebp - 4]
push eax
push str.TrustedInstaller.exe
push dword [ebp + 8]
call fcn.0040218a
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x402623
cmp dword [esi + 0x590c], ebx
mov eax, dword [ebp + 8]
je 0x4025ed
push dword [ebp - 4]
call fcn.004032cb
push dword [ebp + 0x20]
or edi, 0x400
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
jmp 0x40260d
push dword [ebp + 0x20]
add eax, 0x800
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.004036cc
cmp eax, ebx
jne 0x40261a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x590c], ebx
jne 0x402885
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x402885
cmp eax, 6
jne 0x40267c
lea eax, [esi + 0x46bc]
call fcn.0040212a
cmp eax, ebx
je 0x402885
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call 0x40c4c7
test eax, eax
jne 0x402885
mov eax, dword [ebp + 8]
jmp 0x402882
cmp eax, 7
jne 0x402750
cmp dword [esi + 0x590c], ebx
lea edx, [esi + 0x48c6]
lea eax, [esi + 0x4ac6]
lea ecx, [esi + 0x4cc6]
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
je 0x4026f8
lea esi, [ebp - 4]
push esi
push ecx
push eax
push edx
push dword [ebp + 8]
mov dword [ebp - 4], ebx
call fcn.00403365
cmp dword [ebp - 4], ebx
mov dword [ebp - 8], eax
je 0x40287c
push dword [ebp + 0x20]
or edi, 0x400
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402749
cmp word [eax], bx
jne 0x40270e
push 0x40
push edx
call sub.msvcrt.dll_wcschr
test eax, eax
pop ecx
pop ecx
je 0x40270e
mov dword [ebp - 4], ebx
mov esi, dword [ebp + 8]
add esi, 0x800
call fcn.00403670
mov esi, dword [esi + 0xc]
cmp esi, ebx
je 0x402747
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 1
push dword [ebp - 0xc]
push dword [ebp - 4]
push dword [ebp - 0x10]
call esi
mov esi, eax
jmp 0x402749
xor esi, esi
cmp esi, ebx
jmp 0x40287a
cmp eax, 0xa
jne 0x402760
lea eax, [ebp + 0x14]
push eax
push str.S_1_5_20
jmp 0x40276e
cmp eax, 0xb
jne 0x4027d6
lea eax, [ebp + 0x14]
push eax
push str.S_1_5_19
push dword [ebp + 8]
mov dword [ebp + 0x14], ebx
call fcn.00403483
mov esi, dword [ebp + 0x14]
cmp esi, ebx
mov dword [ebp - 8], eax
je 0x402885
push 1
push esi
lea eax, [ebp + 8]
push eax
mov dword [ebp + 8], ebx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
push dword [ebp + 0x20]
or edi, 0x400
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push ebx
push edi
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x4027c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp + 8], ebx
je 0x4027d3
push dword [ebp + 8]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
push esi
jmp 0x402854
cmp dword [esi + 0x590c], ebx
je 0x40285c
cmp eax, 1
je 0x4027f6
cmp eax, 3
je 0x4027f6
cmp eax, 2
jne 0x402885
mov dword [ebp - 4], ebx
jmp 0x40280c
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
mov dword [ebp - 4], ebx
call fcn.00403271
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x40281f
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
call fcn.0040322f
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x402885
push dword [ebp + 0x20]
or edi, 0x400
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x402851
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402885
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x402885
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x1c