Function at 0x401770
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdc
mov eax, dword [0x416710]
xor eax, ebp
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x20], 0
mov byte [ebp - 0x1f], 0
mov byte [ebp - 0x1e], 0
mov byte [ebp - 0x1d], 0
mov byte [ebp - 0x1c], 0
mov byte [ebp - 0x1b], 5
mov dword [ebp - 0xd0], 0x94
lea eax, [ebp - 0xd0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xc0], 2
je 0x4017c5
mov eax, 1
jmp 0x4019cc
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4017e3
mov eax, 1
jmp 0x4019cc
push 0x416034
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x40180a
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
jmp 0x4019cc
push str.OpenThreadToken
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
push str.OpenProcessToken
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xd8], eax
push str.GetTokenInformation
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x34], eax
push str.AllocateAndInitializeSid
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xd4], eax
push str.EqualSid
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xdc], eax
push str.FreeSid
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x30]
push eax
push 0
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [ebp - 0xc]
test eax, eax
jne 0x4018c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x4018c2
lea ecx, [ebp - 0x30]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0xd8]
test eax, eax
jne 0x4018c0
xor eax, eax
jmp 0x4019cc
jmp 0x4018c9
xor eax, eax
jmp 0x4019cc
lea edx, [ebp - 0x14]
push edx
push 0
push 0
push 2
mov eax, dword [ebp - 0x30]
push eax
call dword [ebp - 0x34]
test eax, eax
je 0x4018e5
xor eax, eax
jmp 0x4019cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x4018f7
xor eax, eax
jmp 0x4019cc
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00406004
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x401913
xor eax, eax
jmp 0x4019cc
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 2
mov edx, dword [ebp - 0x30]
push edx
call dword [ebp - 0x34]
test eax, eax
jne 0x40193f
mov eax, dword [ebp - 8]
push eax
call fcn.00405d1c
add esp, 4
xor eax, eax
jmp 0x4019cc
lea ecx, [ebp - 0x10]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea edx, [ebp - 0x20]
push edx
call dword [ebp - 0xd4]
test eax, eax
jne 0x401976
mov eax, dword [ebp - 8]
push eax
call fcn.00405d1c
add esp, 4
xor eax, eax
jmp 0x4019cc
mov dword [ebp - 0x2c], 0
jmp 0x401988
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x2c]
cmp eax, dword [edx]
jae 0x4019b6
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + edx*8 + 4]
push ecx
call dword [ebp - 0xdc]
test eax, eax
je 0x4019b4
mov dword [ebp - 0x28], 1
jmp 0x4019b6
jmp 0x40197f
mov edx, dword [ebp - 8]
push edx
call fcn.00405d1c
add esp, 4
mov eax, dword [ebp - 0x10]
push eax
call dword [ebp - 4]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00405c1a
mov esp, ebp
pop ebp
ret