Function at 0x408117
Capabilities:
Inspect section memory permissions

Disassembly:
push 0x20
mov eax, 0x4300a6
call fcn.0041ae41
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], 0xc0000
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], ebx
jne 0x408155
lea ecx, [eax - 0x10]
call fcn.00401128
push 3
pop eax
call fcn.0041aee0
ret 0x1c
cmp dword [ebp + 0xc], ebx
jne 0x40816c
push 3
pop ebx
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401128
mov eax, ebx
jmp 0x40814d
cmp dword [esi + 0x14], ebx
jne 0x4081d3
mov eax, dword [esi + 0x1c]
cmp dword [eax - 0xc], ebx
je 0x4081ac
cmp dword [esi + 0x20], ebx
je 0x4081ac
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [esi + 0x14], eax
jne 0x408196
mov dword [esi + 0x2c], ebx
push 0x2e
jmp 0x40815c
xor ecx, ecx
inc ecx
push ecx
push eax
mov dword [esi + 0x2c], ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x4081d3
push 0x2d
jmp 0x40815c
push dword [ebp + 0x10]
lea eax, [ebp + 8]
push ecx
mov dword [ebp - 0x28], esp
mov ecx, esp
push eax
call fcn.00408f26
mov ecx, dword [ebp + 0xc]
mov edx, esi
call fcn.00407df4
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x4081d3
mov ebx, eax
jmp 0x40815d
mov eax, dword [ebp + 0x10]
xor edi, edi
inc edi
and eax, edi
mov dword [ebp - 0x24], eax
je 0x408205
push ecx
mov ecx, esp
mov dword [ebp - 0x28], esp
push str.SeTakeOwnershipPrivilege
call fcn.00408779
push dword [esi + 0x28]
mov eax, edi
call fcn.00407614
cmp eax, ebx
je 0x408205
push 0xc
jmp 0x40815c
mov eax, dword [ebp + 0x10]
and eax, 8
mov dword [ebp - 0x20], eax
je 0x408238
push ecx
mov ecx, esp
mov dword [ebp - 0x28], esp
xor edi, edi
push str.SeSecurityPrivilege
inc edi
call fcn.00408779
push dword [esi + 0x28]
mov eax, edi
call fcn.00407614
cmp eax, ebx
jne 0x4081fe
mov dword [ebp - 0x18], 0x10c0000
mov eax, dword [ebp + 0x10]
and eax, 4
mov dword [ebp - 0x28], eax
je 0x40826b
mov edi, dword [ebp + 0x14]
push ebx
push edi
push 1
push dword [esi + 0x14]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x4082fb
cmp dword [esi + 4], edi
je 0x40826b
call fcn.00407d80
mov dword [esi + 4], edi
mov dword [esi + 0x30], ebx
cmp dword [ebp - 0x20], ebx
je 0x408298
mov edi, dword [ebp + 0x18]
push ebx
push edi
push 1
push dword [esi + 0x14]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorSacl]
test eax, eax
je 0x40830b
cmp dword [esi + 8], edi
je 0x408298
call fcn.00407d9d
mov dword [esi + 8], edi
mov dword [esi + 0x34], ebx
cmp dword [ebp - 0x24], ebx
je 0x4082bf
mov edi, dword [ebp + 0x1c]
push ebx
push edi
push dword [esi + 0x14]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0x40831b
cmp dword [esi + 0xc], edi
je 0x4082bf
call fcn.00407dba
mov dword [esi + 0xc], edi
mov dword [esi + 0x38], ebx
test byte [ebp + 0x10], 2
je 0x4082e7
mov edi, dword [ebp + 0x20]
push ebx
push edi
push dword [esi + 0x14]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorGroup]
test eax, eax
je 0x40832b
cmp dword [esi + 0x10], edi
je 0x4082e7
call fcn.00407dd7
mov dword [esi + 0x10], edi
mov dword [esi + 0x3c], ebx
push dword [esi + 0x14]
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
jne 0x40833b
push 0x26
jmp 0x40815c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x18], eax
push 0x27
jmp 0x40815c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x18], eax
push 0x28
jmp 0x40815c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x18], eax
push 0x29
jmp 0x40815c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x18], eax
push 0x2a
jmp 0x40815c
cmp dword [esi + 0x40], ebx
je 0x408478
mov eax, dword [esi + 0x20]
cmp eax, 1
jne 0x408379
mov eax, dword [esi + 0x1c]
push ebx
push 0x2000000
push 3
push ebx
push ebx
push dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
je 0x408478
cmp eax, ebx
je 0x408478
jmp 0x4083a0
cmp eax, 4
jne 0x408478
lea eax, [ebp - 0x14]
push eax
lea eax, [esi + 0x1c]
push eax
push dword [esi + 0x28]
call fcn.0040414a
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x408478
mov eax, dword [ebp - 0x14]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x40845c
cmp dword [ebp - 0x28], ebx
mov edi, dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorControl]
je 0x4083ca
mov eax, 0x500
push eax
push eax
push dword [esi + 0x14]
call edi
test eax, eax
je 0x40845c
cmp dword [ebp - 0x20], ebx
je 0x4083df
mov eax, 0xa00
push eax
push eax
push dword [esi + 0x14]
call edi
test eax, eax
je 0x40845c
test dword [ebp + 0x10], 0x80000000
je 0x4083f8
mov eax, 0x1000
push eax
push eax
push dword [esi + 0x14]
call edi
test eax, eax
je 0x40845c
test dword [ebp + 0x10], 0x40000000
je 0x408411
mov eax, 0x2000
push eax
push eax
push dword [esi + 0x14]
call edi
test eax, eax
je 0x40845c
test dword [ebp + 0x10], 0x20000000
je 0x408429
push ebx
push 0x1000
push dword [esi + 0x14]
call edi
test eax, eax
je 0x40845c
test dword [ebp + 0x10], 0x10000000
je 0x408441
push ebx
push 0x2000
push dword [esi + 0x14]
call edi
test eax, eax
je 0x40845c
push dword [esi + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
test eax, eax
je 0x40845c
mov dword [esi + 0x18], ebx
jmp 0x40815d
cmp dword [ebp - 0x1c], ebx
je 0x40846a
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], ebx
je 0x408478
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edi, [esi + 0x1c]
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
inc eax
push eax
mov ecx, edi
call fcn.00408ff1
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
push 0xffffffffffffffff
mov ecx, edi
mov dword [esi + 0x18], eax
call fcn.00408daf
cmp dword [esi + 0x18], ebx
je 0x4084ba
mov dword [ebp - 0x10], 0x19
mov ebx, dword [ebp - 0x10]
jmp 0x40815d