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

Disassembly:
mov rax, rsp
mov dword [rax + 0x20], r9d
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x78
mov rcx, qword gs:[0x60]
xor eax, eax
mov rdi, rdx
mov r8d, 0x208
mov ebx, r9d
mov r12d, eax
mov r15d, eax
mov rcx, qword [rcx + 0x30]
lea edx, [rax + 8]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
xor r9d, r9d
mov qword [rbp - 0x18], rax
test rax, rax
je 0x1800522bb
lea r14d, [rbx + 1]
mov ebx, r9d
imul r14d, dword [rdi]
imul esi, r14d, 0xe
mov dword [rbp - 0x40], r14d
add esi, 0x1048
test rbx, rbx
je 0x180052002
mov rcx, qword gs:[0x60]
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov rcx, qword gs:[0x60]
mov edx, 8
mov r8d, esi
mov r13d, esi
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov rbx, rax
test rax, rax
je 0x18005225d
mov r8d, r13d
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov rax, qword [rbp + 0x48]
xor r9d, r9d
mov r10d, 0xfffffff8
movups xmm0, xmmword [rax]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbx + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
lea eax, [r14*8 + 0x43]
and eax, r10d
mov ecx, eax
mov dword [rbx + 0x38], ecx
movups xmmword [rbx + 0x20], xmm0
mov dword [rbx + 0x2c], 9
lea edx, [rax + r14*4]
mov dword [rbx], esi
lea r8, [rax + rbx]
mov dword [rbx + 0xc], r9d
mov word [rdx + rbx], r9w
test r14d, r14d
je 0x180052099
mov ecx, r14d
mov rdi, r8
mov eax, edx
rep stosd dword [rdi], eax
mov rdi, qword [rbp + 0x50]
lea r14d, [r14*2 + 7]
mov eax, esi
add r14d, edx
mov r12d, r9d
and r14d, r10d
sub eax, r14d
mov dword [rbp - 0x44], r14d
shr eax, 1
mov dword [rbp - 0x48], eax
mov eax, r9d
mov dword [rbx + 0x30], r14d
mov dword [rbp - 0x38], eax
cmp eax, dword [rdi]
jae 0x180052263
lea rax, [rax + rax*2]
mov r13d, dword [rdi + rax*4 + 4]
add r13, rdi
mov qword [rbp - 0x30], rax
test byte [rdi + rax*4 + 0xc], 1
jne 0x1800520f8
mov rcx, qword [rbp - 0x18]
lea rdx, [r13 + 2]
call fcn.180052748
mov r13, rax
xor r9d, r9d
mov rax, qword [rbp - 0x30]
test r13, r13
je 0x180052239
mov eax, dword [rdi + rax*4 + 8]
lea r8, [rbp - 0x48]
add rax, rdi
lea rdx, [rbp - 0x44]
mov qword [rbp - 0x20], rax
mov r9, r13
mov eax, r12d
mov rcx, rbx
mov dword [rbx + rax*8 + 0x3c], r14d
call fcn.1800522d8
test al, al
je 0x180052252
mov r9, qword [rbp - 0x20]
lea r8, [rbp - 0x48]
lea rdx, [rbp - 0x44]
mov rcx, rbx
call fcn.1800522d8
xor r9d, r9d
test al, al
je 0x180052252
mov r14d, dword [rbp - 0x44]
mov eax, r14d
mov ecx, r12d
inc r12d
mov dword [rbp - 0x3c], r9d
sub eax, dword [rbx + rcx*8 + 0x3c]
mov dword [rbx + rcx*8 + 0x40], eax
cmp dword [rbp + 0x60], r9d
jbe 0x180052239
mov r8, qword [rbp + 0x58]
mov edi, dword [rbp - 0x48]
mov qword [rbp - 0x30], r8
mov dword [rbx + r12*8 + 0x3c], r14d
cmp edi, 1
jbe 0x180052243
mov eax, r14d
lea edx, [rdi - 1]
add rax, rbx
mov r9, r13
mov qword [rbp - 0x10], rax
lea rcx, [rax + 2]
lea rax, [rbp + 0x68]
mov qword [rsp + 0x28], rax
mov rax, qword [r8]
lea r8, [rbp - 0x28]
mov qword [rsp + 0x20], rax
call fcn.180051e58
xor r9d, r9d
mov r15d, eax
test eax, eax
jne 0x180052218
cmp byte [rbp + 0x68], r9b
je 0x180052243
mov edx, dword [rbp - 0x28]
lea r8, [rbp - 0x48]
mov rcx, qword [rbp - 0x10]
mov r9, qword [rbp - 0x20]
lea edi, [rdx + rdx]
mov word [rcx], di
or ecx, 0xffffffff
sub ecx, edx
lea rdx, [rbp - 0x44]
add dword [rbp - 0x48], ecx
lea ecx, [rdi + 2]
add ecx, r14d
mov dword [rbp - 0x44], ecx
mov rcx, rbx
call fcn.1800522d8
xor r9d, r9d
test al, al
je 0x180052243
mov r14d, dword [rbp - 0x44]
mov eax, r14d
sub eax, dword [rbx + r12*8 + 0x3c]
mov edi, dword [rbp - 0x48]
mov dword [rbx + r12*8 + 0x40], eax
inc r12d
mov ecx, dword [rbp - 0x3c]
mov r8, qword [rbp - 0x30]
inc ecx
add r8, 8
mov dword [rbp - 0x3c], ecx
mov qword [rbp - 0x30], r8
cmp ecx, dword [rbp + 0x60]
jb 0x18005217c
mov rdi, qword [rbp + 0x50]
mov eax, dword [rbp - 0x38]
inc eax
jmp 0x1800520bf
mov r14d, dword [rbp - 0x40]
add esi, esi
mov rdi, qword [rbp + 0x50]
jmp 0x180051fe5
mov r14d, dword [rbp - 0x40]
add esi, esi
jmp 0x180051fe5
mov r15d, 8
test rbx, rbx
je 0x1800522a0
mov r9b, byte [rbp + 0x80]
mov rcx, rbx
mov r8, qword [rbp + 0x78]
mov rdx, qword [rbp + 0x70]
mov dword [rbx + 0x34], r12d
call fcn.1800532a8
mov rcx, qword gs:[0x60]
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
xor eax, eax
mov r15d, eax
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8, qword [rbp - 0x18]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x1800522c1
mov r15d, 8
mov eax, r15d
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret