Function at 0x4052d0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ee30
push 0x407180
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x34], ecx
cmp dword [0x4127cc], ebx
jne 0x40539a
mov dword [0x4127cc], 1
push str.ADVAPI32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x4127c8], eax
cmp eax, ebx
je 0x40539a
push str.OpenProcessToken
push eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call esi
mov dword [0x4127c4], eax
push str.GetTokenInformation
mov edx, dword [0x4127c8]
push edx
call esi
mov dword [0x4127c0], eax
push str.LookupAccountSidA
mov eax, dword [0x4127c8]
push eax
call esi
mov dword [0x4127bc], eax
push str.GetKernelObjectSecurity
mov ecx, dword [0x4127c8]
push ecx
call esi
mov dword [0x4127b8], eax
push 0x40edd0
mov edx, dword [0x4127c8]
push edx
call esi
mov dword [reloc.ADVAPI32.dll_GetSecurityDescriptorOwner], eax
cmp dword [0x4127c4], ebx
je 0x405443
cmp dword [0x4127c0], ebx
je 0x405443
mov edi, dword [ebp + 0xc]
cmp edi, ebx
je 0x4053bd
mov esi, edi
jmp 0x4053cf
mov eax, dword [ebp + 8]
push eax
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, ebx
je 0x405443
lea ecx, [ebp - 0x20]
push ecx
push 8
push edi
call dword [0x4127c4]
test eax, eax
je 0x405443
lea edx, [ebp - 0x24]
push edx
push ebx
push ebx
push 1
mov eax, dword [ebp - 0x20]
push eax
call dword [0x4127c0]
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00406570
add esp, 4
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x40542a
lea edx, [ebp - 0x24]
push edx
mov ecx, dword [ebp - 0x24]
push ecx
push eax
push 1
mov edx, dword [ebp - 0x20]
push edx
call dword [0x4127c0]
test eax, eax
je 0x40542a
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x405438
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
jne 0x405443
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], ebx
jne 0x4054b1
cmp dword [0x4127b8], ebx
je 0x4054b1
cmp dword [reloc.ADVAPI32.dll_GetSecurityDescriptorOwner], ebx
je 0x4054b1
mov edx, dword [ebp + 8]
push edx
push ebx
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, ebx
je 0x4054b1
mov dword [ebp - 0x30], ebx
lea eax, [ebp - 0x30]
push eax
push 0xc8
lea ecx, [ebp - 0x108]
push ecx
push 1
push esi
call dword [0x4127b8]
test eax, eax
je 0x4054aa
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
test eax, eax
jne 0x4054aa
mov dword [ebp - 0x1c], ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4127bc]
cmp eax, ebx
je 0x4054f5
mov dword [ebp - 4], ebx
lea edx, [ebp - 0x40]
push edx
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp + 0x18]
push edx
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp - 0x1c]
push ecx
push ebx
call eax
test eax, eax
je 0x4054ee
mov dword [ebp - 0x2c], 1
jmp 0x4054ee
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x28]
push edx
call fcn.004069e8
add esp, 4
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret