Function at 0x14004ddf4
Capabilities:
Access peb ldr_data
Get os information via kuser_shared_data

Disassembly:
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x98
mov qword [rbp - 0x29], 0xfffffffffffffffe
mov r14, rdx
mov rsi, rcx
lea rdi, [rcx + 0x70]
mov qword [rbp - 0x31], rdi
mov rcx, rdi
call qword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
nop
mov rsi, qword [rsi + 0xa0]
mov rbx, qword [rsi]
xor r12d, r12d
cmp rbx, rsi
je 0x14004e118
mov ecx, 0x7ffe026c
lea edx, [rcx + 4]
mov r15, qword [rbx + 0x18]
mov qword [rbp + 0x7f], r15
mov qword [rbp - 0x49], r12
mov dword [rbp + 0x67], r12d
mov rdi, qword [r14]
mov qword [rbp - 0x39], rdi
mov rax, qword gs:[0x60]
mov ecx, dword [rcx]
shl ecx, 4
or ecx, dword [rdx]
shl ecx, 4
movzx eax, byte [rax + 0x123]
or ecx, eax
mov qword [rsp + 0x20], r12
cmp ecx, 0x611
mov rcx, qword [r15]
ja 0x14004e0aa
mov r9d, 0x30
lea r8, [rbp - 0x21]
xor edx, edx
call fcn.1400563a0
mov dword [rdi], eax
test eax, eax
js 0x14004e00d
mov r15d, 0x40000
mov dword [rbp + 0x77], r12d
mov r13d, r15d
lea rcx, [r13 + 0x20]
call qword [sym.imp.msvcrt.dll_malloc]
mov rdx, rax
mov r14, rax
test rax, rax
je 0x14004def2
mov rdi, rax
xor eax, eax
lea rcx, [r13 + 0x20]
rep stosb byte [rdi], al
lea r14, [rdx + 0x1f]
and r14, 0xfffffffffffffff0
mov qword [r14 - 0x10], rdx
mov qword [r14 - 8], r13
mov rdi, qword [rbp - 0x39]
xor r12d, r12d
test r14, r14
je 0x14004e09f
lea r9, [rbp + 0x77]
mov r8d, r15d
mov rdx, r14
lea ecx, [r12 + 5]
call fcn.1400563c4
mov dword [rdi], eax
test eax, eax
jns 0x14004df3c
mov rcx, qword [r14 - 8]
test rcx, rcx
je 0x14004df2c
mov rdi, r14
xor eax, eax
rep stosb byte [rdi], al
mov rdi, qword [rbp - 0x39]
mov rcx, qword [r14 - 0x10]
call qword [sym.imp.msvcrt.dll_free]
mov r14, r12
add r15d, r15d
cmp dword [rdi], 0xc0000004
je 0x14004debb
cmp dword [rdi], r12d
cmovl r14, qword [rbp - 0x41]
mov qword [rbp - 0x41], r14
jl 0x14004e005
mov rcx, r14
mov r9b, r12b
mov r8b, r12b
mov r11, qword [rbp - 9]
mov r10, qword [rbp - 0x11]
cmp qword [rcx + 0x50], r10
jne 0x14004dfae
mov edx, r12d
cmp dword [rcx + 4], r12d
jbe 0x14004dfae
mov rax, rcx
cmp qword [rax + 0x130], r11
je 0x14004df93
inc edx
add rax, 0x50
cmp edx, dword [rcx + 4]
jb 0x14004df7d
jmp 0x14004dfae
mov r9b, 1
cmp dword [rax + 0x148], 5
jne 0x14004dfab
cmp dword [rax + 0x144], 5
mov r8b, r9b
je 0x14004dfae
mov r8b, r12b
cmp dword [rcx], r12d
je 0x14004dfba
mov eax, dword [rcx]
add rcx, rax
jmp 0x14004dfbd
mov rcx, r12
test r9b, r9b
jne 0x14004dfcf
test rcx, rcx
jne 0x14004df6b
mov dword [rdi], 0xc0000225
jmp 0x14004dfde
mov eax, r12d
test r8b, r8b
setne al
mov dword [rbp + 0x67], eax
mov dword [rdi], r12d
mov qword [rbp - 0x41], r14
test r14, r14
je 0x14004e005
mov rcx, qword [r14 - 8]
test rcx, rcx
je 0x14004dff7
mov rdi, r14
xor eax, eax
rep stosb byte [rdi], al
mov rcx, qword [r14 - 0x10]
call qword [sym.imp.msvcrt.dll_free]
mov qword [rbp - 0x41], r14
mov r15, qword [rbp + 0x7f]
mov r14, qword [rbp + 0x6f]
mov rdi, qword [r14]
cmp dword [rdi], r12d
jl 0x14004e01f
cmp dword [rbp + 0x67], r12d
jne 0x14004e100
mov qword [rsp + 0x20], r12
mov r9d, 8
lea r8, [rbp - 0x49]
lea edx, [r9 + 1]
mov rcx, qword [r15]
call fcn.1400563a0
mov dword [rdi], eax
mov rax, qword [r14]
cmp dword [rax], r12d
jl 0x14004e100
mov rax, qword [rbp - 0x49]
dec rax
mov ecx, 0xfffffffd
cmp rax, rcx
ja 0x14004e100
call fcn.14004f888
movzx ecx, ax
mov r8, qword [rbp - 0x49]
movzx eax, r8w
cmp rax, rcx
je 0x14004e100
mov ecx, r12d
mov rax, qword [r14 + 8]
mov r9d, dword [rax]
test r9d, r9d
je 0x14004e0cf
mov rdi, qword [r14 + 0x10]
mov edx, ecx
mov eax, ecx
add rax, rax
cmp qword [rdi + rax*8], r8
je 0x14004e0c4
inc ecx
cmp ecx, r9d
jb 0x14004e089
jmp 0x14004e0cf
mov dword [rdi], 0xc000009a
jmp 0x14004e005
mov r9d, 4
lea r8, [rbp + 0x67]
lea edx, [r9 + 0x1f]
call fcn.1400563a0
mov dword [rdi], eax
jmp 0x14004e00d
add rdx, rdx
inc dword [rdi + rdx*8 + 8]
mov r8, qword [rbp - 0x49]
mov rax, qword [r14 + 8]
cmp ecx, dword [rax]
jb 0x14004e100
add rcx, rcx
mov rax, qword [r14 + 0x10]
mov qword [rax + rcx*8], r8
mov rax, qword [r14 + 0x10]
mov dword [rax + rcx*8 + 8], 1
mov rax, qword [r14 + 8]
inc dword [rax]
mov rax, qword [r14 + 8]
cmp dword [rax], 0x100
je 0x14004e114
mov rbx, qword [rbx]
cmp rbx, rsi
mov ecx, 0x7ffe026c
lea edx, [rcx + 4]
jne 0x14004de4f
mov rdi, qword [rbp - 0x31]
test rdi, rdi
je 0x14004e126
mov rcx, rdi
call qword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret