Function at 0x4057e0
Capabilities:
Check os version
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [0x5be984]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x158], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x154], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x150], eax
mov eax, dword [ebp + 0x24]
push ebx
mov dword [ebp - 0x14c], eax
mov eax, dword [ebp + 0x28]
push esi
mov dword [ebp - 0x148], eax
mov eax, dword [ebp + 0x2c]
push edi
mov dword [ebp - 0x144], eax
jne 0x405ab1
cmp dword [ebp + 0x14], 0
jne 0x405ab1
cmp dword [ebp + 0x18], 0
jne 0x405ab1
call fcn.00405770
test eax, eax
je 0x405a6d
call fcn.00405620
neg eax
sbb ebx, ebx
lea eax, [ebp - 0x13c]
push eax
push 0x28
neg ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4058dc
lea eax, [ebp - 0x160]
push eax
push str.SeAssignPrimaryTokenPrivilege
push 0
call esi
test eax, eax
je 0x4058dc
mov eax, dword [ebp - 0x160]
push 0
push 0
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x15c]
push 0
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp - 0x13c]
mov dword [ebp - 0x14], 1
mov dword [ebp - 8], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [ebp - 0x13c]
call edi
lea eax, [ebp - 0x140]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40594a
lea eax, [ebp - 0x168]
push eax
push str.SeIncreaseQuotaPrivilege
push 0
call esi
test eax, eax
je 0x40594a
mov eax, dword [ebp - 0x168]
push 0
push 0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x164]
push 0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
push eax
push 0
push dword [ebp - 0x140]
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x18], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [ebp - 0x140]
call edi
call fcn.00404df0
mov esi, eax
test esi, esi
je 0x40596b
push esi
call fcn.004051e0
add esp, 4
xor ebx, ebx
cmp eax, 0x2000
sete bl
push esi
call edi
test ebx, ebx
je 0x405a6d
push 0x110
lea eax, [ebp - 0x134]
push 0
push eax
call fcn.004f0120
add esp, 0xc
mov dword [ebp - 0x138], 0x114
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x405a02
cmp dword [ebp - 0x134], 6
jb 0x405a02
call fcn.00405620
neg eax
mov dword [ebp - 0x13c], 0
sbb ebx, ebx
lea eax, [ebp - 0x13c]
push eax
push 0xf01ff
inc ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4059fe
push dword [ebp - 0x13c]
call fcn.004051e0
add esp, 4
xor ebx, ebx
cmp eax, 0x3000
sete bl
push dword [ebp - 0x13c]
call edi
test ebx, ebx
je 0x405a6d
call fcn.00404df0
push str.advapi32.dll
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.CreateProcessWithTokenW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test esi, esi
je 0x405ab1
test eax, eax
je 0x405ab1
push dword [ebp - 0x144]
push dword [ebp - 0x148]
push dword [ebp - 0x14c]
push dword [ebp - 0x150]
push dword [ebp + 0x1c]
push dword [ebp - 0x154]
push dword [ebp - 0x158]
push 0
push esi
call eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00484a0d
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x144]
push dword [ebp - 0x148]
push dword [ebp - 0x14c]
push dword [ebp - 0x150]
push dword [ebp + 0x1c]
push 0
push 0
push 0
push dword [ebp - 0x154]
push dword [ebp - 0x158]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00484a0d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00484a0d
mov esp, ebp
pop ebp
ret