Function at 0x40aeb0
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
push ebx
mov ebx, dword [sym.imp.RTX_RTSS.SYS_RtReleaseMutex]
push esi
push edi
mov edi, dword [sym.imp.RTX_RTSS.SYS_InterlockedDecrement]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], 0x800
xor esi, esi
mov edi, edi
mov ecx, dword [ebp + 8]
lea eax, [ebp - 4]
push eax
push esi
push 0x8000000f
push ecx
call fcn.00409300
add esi, dword [ebp - 4]
mov edx, 0x800
sub edx, esi
add esp, 0x10
mov dword [ebp - 4], edx
cmp eax, 0x4d5
jne 0x40af75
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xc]
add ecx, 0x34
push ecx
call edi
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax + 0x30]
push ecx
call ebx
push 1
call dword [sym.imp.RTX_RTSS.SYS_Sleep]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax + 0x30]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.RTX_RTSS.SYS_RtWaitForSingleObject]
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
add eax, 0x34
push eax
call dword [sym.imp.RTX_RTSS.SYS_InterlockedIncrement]
cmp eax, 1
je 0x40af69
push 0x2c5
push 0x55260c
push 0x55263c
call dword [sym.imp.RTX_RTSS.SYS_RtPrintf]
add esp, 0xc
cmp esi, 0x800
jb 0x40aee0
mov dword [ebp - 4], 0x100
xor esi, esi
mov edi, edi
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 4]
push ecx
lea edx, [esi + 0x40000000]
push edx
push 0x8000000f
push ebx
call fcn.00409300
add esi, dword [ebp - 4]
mov ecx, 0x100
sub ecx, esi
add esp, 0x10
mov dword [ebp - 4], ecx
cmp eax, 0x4d5
jne 0x40afb8
cmp esi, 0x100
jb 0x40af80
mov dword [ebp - 4], 0x20000000
xor esi, esi
lea edx, [ebp - 4]
push edx
lea eax, [esi + 0x20000000]
push eax
push 0x8000000f
push ebx
call fcn.00409300
add esi, dword [ebp - 4]
mov ecx, 0x20000000
sub ecx, esi
add esp, 0x10
mov dword [ebp - 4], ecx
cmp eax, 0x4d5
jne 0x40aff6
cmp esi, 0x20000000
jb 0x40afc1
mov esi, dword [ebp - 8]
lea edx, [esi + 0xa8]
push 0
push edx
call dword [0x552870]
lea eax, [esi + 0x50]
push 0
push eax
call dword [0x552870]
add esp, 0x10
test eax, eax
je 0x40b022
mov dword [esi + 0x68], 1
mov ecx, dword [ebp - 0xc]
cmp ebx, dword [ecx + 0x474]
jne 0x40b0fa
mov edi, dword [ebx]
cmp byte [edi + 0x1c], 0
jne 0x40b0fa
mov eax, dword [edi + 0xc]
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 0
jmp 0x40b053
mov eax, dword [ebp - 4]
cmp ebx, dword [eax + 0x474]
jne 0x40b0fa
push 0
mov dword [eax + 0x474], 0
mov edx, dword [edi + 0xc]
push 7
push edx
call fcn.00400f70
add esp, 0xc
cmp eax, 1
jne 0x40b0e1
mov eax, dword [edi + 0x30]
lea edx, [edi + 0x30]
cmp edx, eax
je 0x40b0a4
test eax, eax
je 0x40b0a4
lea esp, [esp]
mov ecx, dword [eax + 8]
and dword [ecx + 0x44], 0xb7ffffff
mov eax, dword [eax]
cmp edx, eax
je 0x40b0a4
test eax, eax
jne 0x40b090
mov esi, dword [ebp - 4]
add esi, 0x34
lea ebx, [ebx]
mov eax, dword [esi]
cmp esi, eax
je 0x40b0e7
test eax, eax
je 0x40b0e7
mov ecx, dword [eax + 8]
test dword [ecx + 0x44], 0x80000000
je 0x40b0b0
cmp dword [ecx + 0x3c], ebx
jne 0x40b0b0
mov ecx, dword [eax]
test ecx, ecx
je 0x40b0b0
mov edx, dword [eax + 4]
mov dword [edx], ecx
mov dword [ecx + 4], edx
mov dword [eax], 0
jmp 0x40b0b0
test eax, eax
jne 0x40b0fa
jmp 0x40b0ea
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, 1
jb 0x40b050
mov edi, dword [esi + 0x30]
lea eax, [esi + 0x30]
cmp eax, edi
je 0x40b202
mov dword [ebp - 4], edi
test edi, edi
je 0x40b202
jmp 0x40b117
mov edi, ecx
mov esi, dword [edi + 8]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xc]
push esi
push 4
push ecx
call fcn.00400f70
mov eax, dword [esi + 0x20]
lea edx, [esi + 0x20]
add esp, 0xc
mov dword [ebp - 0x10], edx
test eax, eax
je 0x40b147
mov ecx, dword [edx + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov dword [edx], 0
mov ecx, dword [esi]
mov eax, dword [ebp - 0xc]
mov ebx, ecx
shr ebx, 0x16
mov esi, dword [eax + ebx*4 + 0x70]
test esi, esi
je 0x40b1b8
mov edi, ecx
shr edi, 0xb
and edi, 0x7ff
mov eax, dword [esi + edi*4]
test eax, eax
je 0x40b1b5
and ecx, 0x7ff
cmp dword [eax + ecx*4], 0
je 0x40b1b5
mov dword [eax + ecx*4], 0
dec dword [eax + 0x2000]
jne 0x40b1b5
push eax
call fcn.0040b580
add esp, 4
mov dword [esi + edi*4], 0
dec dword [esi + 0x2000]
jne 0x40b1b2
push esi
call fcn.0040b580
mov ecx, dword [ebp - 0xc]
add esp, 4
mov dword [ecx + ebx*4 + 0x70], 0
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 4]
mov eax, dword [edi]
test eax, eax
je 0x40b1cc
mov ecx, dword [edi + 4]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov dword [edi], 0
cmp dword [edx], 0
jne 0x40b1e4
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x40]
add eax, 0x3c
mov dword [edx], eax
mov dword [edx + 4], ecx
mov dword [eax + 4], edx
mov dword [ecx], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x30]
add eax, 0x30
cmp eax, ecx
je 0x40b1fc
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x40b115
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 8]
push 0
push 0
push 0x3e3
push ebx
call fcn.00408e90
mov eax, dword [ebx]
add esp, 0x10
cmp dword [eax + 0xc4], 0
je 0x40b23c
mov edx, dword [eax + 0x14]
push 0
mov dword [eax + 0xc4], 0
mov eax, dword [edx + 0x14]
push 0x3e3
push ebx
call eax
add esp, 0xc
mov ecx, dword [esi + 0x70]
cmp ecx, dword [esi + 0x78]
jne 0x40b26d
cmp dword [esi + 0x80], 0
jne 0x40b26d
cmp byte [esi + 0x1e], 0
jne 0x40b26d
mov esi, dword [esi + 0x14]
push ebx
call fcn.0040a5a0
mov edx, dword [esi]
push ebx
call edx
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov byte [esi + 0x1c], 1
pop esi
mov eax, 0xaa
pop ebx
mov esp, ebp
pop ebp
ret