Function at 0x43cf40
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x4b93f8]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 6
jae 0x43cf6d
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004495f3
mov esp, ebp
pop ebp
ret
push 2
mov dword [ebp - 0x40], 0x14
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0xc], 0
mov word [ebp - 8], 0x500
call dword [sym.imp.ADVAPI32.dll_ImpersonateSelf]
test eax, eax
je 0x43d12c
push esi
push edi
lea eax, [ebp - 0x3c]
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 0x43cffd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x43d12a
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [ebp - 0x3c]
push eax
push 8
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push eax
call edi
test eax, eax
je 0x43d12a
lea eax, [ebp - 0x3c]
push eax
push 8
call esi
push eax
call edi
test eax, eax
je 0x43d12a
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 eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x43d12a
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x14
push 0x40
call edi
mov esi, eax
test esi, esi
je 0x43d12a
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x43d123
push ebx
push dword [ebp - 0x34]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea ebx, [eax + 0x10]
push ebx
push 0x40
call edi
mov edi, eax
test edi, edi
je 0x43d122
push 2
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x43d11b
push dword [ebp - 0x34]
push 3
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x43d11b
push 0
push edi
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x43d11b
push 0
push dword [ebp - 0x34]
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorGroup]
test eax, eax
je 0x43d11b
push 0
push dword [ebp - 0x34]
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0x43d11b
push esi
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
je 0x43d11b
lea eax, [ebp - 0x38]
mov dword [ebp - 0x1c], 1
push eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x18], 2
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x10], 3
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
push dword [ebp - 0x3c]
push esi
call dword [sym.imp.ADVAPI32.dll_AccessCheck]
test eax, eax
je 0x43d11b
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
neg eax
sbb eax, eax
and dword [ebp - 0x38], eax
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x43d13a
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x38]
xor ecx, ebp
call fcn.004495f3
mov esp, ebp
pop ebp
ret