Function at 0x170061b50
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
and rsp, 0xfffffffffffffff0
mov edi, edx
mov rsi, rcx
test byte [0x17008d9f8], 8
je 0x170061b9f
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rsi
lea rdx, [0x17008d9f8]
lea r8, [0x17007a150]
lea r9, str.teb_fls_data__p__flags__x._n
mov ecx, 3
call fcn.170060eb0
cmp edi, 4
jb 0x170061bcd
test byte [0x17008d9f8], 1
je 0x170061bcd
mov dword [rsp + 0x20], edi
lea rdx, [0x17008d9f8]
lea r8, [0x17007a150]
lea r9, str.Unknown_flags__x._n
xor ecx, ecx
call fcn.170060eb0
test rsi, rsi
je 0x170061db9
test dil, 1
je 0x170061cfc
mov dword [rsp + 0x34], edi
lea rcx, [0x17008da60]
call sym.ntdll.dll_RtlEnterCriticalSection
xor ebx, ebx
lea rdi, [0x17008da08]
lea r13, str.Calling_FLS_callback__p__arg__p._n
jmp 0x170061c1e
add rbx, 1
cmp rbx, 8
je 0x170061cd7
mov rax, qword [rsi + rbx*8 + 0x10]
test rax, rax
je 0x170061c10
mov rdx, qword [rdi + rbx*8]
test rdx, rdx
je 0x170061c10
cmp dword [rdx], 0
je 0x170061c10
mov r14d, 0x10
mov ecx, ebx
shl r14d, cl
cmp r14d, 2
mov ecx, 1
cmovb r14d, ecx
shl r14, 3
mov r15d, 8
nop dword [rax + rax]
mov rcx, qword [rax + r15]
test rcx, rcx
je 0x170061cbf
mov r12, qword [rdx + r15*2]
lea rdx, [r12 + 1]
cmp rdx, 2
jb 0x170061cb7
test byte [0x17008d9e8], 8
je 0x170061caf
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r12
mov ecx, 3
lea rdx, [0x17008d9e8]
lea r8, [0x17007a150]
mov r9, r13
call fcn.170060eb0
mov rax, qword [rsi + rbx*8 + 0x10]
mov rcx, qword [rax + r15]
call r12
mov rax, qword [rsi + rbx*8 + 0x10]
mov qword [rax + r15], 0
cmp r14, r15
je 0x170061c10
mov rdx, qword [rdi + rbx*8]
mov rax, qword [rsi + rbx*8 + 0x10]
add r15, 8
jmp 0x170061c60
mov rax, qword [rsi]
mov rcx, qword [rsi + 8]
mov qword [rax + 8], rcx
mov rax, qword [rsi]
mov rcx, qword [rsi + 8]
mov qword [rcx], rax
lea rcx, [0x17008da60]
call sym.ntdll.dll_RtlLeaveCriticalSection
mov edi, dword [rsp + 0x34]
test dil, 2
je 0x170061db9
mov rdi, qword gs:[0x30]
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
mov r8, qword [rsi + 0x10]
xor edx, edx
call sym.ntdll.dll_RtlFreeHeap
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
mov r8, qword [rsi + 0x18]
xor edx, edx
call sym.ntdll.dll_RtlFreeHeap
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
mov r8, qword [rsi + 0x20]
xor edx, edx
call sym.ntdll.dll_RtlFreeHeap
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
mov r8, qword [rsi + 0x28]
xor edx, edx
call sym.ntdll.dll_RtlFreeHeap
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
mov r8, qword [rsi + 0x30]
xor edx, edx
call sym.ntdll.dll_RtlFreeHeap
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
mov r8, qword [rsi + 0x38]
xor edx, edx
call sym.ntdll.dll_RtlFreeHeap
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
mov r8, qword [rsi + 0x40]
xor edx, edx
call sym.ntdll.dll_RtlFreeHeap
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
mov r8, qword [rsi + 0x48]
xor edx, edx
call sym.ntdll.dll_RtlFreeHeap
mov rax, qword [rdi + 0x60]
mov rcx, qword [rax + 0x30]
xor edx, edx
mov r8, rsi
call sym.ntdll.dll_RtlFreeHeap
nop
lea rsp, [rbp + 8]
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret