Function at 0x406d92
Capabilities:
Inspect section memory permissions

Disassembly:
push 0x1c
mov eax, 0x42e83b
call fcn.00419920
mov esi, ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp dword [eax - 0xc], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], 0xc0000
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], ebx
jne 0x406dd0
lea ecx, [eax - 0x10]
call fcn.00401128
push 3
pop eax
call fcn.00419989
ret 0x1c
cmp dword [ebp + 0xc], ebx
jne 0x406de7
push 3
pop esi
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401128
mov eax, esi
jmp 0x406dc8
cmp dword [esi + 0x14], ebx
jne 0x406e4e
mov eax, dword [esi + 0x1c]
cmp dword [eax - 0xc], ebx
je 0x406e27
cmp dword [esi + 0x20], ebx
je 0x406e27
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [esi + 0x14], eax
jne 0x406e11
mov dword [esi + 0x2c], ebx
push 0x2e
jmp 0x406dd7
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 0x406e4e
push 0x2d
jmp 0x406dd7
push dword [ebp + 0x10]
lea eax, [ebp + 8]
push dword [ebp + 0xc]
push ecx
mov dword [ebp - 0x28], esp
mov ecx, esp
push eax
call fcn.00401f54
mov ecx, esi
call fcn.00406a67
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x406e4e
mov esi, eax
jmp 0x406dd8
mov eax, dword [ebp + 0x10]
and eax, 1
mov dword [ebp - 0x24], eax
je 0x406e7e
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x28], esp
push 0x43217c
call fcn.00404c55
mov ecx, dword [esi + 0x28]
call fcn.004021eb
cmp eax, ebx
je 0x406e7e
push 0xc
jmp 0x406dd7
mov eax, dword [ebp + 0x10]
and eax, 8
mov dword [ebp - 0x20], eax
je 0x406eae
push 1
push ecx
mov ecx, esp
mov dword [ebp - 0x28], esp
push str.SeSecurityPrivilege
call fcn.00404c55
mov ecx, dword [esi + 0x28]
call fcn.004021eb
cmp eax, ebx
jne 0x406e77
mov dword [ebp - 0x18], 0x10c0000
mov eax, dword [ebp + 0x10]
and eax, 4
mov dword [ebp - 0x28], eax
je 0x406ee3
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 0x406f79
cmp dword [esi + 4], edi
je 0x406ee3
mov ecx, esi
call fcn.00401776
mov dword [esi + 4], edi
mov dword [esi + 0x30], ebx
cmp dword [ebp - 0x20], ebx
je 0x406f12
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 0x406f89
cmp dword [esi + 8], edi
je 0x406f12
mov ecx, esi
call fcn.00401797
mov dword [esi + 8], edi
mov dword [esi + 0x34], ebx
cmp dword [ebp - 0x24], ebx
je 0x406f3b
mov edi, dword [ebp + 0x1c]
push ebx
push edi
push dword [esi + 0x14]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0x406f99
cmp dword [esi + 0xc], edi
je 0x406f3b
mov ecx, esi
call fcn.004017b8
mov dword [esi + 0xc], edi
mov dword [esi + 0x38], ebx
test byte [ebp + 0x10], 2
je 0x406f65
mov edi, dword [ebp + 0x20]
push ebx
push edi
push dword [esi + 0x14]
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorGroup]
test eax, eax
je 0x406fa9
cmp dword [esi + 0x10], edi
je 0x406f65
mov ecx, esi
call fcn.004017d9
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 0x406fb9
push 0x26
jmp 0x406dd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x18], eax
push 0x27
jmp 0x406dd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x18], eax
push 0x28
jmp 0x406dd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x18], eax
push 0x29
jmp 0x406dd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x18], eax
push 0x2a
jmp 0x406dd7
cmp dword [esi + 0x40], ebx
je 0x4070fd
mov eax, dword [esi + 0x20]
cmp eax, 1
jne 0x406ff7
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 0x4070fd
cmp eax, ebx
je 0x4070fd
jmp 0x40701e
cmp eax, 4
jne 0x4070fd
mov ecx, dword [esi + 0x28]
lea eax, [ebp - 0x14]
push eax
lea eax, [esi + 0x1c]
push eax
call fcn.00403586
cmp eax, ebx
mov dword [ebp - 0x10], eax
jne 0x4070fd
mov eax, dword [ebp - 0x14]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x4070e1
cmp dword [ebp - 0x28], ebx
mov edi, dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorControl]
je 0x407048
mov eax, 0x500
push eax
push eax
push dword [esi + 0x14]
call edi
test eax, eax
je 0x4070e1
cmp dword [ebp - 0x20], ebx
je 0x407061
mov eax, 0xa00
push eax
push eax
push dword [esi + 0x14]
call edi
test eax, eax
je 0x4070e1
test dword [ebp + 0x10], 0x80000000
je 0x40707a
mov eax, 0x1000
push eax
push eax
push dword [esi + 0x14]
call edi
test eax, eax
je 0x4070e1
test dword [ebp + 0x10], 0x40000000
mov ebx, 0x2000
je 0x407093
push ebx
push ebx
push dword [esi + 0x14]
call edi
test eax, eax
je 0x4070df
test dword [ebp + 0x10], 0x20000000
je 0x4070ac
push 0
push 0x1000
push dword [esi + 0x14]
call edi
test eax, eax
je 0x4070df
test dword [ebp + 0x10], 0x10000000
je 0x4070c1
push 0
push ebx
push dword [esi + 0x14]
call edi
test eax, eax
je 0x4070df
push dword [esi + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
test eax, eax
je 0x4070df
and dword [esi + 0x18], 0
xor esi, esi
jmp 0x406dd8
xor ebx, ebx
cmp dword [ebp - 0x1c], ebx
je 0x4070ef
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], ebx
je 0x4070fd
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.00401f72
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.00401c6d
cmp dword [esi + 0x18], ebx
je 0x40713f
mov dword [ebp - 0x10], 0x19
mov esi, dword [ebp - 0x10]
jmp 0x406dd8