Function at 0x180100494
Capabilities:
Access peb ldr_data

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov qword [rax + 8], rcx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov r12, r9
mov r15, r8
mov r14d, edx
mov rbx, rcx
xor edi, edi
mov byte [rax - 0x48], dil
mov esi, edi
mov qword [rax - 0x40], rdi
test dword [rcx + 0x74], 0x1000000
je 0x1801004e7
mov rax, qword [0x180156408]
mov r10, qword [section..00cfg]
call r10
jmp 0x1801009c6
lea rdx, [0x180130da8]
call fcn.18001fc58
test al, al
je 0x180100973
mov eax, dword [rbx + 0x74]
or eax, 0x10000100
or r14d, eax
mov dword [rsp + 0x88], r14d
mov rax, r12
mov r13d, 1
test r12, r12
cmove rax, r13
add rax, qword [rbx + 0x100]
and rax, qword [rbx + 0x108]
add rax, 0x10
cmp rax, r12
jb 0x18010091f
cmp rax, qword [rbx + 0xc8]
ja 0x18010091f
mov word [rsp + 0x34], di
test r13b, r14b
jne 0x18010056c
mov rcx, qword [rbx + 0x160]
call sym.ntdll.dll_RtlEnterCriticalSection
mov byte [rsp + 0x30], r13b
or r14d, r13d
mov dword [rsp + 0x88], r14d
xor edx, edx
mov rcx, rbx
call fcn.1801010bc
lea rdx, [r15 - 0x10]
prefetchw byte [rdx]
cmp byte [rdx + 0xf], 5
jne 0x18010058e
movzx eax, byte [rdx + 0xe]
shl rax, 4
sub rdx, rax
mov qword [rsp + 0x40], rdx
lea r8, [0x180130da8]
mov rcx, rbx
call fcn.180072588
test al, al
je 0x180100805
mov rax, qword gs:[0x60]
cmp r15, qword [0x18015a7d0]
jne 0x18010060c
cmp qword [rax + 0x18], rdi
je 0x1801005e5
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
mov rdx, qword [rcx + 0x10]
add rdx, 0x58
lea rcx, str.HEAP__wZ_:
call sym.ntdll.dll_DbgPrint
jmp 0x1801005f1
lea rcx, str.HEAP:
call sym.ntdll.dll_DbgPrint
mov r8, r12
mov rdx, qword [0x18015a7d0]
lea rcx, str.About_to_reallocate_block_at__p_to__Ix_bytes_n
call sym.ntdll.dll_DbgPrint
jmp 0x18010071b
test dword [rax + 0xbc], 0x800
je 0x180100720
mov r8d, dword [0x18015a7d8]
test r8d, r8d
je 0x180100720
mov rsi, qword [rsp + 0x40]
cmp dword [rbx + 0x7c], edi
je 0x180100669
mov edx, dword [rbx + 0x88]
xor edx, dword [rsi + 8]
mov dword [rsi + 8], edx
mov ecx, edx
shr ecx, 0x10
mov eax, edx
shr eax, 8
xor cl, al
xor cl, dl
shr edx, 0x18
cmp dl, cl
je 0x180100669
mov rdx, rsi
mov rcx, rbx
call fcn.1800fbec0
mov r8d, dword [0x18015a7d8]
test byte [rsi + 0xa], 2
je 0x18010067d
mov rcx, rsi
call fcn.180063b6c
movzx ecx, word [rax + 2]
jmp 0x180100681
movzx ecx, byte [rsi + 0xb]
mov word [rsp + 0x34], cx
cmp dword [rbx + 0x7c], edi
je 0x1801006a0
mov al, byte [rsi + 0xa]
xor al, byte [rsi + 9]
xor al, byte [rsi + 8]
mov byte [rsi + 0xb], al
mov eax, dword [rbx + 0x88]
xor dword [rsi + 8], eax
test cx, cx
je 0x180100720
cmp cx, r8w
jne 0x180100720
movzx eax, word [0x18015a7da]
cmp word [rbx + 0xd0], ax
jne 0x180100720
mov rax, qword gs:[0x60]
cmp qword [rax + 0x18], rdi
je 0x1801006ed
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
mov rdx, qword [rcx + 0x10]
add rdx, 0x58
lea rcx, str.HEAP__wZ_:
call sym.ntdll.dll_DbgPrint
jmp 0x1801006f9
lea rcx, str.HEAP:
call sym.ntdll.dll_DbgPrint
movzx edx, word [rsp + 0x34]
mov rcx, rbx
call fcn.1800ec7bc
mov r9, rax
mov r8, r12
mov rdx, r15
lea rcx, str.About_to_rellocate_block_at__p_to_0x_Ix_bytes_with_tag__ws_n
call sym.ntdll.dll_DbgPrint
call fcn.18010109c
mov r9, r12
mov r8, r15
mov edx, dword [rsp + 0x88]
mov rcx, rbx
call sym.ntdll.dll_RtlReAllocateHeap
mov rsi, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x1801007f0
lea r14, [rax - 0x10]
prefetchw byte [r14]
cmp byte [r14 + 0xf], 5
jne 0x180100761
movzx eax, byte [r14 + 0xe]
shl rax, 4
sub r14, rax
cmp dword [rbx + 0x7c], edi
je 0x180100794
mov edx, dword [rbx + 0x88]
xor edx, dword [r14 + 8]
mov dword [r14 + 8], edx
mov ecx, edx
shr ecx, 0x10
mov eax, edx
shr eax, 8
xor cl, al
xor cl, dl
shr edx, 0x18
cmp dl, cl
je 0x180100794
mov rdx, r14
mov rcx, rbx
call fcn.1800fbec0
test byte [r14 + 0xa], 2
je 0x1801007c7
mov rcx, r14
call fcn.180063b6c
mov r15, rax
test dword [rbx + 0x70], 0x8000000
je 0x1801007bd
mov ecx, r13d
call fcn.1800244c4
mov word [r15], ax
jmp 0x1801007c0
mov word [rax], di
movzx eax, word [r15 + 2]
jmp 0x1801007cc
movzx eax, byte [r14 + 0xb]
mov word [rsp + 0x34], ax
cmp dword [rbx + 0x7c], edi
je 0x1801007f0
mov al, byte [r14 + 0xa]
xor al, byte [r14 + 9]
xor al, byte [r14 + 8]
mov byte [r14 + 0xb], al
mov eax, dword [rbx + 0x88]
xor dword [r14 + 8], eax
mov dl, r13b
mov rcx, rbx
call fcn.1801016bc
xor edx, edx
mov rcx, rbx
call fcn.1801010bc
test rsi, rsi
je 0x18010097b
mov rax, qword gs:[0x60]
mov rsi, qword [rsp + 0x38]
cmp rsi, qword [0x18015a7d0]
jne 0x18010087f
cmp qword [rax + 0x18], rdi
je 0x180100853
mov rax, qword gs:[0x60]
mov rdx, qword [rax + 0x18]
mov rdx, qword [rdx + 0x10]
add rdx, 0x58
lea rcx, str.HEAP__wZ_:
call sym.ntdll.dll_DbgPrint
mov rsi, qword [rsp + 0x38]
jmp 0x18010085f
lea rcx, str.HEAP:
call sym.ntdll.dll_DbgPrint
mov r8, r12
mov rdx, qword [0x18015a7d0]
lea rcx, str.Just_reallocated_block_at__p_to__Ix_bytes_n
call sym.ntdll.dll_DbgPrint
call fcn.18010109c
jmp 0x18010097b
test dword [rax + 0xbc], 0x800
je 0x18010097b
movzx eax, word [rsp + 0x34]
cmp ax, word [0x18015a7d8]
jne 0x18010097b
movzx eax, word [0x18015a7da]
cmp word [rbx + 0xd0], ax
jne 0x18010097b
mov rax, qword gs:[0x60]
cmp qword [rax + 0x18], rdi
je 0x1801008e7
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
mov rdx, qword [rcx + 0x10]
add rdx, 0x58
lea rcx, str.HEAP__wZ_:
call sym.ntdll.dll_DbgPrint
jmp 0x1801008f3
lea rcx, str.HEAP:
call sym.ntdll.dll_DbgPrint
movzx edx, word [rsp + 0x34]
mov rcx, rbx
call fcn.1800ec7bc
mov r9, rax
mov r8, r12
mov rsi, qword [rsp + 0x38]
mov rdx, rsi
lea rcx, str.Just_reallocated_block_at__p_to_0x_Ix_bytes_with_tag__ws_n
call sym.ntdll.dll_DbgPrint
jmp 0x180100875
mov rax, qword gs:[0x60]
cmp qword [rax + 0x18], rdi
je 0x180100951
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x18]
mov rdx, qword [rcx + 0x10]
add rdx, 0x58
lea rcx, str.HEAP__wZ_:
call sym.ntdll.dll_DbgPrint
jmp 0x18010095d
lea rcx, str.HEAP:
call sym.ntdll.dll_DbgPrint
mov r8, qword [rbx + 0xc8]
mov rdx, r12
lea rcx, str.Invalid_allocation_size____Ix__exceeded__Ix__n
call sym.ntdll.dll_DbgPrint
mov qword [rsp + 0x38], rdi
mov rsi, rdi
jmp 0x1801009b0
cmp byte [rsp + 0x30], dil
je 0x1801009c3
mov rcx, qword [rbx + 0x160]
call sym.ntdll.dll_RtlLeaveCriticalSection
mov rax, rsi
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret