Function at 0x401000
Capabilities:
Check os version
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x19c
push esi
mov esi, 0x114
push esi
lea eax, [ebp - 0x19c]
push 0
push eax
mov byte [ebp - 1], 0
call fcn.0040153c
add esp, 0xc
lea eax, [ebp - 0x19c]
push eax
mov dword [ebp - 0x19c], esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp eax, 1
jne 0x40104f
cmp dword [ebp - 0x18c], 2
jne 0x40104f
cmp dword [ebp - 0x198], 4
jae 0x401056
mov al, 1
jmp 0x4013c7
cmp dword [ebp - 0x198], 5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
jb 0x4010a3
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x4010a3
push str.IsUserAnAdmin
push edi
call esi
test eax, eax
je 0x40109c
call eax
test eax, eax
je 0x40108d
mov byte [ebp - 1], 1
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, byte [ebp - 1]
jmp 0x4013c6
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
mov edi, str.ADVAPI32.DLL
push edi
mov byte [ebp - 2], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
test ebx, ebx
jne 0x4010cf
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x4013c3
mov byte [ebp - 2], 1
push str.OpenThreadToken
push ebx
call esi
push 0x403230
push ebx
mov dword [ebp - 0x3c], eax
call esi
push str.DuplicateToken
push ebx
mov dword [ebp - 0x44], eax
call esi
push str.AllocateAndInitializeSid
push ebx
mov dword [ebp - 0x34], eax
call esi
push str.InitializeSecurityDescriptor
push ebx
mov dword [ebp - 0x48], eax
call esi
push str.InitializeAcl
push ebx
mov dword [ebp - 0x2c], eax
call esi
push str.AddAccessAllowedAce
push ebx
mov dword [ebp - 0x50], eax
call esi
push str.SetSecurityDescriptorDacl
push ebx
mov dword [ebp - 0x5c], eax
call esi
push str.SetSecurityDescriptorGroup
push ebx
mov dword [ebp - 0x58], eax
call esi
push str.SetSecurityDescriptorOwner
push ebx
mov dword [ebp - 0x54], eax
call esi
push str.IsValidSecurityDescriptor
push ebx
mov dword [ebp - 0x4c], eax
call esi
push str.AccessCheck
push ebx
mov dword [ebp - 0x40], eax
call esi
push str.FreeSid
push ebx
mov dword [ebp - 0x30], eax
call esi
mov dword [ebp - 0x38], eax
xor eax, eax
cmp dword [ebp - 0x3c], eax
je 0x4013c3
cmp dword [ebp - 0x44], eax
je 0x4013c3
cmp dword [ebp - 0x34], eax
je 0x4013c3
cmp dword [ebp - 0x48], eax
je 0x4013c3
cmp dword [ebp - 0x2c], eax
je 0x4013c3
cmp dword [ebp - 0x50], eax
je 0x4013c3
cmp dword [ebp - 0x58], eax
je 0x4013c3
cmp dword [ebp - 0x54], eax
je 0x4013c3
cmp dword [ebp - 0x4c], eax
je 0x4013c3
cmp dword [ebp - 0x40], eax
je 0x4013c3
cmp dword [ebp - 0x30], eax
je 0x4013c3
cmp dword [ebp - 0x38], eax
je 0x4013c3
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
lea edi, [ebp - 0x88]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
and dword [ebp - 8], 0
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
and dword [ebp - 0x24], 0
lea edi, [ebp - 0x70]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x60], 0x14
stosd dword es:[edi], eax
mov dword [ebp - 0x20], 0
mov word [ebp - 0x1c], 0x500
lea eax, [ebp - 0x14]
push eax
xor esi, esi
inc esi
push esi
push 0xa
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [ebp - 0x3c]
test eax, eax
jne 0x40124c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x401360
lea eax, [ebp - 0x14]
push eax
push 0xa
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0x44]
test eax, eax
je 0x401360
lea eax, [ebp - 0x18]
push eax
push 2
push dword [ebp - 0x14]
call dword [ebp - 0x34]
test eax, eax
je 0x401360
xor edi, edi
lea eax, [ebp - 0xc]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x20]
push eax
call dword [ebp - 0x48]
test eax, eax
je 0x401360
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 8], eax
cmp eax, edi
je 0x401360
push esi
push eax
call dword [ebp - 0x2c]
test eax, eax
je 0x401360
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea edi, [eax + 0x10]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40136f
push 2
push edi
push eax
call dword [ebp - 0x50]
test eax, eax
je 0x401360
push dword [ebp - 0xc]
push 3
pop edi
push edi
push 2
push dword [ebp - 0x10]
call dword [ebp - 0x5c]
test eax, eax
je 0x401360
push 0
push dword [ebp - 0x10]
push esi
push dword [ebp - 8]
call dword [ebp - 0x58]
test eax, eax
je 0x401360
push 0
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [ebp - 0x54]
push 0
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [ebp - 0x4c]
push dword [ebp - 8]
call dword [ebp - 0x40]
test eax, eax
je 0x401360
and dword [ebp - 0x68], 0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x70]
push eax
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0x70], esi
push dword [ebp - 8]
mov dword [ebp - 0x6c], 2
mov dword [ebp - 0x64], edi
call dword [ebp - 0x30]
test eax, eax
je 0x40135c
inc dword [ebp - 0x24]
cmp dword [ebp - 0x24], esi
jl 0x40120b
jmp 0x401360
and dword [ebp - 0x28], 0
cmp dword [ebp - 0x10], 0
je 0x40136f
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
cmp dword [ebp - 8], esi
je 0x40137f
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xc], esi
je 0x40138a
push dword [ebp - 0xc]
call dword [ebp - 0x38]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], esi
je 0x40139a
push dword [ebp - 0x18]
call edi
cmp dword [ebp - 0x14], esi
je 0x4013a4
push dword [ebp - 0x14]
call edi
cmp dword [ebp - 0x28], esi
je 0x4013ad
mov byte [ebp - 1], 1
cmp byte [ebp - 2], 0
je 0x4013be
test ebx, ebx
je 0x4013be
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, byte [ebp - 1]
jmp 0x4013c5
xor al, al
pop ebx
pop edi
pop esi
leave
ret