Function at 0x419670
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x506380
push 0x49f730
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x516b80]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x70], 0x14
xor edi, edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
mov byte [ebp - 0x24], 0
mov byte [ebp - 0x23], 0
mov byte [ebp - 0x22], 0
mov byte [ebp - 0x21], 0
mov byte [ebp - 0x20], 0
mov byte [ebp - 0x1f], 5
lea ecx, [ebp - 0x64]
push ecx
lea esi, [ebp - 0x34]
call fcn.00419460
add esp, 4
test al, al
je 0x419a22
mov eax, dword [ebp - 0x34]
cmp eax, 6
je 0x419a22
cmp eax, 7
je 0x419a22
cmp eax, 8
je 0x419a22
cmp eax, 9
je 0x419a22
cmp eax, 0xa
je 0x419a22
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
cmp esi, edi
je 0x419a22
push str.OpenThreadToken
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call edi
mov ebx, eax
push str.OpenProcessToken
push esi
call edi
mov dword [ebp - 0x6c], eax
push 0x4ff4e8
push esi
call edi
mov dword [ebp - 0x68], eax
push 0x4ff4f8
push esi
call edi
mov dword [ebp - 0x74], eax
push 0x4ff514
push esi
call edi
mov dword [ebp - 0x34], eax
push str.InitializeSecurityDescriptor
push esi
call edi
mov dword [ebp - 0x60], eax
push str.InitializeAcl
push esi
call edi
mov dword [ebp - 0x54], eax
push str.AddAccessAllowedAce
push esi
call edi
mov dword [ebp - 0x58], eax
push str.SetSecurityDescriptorDacl
push esi
call edi
mov dword [ebp - 0x5c], eax
push str.SetSecurityDescriptorGroup
push esi
call edi
mov dword [ebp - 0x50], eax
push str.SetSecurityDescriptorOwner
push esi
call edi
mov dword [ebp - 0x44], eax
push str.IsValidSecurityDescriptor
push esi
call edi
mov dword [ebp - 0x48], eax
push str.AccessCheck
push esi
call edi
mov dword [ebp - 0x64], eax
test ebx, ebx
je 0x419a22
mov esi, dword [ebp - 0x6c]
test esi, esi
je 0x419a22
cmp dword [ebp - 0x68], 0
je 0x419a22
mov edi, dword [ebp - 0x74]
test edi, edi
je 0x419a22
cmp dword [ebp - 0x34], 0
je 0x419a22
cmp dword [ebp - 0x60], 0
je 0x419a22
cmp dword [ebp - 0x54], 0
je 0x419a22
cmp dword [ebp - 0x58], 0
je 0x419a22
cmp dword [ebp - 0x5c], 0
je 0x419a22
cmp dword [ebp - 0x50], 0
je 0x419a22
cmp dword [ebp - 0x44], 0
je 0x419a22
cmp dword [ebp - 0x48], 0
je 0x419a22
test eax, eax
je 0x419a22
mov edx, dword [ebp - 0x4c]
mov byte [edx], 1
mov dword [ebp - 4], 0
lea eax, [ebp - 0x2c]
push eax
push 1
push 0xa
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call ebx
test eax, eax
jne 0x419896
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x4199c3
lea ecx, [ebp - 0x2c]
push ecx
push 0xa
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x4199c3
lea edx, [ebp - 0x3c]
push edx
push 2
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x4199c3
lea ecx, [ebp - 0x28]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea edx, [ebp - 0x24]
push edx
call edi
test eax, eax
je 0x4199c3
push 0x14
push 0x40
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
call edi
mov ebx, eax
mov dword [ebp - 0x38], ebx
test ebx, ebx
je 0x4199c6
push 1
push ebx
call dword [ebp - 0x60]
test eax, eax
je 0x4199c6
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
add esi, 0x10
push esi
push 0x40
call edi
mov edi, eax
mov dword [ebp - 0x30], edi
test edi, edi
je 0x4199c9
push 2
push esi
push edi
call dword [ebp - 0x54]
test eax, eax
je 0x4199c9
mov ecx, dword [ebp - 0x28]
push ecx
push 3
push 2
push edi
call dword [ebp - 0x58]
test eax, eax
je 0x4199c9
push 0
push edi
push 1
push ebx
call dword [ebp - 0x5c]
test eax, eax
je 0x4199c9
push 0
mov edx, dword [ebp - 0x28]
push edx
push ebx
call dword [ebp - 0x50]
push 0
mov eax, dword [ebp - 0x28]
push eax
push ebx
call dword [ebp - 0x44]
push ebx
call dword [ebp - 0x48]
test eax, eax
je 0x4199c9
mov dword [ebp - 0x84], 1
mov dword [ebp - 0x80], 2
xor esi, esi
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x78], 3
lea ecx, [ebp - 0x40]
push ecx
lea edx, [ebp - 0x88]
push edx
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x9c]
push ecx
lea edx, [ebp - 0x84]
push edx
push 1
mov eax, dword [ebp - 0x3c]
push eax
push ebx
call dword [ebp - 0x64]
test eax, eax
jne 0x4199b6
mov dword [ebp - 0x40], esi
jmp 0x4199c9
cmp dword [ebp - 0x40], esi
jne 0x4199c9
mov ecx, dword [ebp - 0x4c]
mov byte [ecx], 0
jmp 0x4199c9
mov ebx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x30]
mov dword [ebp - 4], 0xfffffffe
call fcn.004199e4
cmp dword [ebp - 0x40], 1
sete al
jmp 0x419a24
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00497164
mov esp, ebp
pop ebp
ret