Function at 0x40d6d0
Capabilities:
Check os version
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4460db
mov eax, dword fs:[0]
push eax
sub esp, 0x514
mov eax, dword [0x45c3a4]
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 dword [ebp - 0x10], esp
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
push ebx
push 0x452918
xor edi, edi
push str.Trying_WTSQueryUserToken__d_
push 0x462e98
mov dword [ebp - 0x4b8], esi
mov dword [ebp - 0x4e0], 0
mov dword [ebp - 0x4b4], 0
mov dword [ebp - 0x4c4], 0
mov dword [ebp - 0x4dc], edi
mov dword [ebp - 4], edi
call fcn.00402460
add esp, 0x10
lea eax, [ebp - 0x4b4]
push eax
push ebx
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x40d78a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x452918
push str.WTSQueryUserToken_failed._Using_fallback_method...__0x_08X_
push 0x462e98
call fcn.00402460
add esp, 0x10
push esi
push ebx
call fcn.0040dc80
jmp 0x40dc54
push 1
push dword [ebp - 0x4b4]
lea eax, [ebp - 0x4bc]
push eax
mov dword [ebp - 0x4bc], 0
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x40d7e4
lea eax, [ebp - 0x4c8]
push eax
lea ecx, [ebp - 0x4fc]
mov dword [ebp - 0x4c8], 0x4529a0
call fcn.0041bb11
push 0x4589e8
lea eax, [ebp - 0x4fc]
push eax
mov dword [ebp - method.std::runtime_error.virtual_0], vtable.std::runtime_error.0
call fcn.0041de2b
push dword [ebp - 0x4bc]
lea ecx, [ebp - 0x468]
mov dword [ebp - 0x464], 0
mov dword [ebp - 0x45c], 0
call fcn.004040f0
mov byte [ebp - 4], 1
push dword [ebp - 0x4bc]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
push 0x110
lea eax, [ebp - 0x134]
push 0
push eax
mov dword [ebp - 0x4bc], 0
mov dword [ebp - 0x138], 0x114
call fcn.00427e80
add esp, 0xc
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x134], 6
jb 0x40d8eb
mov ecx, dword [ebp - 0x4b4]
call fcn.00412ed0
test al, al
je 0x40d8eb
push 0x452918
push str.User_token_is_limited._Querying_Linked_token...
push 0x462e98
call fcn.00402460
add esp, 0xc
lea eax, [ebp - 0x43c]
push eax
push 4
lea eax, [ebp - 0x4c8]
push eax
push 0x13
push dword [ebp - 0x4b4]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x40d8b1
mov dword [ebp - 0x4dc], 0xffffffff
jmp 0x40d8c2
mov edi, dword [ebp - 0x4c8]
mov dword [ebp - 0x4dc], edi
cmp edi, 0xffffffff
jne 0x40d8e3
push 0x452918
push str.Failed_to_query_linked_token
push 0x462e98
call fcn.00402460
add esp, 0xc
xor edi, edi
mov dword [ebp - 0x4dc], edi
jmp 0x40d8eb
test edi, edi
jne 0x40db16
mov ecx, dword [ebp - 0x4b4]
call fcn.00412f60
test al, al
jne 0x40db16
push 0x452918
push str.Using_SYSTEM_token
push 0x462e98
call fcn.00402460
add esp, 0xc
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x228], ax
lea eax, [ebp - 0x226]
push eax
call fcn.00427e80
add esp, 0xc
xor eax, eax
push 0x208
push eax
mov word [ebp - 0x438], ax
lea eax, [ebp - 0x436]
push eax
call fcn.00427e80
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
add esp, 0xc
lea eax, [ebp - 0x228]
push eax
push 0
push dword [ebp - 0x4b4]
push 0x1a
push 0
call esi
lea eax, [ebp - 0x438]
push eax
push 0
push dword [ebp - 0x4b4]
push 0x1c
push 0
call esi
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x4b4]
push str.CSessionMonitor::ExecuteProcessAsSession
push str.hUserToken__0x_08X__AppData___s_
push 0x462e98
call fcn.004025d0
add esp, 0x14
lea eax, [ebp - 0x438]
push eax
push dword [ebp - 0x4b4]
push str.CSessionMonitor::ExecuteProcessAsSession
push str.hUserToken__0x_08X__LocalAppData___s_
push 0x462e98
call fcn.004025d0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x14
push dword [ebp - 0x4b4]
call esi
lea eax, [ebp - 0x4c4]
push eax
push 0x2000000
mov dword [ebp - 0x4b4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40da35
lea eax, [ebp - 0x4b8]
push eax
lea ecx, [ebp - 0x514]
mov dword [ebp - 0x4b8], 0x452b0c
call fcn.0041bb11
push 0x4589e8
lea eax, [ebp - 0x514]
push eax
mov dword [ebp - method.std::runtime_error.virtual_0], vtable.std::runtime_error.0
call fcn.0041de2b
lea eax, [ebp - 0x4b4]
push eax
push 1
push 2
push 0
push 0x2000000
push dword [ebp - 0x4c4]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x40da8e
lea eax, [ebp - 0x4b8]
push eax
lea ecx, [ebp - 0x4f0]
mov dword [ebp - 0x4b8], 0x452b20
call fcn.0041bb11
push 0x4589e8
lea eax, [ebp - 0x4f0]
push eax
mov dword [ebp - method.std::runtime_error.virtual_0], vtable.std::runtime_error.0
call fcn.0041de2b
push 4
lea eax, [ebp - 0x4c0]
push eax
push 0xc
push dword [ebp - 0x4b4]
mov dword [ebp - 0x4c0], ebx
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x40dae6
lea eax, [ebp - 0x4b8]
push eax
lea ecx, [ebp - 0x508]
mov dword [ebp - 0x4b8], 0x452b34
call fcn.0041bb11
push 0x4589e8
lea eax, [ebp - 0x508]
push eax
mov dword [ebp - method.std::runtime_error.virtual_0], vtable.std::runtime_error.0
call fcn.0041de2b
lea eax, [ebp - 0x228]
push eax
push str.APPDATA
lea ecx, [ebp - 0x468]
call fcn.00404260
lea eax, [ebp - 0x438]
push eax
push str.LOCALAPPDATA
lea ecx, [ebp - 0x468]
call fcn.00404260
jmp 0x40db1c
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x40
lea eax, [ebp - 0x4ac]
push 0
push eax
mov dword [ebp - 0x4b0], 0x44
call fcn.00427e80
add esp, 0xc
lea ecx, [ebp - 0x468]
call fcn.00404380
lea ecx, [ebp - 0x4d8]
push ecx
lea ecx, [ebp - 0x4b0]
push ecx
push 0
push eax
mov eax, dword [ebp - 0x4b4]
push 0x400
push 1
push 0
push 0
push dword [ebp - 0x4b8]
test edi, edi
push 0
cmovne eax, edi
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x40dbb5
lea eax, [ebp - 0x4c0]
push eax
lea ecx, [ebp - 0x520]
mov dword [ebp - 0x4c0], str.CreateProcessAsUser
call fcn.0041bb11
push 0x4589e8
lea eax, [ebp - 0x520]
push eax
mov dword [ebp - method.std::runtime_error.virtual_0], vtable.std::runtime_error.0
call fcn.0041de2b
push dword [ebp - 0x4d8]
call esi
push dword [ebp - 0x4d4]
call esi
push 0x452918
push str.Process_created
push 0x462e98
call fcn.00402460
mov ebx, dword [ebp - 0x4d0]
add esp, 0xc
lea ecx, [ebp - 0x468]
call fcn.004041d0
jmp 0x40dc31
mov eax, dword [ebp - 0x4b4]
test eax, eax
je 0x40dc3e
push eax
call esi
mov eax, dword [ebp - 0x4c4]
test eax, eax
je 0x40dc4b
push eax
call esi
test edi, edi
je 0x40dc52
push edi
call esi
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 - 0x14]
xor ecx, ebp
call fcn.0041b8d4
mov esp, ebp
pop ebp
ret 8