Function at 0x407df0
Capabilities:
Check os version
Create process on windows
Create process suspended
Link many functions at runtime

Disassembly:
push 0xffffffffffffffff
push 0x42249b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x200
mov eax, dword [0x42b48c]
xor eax, esp
push ebx
mov ebx, dword [esp + 0x218]
push esi
push edi
mov dword [esp + 0x208], eax
mov eax, dword [esp + 0x21c]
mov esi, ecx
push str.RunProcessAsLogon
push 0x40
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], ebx
call fcn.004062b0
xor eax, eax
mov ecx, 0x10
lea edi, [esp + 0xac]
mov dword [esp + 0xa8], 0x44
rep stosd dword es:[edi], eax
mov eax, dword [esi + 4]
xor edi, edi
add esp, 8
cmp eax, edi
mov dword [esp + 0x1c], edi
jne 0x407ed0
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0xa4]
push edx
add esi, 0x22c
push esi
push edi
push edi
push 1
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
cmp esi, edi
je 0x407eb2
mov eax, dword [esp + 0x50]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esp + 0x4c]
push ecx
call edi
mov eax, esi
jmp 0x40837c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.Failed_to_CreateProcess:_s_err0x_x
push 4
call fcn.004062b0
add esp, 0x10
mov eax, esi
jmp 0x40837c
push ebp
push str.wtsapi32.DLL
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, edi
mov dword [esp + 0x38], ebx
je 0x408088
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSQueryUserToken
push ebx
call esi
mov ebp, dword [esp + 0x228]
cmp ebp, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x407faf
push str.WTSEnumerateSessionsA
push ebx
call esi
cmp eax, edi
je 0x407faf
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x14]
push ecx
push 1
push edi
push edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
call eax
test eax, eax
je 0x408052
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x407f96
mov eax, dword [esp + 0x10]
xor esi, esi
mov edi, edi
mov edx, dword [esi + eax + 8]
mov ecx, dword [esi + eax + 4]
push edx
mov edx, dword [esi + eax]
push ecx
push edx
push edi
push str.SessionInfo__d_:_SessionId_d__WinStationName_s__State_d.
push 0x40
call fcn.004062b0
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + eax + 8]
add esp, 0x18
test ecx, ecx
je 0x407f90
cmp ecx, 1
jne 0x407f82
mov ebp, dword [esi + eax]
mov ecx, dword [esp + 0x14]
inc edi
add esi, 0xc
cmp edi, ecx
jb 0x407f50
jmp 0x407f96
lea ecx, [edi + edi*2]
mov ebp, dword [eax + ecx*4]
push str.WTSFreeMemory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x407fad
mov edx, dword [esp + 0x10]
push edx
call eax
xor edi, edi
push ebp
push str.SessionId___d
push 0x40
call fcn.004062b0
xor eax, eax
add esp, 0xc
cmp ebp, 0xffffffff
sete al
dec eax
and eax, ebp
mov esi, eax
cmp dword [esp + 0x18], edi
je 0x408316
xor eax, eax
mov dword [esp + 0x60], 0x44
mov ecx, 0x10
lea edi, [esp + 0x64]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
mov eax, 1
push ecx
xor edi, edi
push esi
mov dword [esp + 0x70], str.WinSta0Default
mov word [esp + 0x98], ax
mov dword [esp + 0x94], eax
mov dword [esp + 0x1c], edi
call dword [esp + 0x20]
test eax, eax
jne 0x4080d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str._New_Failed_to_call_WTSQueryUserToken__err_0x_x
push 4
call fcn.004062b0
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp esi, 0x7a
je 0x4080aa
cmp esi, 0x4dd
je 0x4080aa
xor eax, eax
jmp 0x40837b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6a6
jne 0x408073
push str.The_Terminate_Service_not_running.
push 0x40
call fcn.004062b0
add esp, 8
jmp 0x407faf
push eax
push str.Failed_to_call_WTSEnumerateSessions:err0x_x
push 4
call fcn.004062b0
add esp, 0xc
jmp 0x407faf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_LoadLibrary__Wtsapi32.dll__:err0x_x
push 4
call fcn.004062b0
mov ebp, dword [esp + 0x234]
add esp, 0xc
jmp 0x407faf
push str.RunProcessAsSvc...
push 0x80
call fcn.004062b0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
add esp, 8
push 0xffffffffffffffff
push edx
push eax
call fcn.00406990
jmp 0x40837b
mov ebp, dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xff
cmp eax, 5
jbe 0x4081a3
cmp dword [esp + 0x22c], edi
je 0x4081a3
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x4c]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push 0x13
push eax
mov dword [esp + 0x2c], edi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x408122
mov ebp, eax
lea ecx, [esp + 0x24]
push ecx
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push 0x3000
push 1
lea edx, [esp + 0x110]
push edx
mov byte [esp + 0x114], 0
mov byte [esp + 0x115], 0
mov byte [esp + 0x116], 0
mov byte [esp + 0x117], 0
mov byte [esp + 0x118], 0
mov byte [esp + 0x119], 0x10
mov dword [esp + 0x50], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4081a3
mov eax, dword [esp + 0x24]
push 8
lea ecx, [esp + 0x34]
push ecx
push 0x19
push ebp
mov dword [esp + 0x44], 0x20
mov dword [esp + 0x40], eax
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push str.Userenv.DLL
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x4082fe
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateEnvironmentBlock
push ebx
call edi
push str.DestroyEnvironmentBlock
push ebx
mov esi, eax
call edi
test esi, esi
mov dword [esp + 0x24], eax
je 0x4082bc
test eax, eax
je 0x4082bc
push 0
push ebp
lea edx, [esp + 0x18]
push edx
call esi
test eax, eax
je 0x4082bc
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
lea eax, [esp + 0x3c]
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x64]
push ecx
add esi, 0x22c
push esi
push edx
push 0xc30
push 0
push 0
push 0
push eax
push 0
push ebp
call edi
test eax, eax
jne 0x40829c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push str.Failed_to_call_CreateProcessAsUser:_cmd_s_err0x_x.
push 4
call fcn.004062b0
mov ecx, dword [esp + 0x20]
add esp, 0x10
lea edx, [esp + 0x3c]
push edx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x64]
push eax
push esi
mov esi, dword [esp + 0x38]
push ecx
push 0xc30
push 0
push 0
push 0
push edx
push esi
push ebp
call edi
test eax, eax
mov dword [esp + 0x20], eax
jne 0x40829c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x20]
push eax
push esi
push str.Failed_to_call_CreateProcessAsUser_again:_appname___s_cmd_s_err0x_x.
push 4
call fcn.004062b0
add esp, 0x14
jmp 0x4082b3
push str.Successed_to_CreateProcessAsUser.
push 0x40
mov dword [esp + 0x28], 1
call fcn.004062b0
add esp, 8
mov ecx, dword [esp + 0x10]
push ecx
call dword [esp + 0x28]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4082df
mov edx, dword [esp + 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x3c]
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x20]
jmp 0x40837b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_LoadLibrary__Userenv.DLL__:err0x_x
push 4
call fcn.004062b0
add esp, 0xc
jmp 0x4082df
cmp ebx, edi
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
je 0x408323
push ebx
call edi
lea ecx, [esp + 0xf0]
call fcn.00403a00
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
push esi
add eax, 0x22c
push eax
push ecx
push 0
lea ecx, [esp + 0x100]
mov dword [esp + 0x228], 0
call fcn.00407a10
mov esi, eax
mov eax, dword [esp + 0x1fc]
neg esi
sbb esi, esi
neg esi
test eax, eax
mov dword [esp + 0xf0], 0x424850
je 0x408379
push eax
call edi
mov eax, esi
pop ebp
mov ecx, dword [esp + 0x20c]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x200]
pop ebx
xor ecx, esp
call fcn.00415d1a
add esp, 0x20c
ret 0x10