Function at 0x40b890
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0xc
mov eax, dword [0x44b52c]
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov dword [esp + 0x10], 0
xor ebx, ebx
mov dword [esp + 0x18], ebp
xor edi, edi
test eax, eax
jne 0x40bb17
cmp byte [0x44b4b6], bl
jne 0x40ba16
mov ecx, str.advapi32.dll
mov byte [0x44b4b6], 1
call fcn.0040ed20
mov dword [0x44b520], eax
test eax, eax
je 0x40ba0d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetSecurityInfo
push eax
call esi
mov dword [0x44bd90], eax
test eax, eax
je 0x40ba0d
mov eax, dword [0x44b520]
test eax, eax
je 0x40ba07
push str.SetSecurityInfo
push eax
call esi
mov dword [0x44bda4], eax
test eax, eax
je 0x40ba0d
mov eax, dword [0x44b520]
test eax, eax
je 0x40b9f8
push str.OpenProcessToken
push eax
call esi
mov dword [0x44bda8], eax
test eax, eax
je 0x40ba0d
mov eax, dword [0x44b520]
test eax, eax
je 0x40b9e9
push str.GetTokenInformation
push eax
call esi
mov dword [0x44bda0], eax
test eax, eax
je 0x40ba0d
mov eax, dword [0x44b520]
test eax, eax
je 0x40b9da
push str.InitializeSecurityDescriptor
push eax
call esi
mov dword [0x44bd98], eax
test eax, eax
je 0x40ba0d
mov eax, dword [0x44b520]
test eax, eax
je 0x40b9cb
push str.SetSecurityDescriptorOwner
push eax
call esi
mov dword [0x44bd9c], eax
test eax, eax
je 0x40ba0d
mov eax, dword [0x44b520]
test eax, eax
je 0x40b9bc
push str.SetEntriesInAclA
push eax
call esi
mov dword [0x44bd94], eax
test eax, eax
je 0x40ba0d
mov al, 1
mov byte [0x44b4b7], al
jmp 0x40ba1b
xor al, al
mov dword [0x44bd94], ebx
mov byte [0x44b4b7], al
jmp 0x40ba1b
xor al, al
mov dword [0x44bd9c], ebx
mov byte [0x44b4b7], al
jmp 0x40ba1b
xor al, al
mov dword [0x44bd98], ebx
mov byte [0x44b4b7], al
jmp 0x40ba1b
xor al, al
mov dword [0x44bda0], ebx
mov byte [0x44b4b7], al
jmp 0x40ba1b
xor al, al
mov dword [0x44bda8], ebx
mov byte [0x44b4b7], al
jmp 0x40ba1b
mov dword [0x44bda4], ebx
xor al, al
mov byte [0x44b4b7], al
jmp 0x40ba1b
mov al, byte [0x44b4b7]
test al, al
je 0x40baed
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
test ebp, ebp
je 0x40baeb
lea eax, [esp + 0x10]
push eax
push 8
push ebp
call dword [0x44bda8]
test eax, eax
je 0x40bade
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 1
push dword [esp + 0x20]
call dword [0x44bda0]
test eax, eax
jne 0x40ba7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40bade
push dword [esp + 0x14]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x40bade
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push ebx
push 1
push dword [esp + 0x20]
call dword [0x44bda0]
test eax, eax
je 0x40bade
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
mov edx, 1
push 0
mov ecx, esi
call fcn.00410610
add esp, 4
mov edi, eax
push dword [ebx]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x40bade
mov dword [0x44b52c], edi
mov dword [esp + 0x18], edi
xor edi, edi
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x18]
jmp 0x40baed
xor ebp, ebp
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40bafc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x40bb07
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, edi
je 0x40bb15
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret