Function at 0x405110
Capabilities:
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0x84]
sub esp, 0x84
push 0xffffffffffffffff
push 0x4e584f
mov eax, dword fs:[0]
push eax
sub esp, 0x118
mov eax, dword [0x50a0b0]
xor eax, ebp
mov dword [ebp + 0x80], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x10], 0
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x18], 0
push eax
push 1
xor edi, edi
push edi
push edi
call sub.WTSAPI32.dll_WTSEnumerateSessionsA
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40518c
call ebx
push eax
push str.Failed_to_enumerate_sessons___d__n
call fcn.00406300
add esp, 8
or edi, 0xffffffff
jmp 0x4051db
push dword [ebp - 0x18]
push str.session_count:__d_n
call fcn.00406300
mov edx, dword [ebp - 0x18]
add esp, 8
mov esi, dword [ebp - 0x10]
xor eax, eax
test edx, edx
je 0x4051d5
lea ecx, [esi + 8]
jmp 0x4051b0
cmp dword [ecx], edi
je 0x4051be
inc eax
add ecx, 0xc
cmp eax, edx
jb 0x4051b0
jmp 0x4051d5
lea eax, [eax + eax*2]
mov edi, dword [esi + eax*4]
push edi
push str.Found_active_session__d_n
call fcn.00406300
mov esi, dword [ebp - 0x10]
add esp, 8
push esi
call sub.WTSAPI32.dll_WTSFreeMemory
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0xe0], 0x4ea0a8
mov dword [ebp - 0xd0], 0x4ea0b0
mov dword [ebp - 0x78], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
push 0
lea eax, [ebp - 0xc8]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0xe0]
mov dword [ebp - 0x10], 1
call fcn.004026e0
mov eax, dword [ebp - 0xe0]
push 8
mov dword [ebp - 4], 1
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe0], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xe0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xe4], eax
mov dword [ebp - 0xc8], vtable.std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__.0
call fcn.004bf48c
mov esi, eax
add esp, 4
test esi, esi
je 0x40527a
push 1
mov byte [ebp - 4], 2
call fcn.004ab9a9
add esp, 4
mov dword [esi + 4], eax
jmp 0x40527c
xor esi, esi
lea eax, [ebp - 0xc4]
mov dword [ebp - 0x94], esi
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0xc0]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xb4]
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0xa4]
mov dword [ebp - 0x9c], eax
lea eax, [ebp - 0xa0]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0xc8], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
push 0x44
lea eax, [ebp - 0x124]
mov dword [ebp - 4], 3
push 0
push eax
call fcn.004c2200
xor eax, eax
lea ecx, [ebp]
add esp, 0xc
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
call fcn.00402bb0
mov byte [ebp - 4], 4
mov dword [ebp - 0x1c], 0
test edi, edi
jne 0x405377
push 0x4ea0b8
call fcn.00406300
add esp, 4
xor ebx, ebx
jmp 0x405549
lea eax, [ebp - 0xd0]
push str.ie4uinit__show
push eax
call fcn.00401380
add esp, 8
lea eax, [ebp + 0x68]
lea ecx, [ebp - 0xe0]
push eax
call fcn.0040df70
mov eax, dword [eax + 0x10]
lea eax, [eax*2 + 2]
push eax
call fcn.004c4d46
add esp, 4
lea ecx, [ebp + 0x68]
mov esi, eax
call fcn.00403880
lea eax, [ebp + 0x50]
push eax
lea ecx, [ebp - 0xe0]
call fcn.0040df70
mov dword [ebp - 0x10], eax
lea eax, [ebp + 0x68]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0xe0]
call fcn.0040df70
cmp dword [eax + 0x14], 8
jb 0x4053e4
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10]
push dword [ecx + 0x10]
push eax
push esi
call fcn.004c9494
add esp, 0xc
lea ecx, [ebp + 0x68]
call fcn.00403880
lea ecx, [ebp + 0x50]
mov byte [ebp - 4], 4
call fcn.00403880
lea eax, [ebp + 0x50]
push eax
lea ecx, [ebp - 0xe0]
call fcn.0040df70
xor ecx, ecx
mov eax, dword [eax + 0x10]
mov word [esi + eax*2], cx
lea ecx, [ebp + 0x50]
call fcn.00403880
lea eax, [ebp - 0x14]
push eax
push edi
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
jne 0x405454
call ebx
push eax
push str.Failed_to_get_token__d_n
call fcn.00406300
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
or ebx, 0xffffffff
jmp 0x405524
push 1
push dword [ebp - 0x14]
lea eax, [ebp - 0x1c]
push eax
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
jne 0x405470
call ebx
push eax
push str.Failed_to_create_environment_block___d__n
jmp 0x40543e
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x124]
push eax
push 0
push dword [ebp - 0x1c]
push 0x410
push 0
push 0
push 0
push esi
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x4054b8
call ebx
push eax
push edi
push esi
push str.Failed_to_create_process_as_session_id:__s___d__d__n
call fcn.00406300
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x10
or ebx, 0xffffffff
jmp 0x405524
push 0x2710
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x4054e3
push str.Failed_to_wait_single_object_n
call fcn.00406300
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
or ebx, 0xffffffff
jmp 0x405524
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x405501
call ebx
push eax
push str.Failed_to_get_exit_code_for_installer_process___d__n
jmp 0x40543e
push dword [ebp - 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x28]
call edi
push dword [ebp - 0x30]
push esi
push str._s_exit_with_code__d_n
call fcn.00406300
add esp, 0xc
xor ebx, ebx
test esi, esi
je 0x405531
push esi
call fcn.004c4d2b
add esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, 0xffffffff
je 0x40553c
push eax
call edi
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x405549
push eax
call sub.USERENV.dll_DestroyEnvironmentBlock
lea ecx, [ebp]
call fcn.00403ba0
lea ecx, [ebp - 0xe0]
call fcn.00404340
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x80]
xor ecx, ebp
call fcn.004bf929
lea esp, [ebp + 0x84]
pop ebp
ret