Function at 0x420d90
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x599690]
xor eax, ebp
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
and eax, 0xffff
movzx ecx, ax
and ecx, 0xff
movzx edx, cl
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 4]
and eax, 0xffff
movzx ecx, ax
shr ecx, 8
and ecx, 0xff
movzx edx, cl
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x5c], 6
jae 0x420dea
mov eax, 1
jmp 0x421088
mov dword [ebp - 0x60], 0x14
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 8], 0
mov byte [ebp - 0x40], 0
mov byte [ebp - 0x3f], 0
mov byte [ebp - 0x3e], 0
mov byte [ebp - 0x3d], 0
mov byte [ebp - 0x3c], 0
mov byte [ebp - 0x3b], 5
push 2
call dword [sym.imp.ADVAPI32.dll_ImpersonateSelf]
test eax, eax
jne 0x420e3b
jmp 0x421055
lea eax, [ebp - 0x30]
push eax
push 0
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x420ead
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
je 0x420e6b
jmp 0x421055
lea ecx, [ebp - 0x30]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x420e8c
jmp 0x421055
lea edx, [ebp - 0x30]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x420ead
jmp 0x421055
lea eax, [ebp - 0x34]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea ecx, [ebp - 0x40]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x420ede
jmp 0x421055
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x420efb
jmp 0x421055
push 1
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x420f15
jmp 0x421055
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
add eax, 0x10
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x420f44
jmp 0x421055
push 2
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
jne 0x420f62
jmp 0x421055
mov dword [ebp - 0x64], 3
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x64]
push edx
push 2
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
jne 0x420f8b
jmp 0x421055
push 0
mov ecx, dword [ebp - 0x28]
push ecx
push 1
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x420fab
jmp 0x421055
push 0
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorGroup]
test eax, eax
jne 0x420fc9
jmp 0x421055
push 0
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
jne 0x420fe1
jmp 0x421055
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
jne 0x420ff3
jmp 0x421055
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x4c], 2
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 3
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_AccessCheck]
test eax, eax
jne 0x421044
jmp 0x421055
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
test eax, eax
jne 0x421055
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x28], 0
je 0x421065
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 8], 0
je 0x421075
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x34], 0
je 0x421085
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x38]
xor ecx, ebp
call fcn.00520c7a
mov esp, ebp
pop ebp
ret