Function at 0x1009a96
Capabilities:
Link many functions at runtime

Disassembly:
mov eax, 0x107fae0
call fcn.0105c800
sub esp, 0x70
mov eax, dword [0x1098824]
push ebx
push edi
mov dword [ebp - 0x24], ecx
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x44]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.0101735f
mov eax, dword [ebp - 0x44]
pop ecx
cmp eax, 2
je 0x1009c63
cmp eax, 3
je 0x1009c63
cmp eax, 4
je 0x1009c63
cmp eax, 1
je 0x1009c63
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x20], edi
je 0x1009c84
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.OpenProcessToken
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x1009c57
push str.OpenThreadToken
push edi
call esi
test eax, eax
je 0x1009c57
push str.GetSecurityInfo
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x28], eax
je 0x1009c57
push str.GetEffectiveRightsFromAclA
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0x2c], eax
je 0x1009c57
push str.GetTokenInformation
push edi
call esi
mov edi, eax
cmp edi, ebx
je 0x1009c57
push str.BuildTrusteeWithSidA
push dword [ebp - 0x20]
call esi
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x1009c57
lea eax, [ebp - 0x18]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0x14]
test eax, eax
je 0x1009c51
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push eax
push ebx
push ebx
push 1
push dword [ebp - 0x18]
call edi
cmp dword [ebp - 0x14], ebx
jbe 0x1009c46
push dword [ebp - 0x14]
call fcn.0105c396
mov esi, eax
pop ecx
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push esi
push 1
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x1009c3f
push dword [esi]
lea eax, [ebp - 0x6c]
push eax
call dword [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocStringLen
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x1009c3f
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push ebx
push eax
push ebx
push ebx
push 4
push 1
push edi
call dword [ebp - 0x28]
test eax, eax
jl 0x1009c38
push dword [esi]
lea eax, [ebp - 0x58]
push eax
call dword [ebp - 0x1c]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x24]
call dword [ebp - 0x2c]
test eax, eax
jl 0x1009c2f
mov eax, dword [ebp - 0x28]
and eax, dword [ebp + 8]
cmp eax, dword [ebp + 8]
sete byte [ebp - 0xd]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0105b157
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1009c57
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
jmp 0x1009c84
test word [ebp + 0xa], 0x4001
je 0x1009c84
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x7c]
push eax
call fcn.01009a46
test al, al
je 0x1009c84
test byte [ebp - 0x7c], 1
je 0x1009c84
mov byte [ebp - 0xd], bl
lea ecx, [ebp - 0x34]
call fcn.01001190
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret 4