Function at 0x40be80
Capabilities:
Access peb ldr_data

Disassembly:
lea r12, [rsp - 0x18]
cmp r12, qword [r14 + 0x10]
jbe 0x40c54c
push rbp
mov rbp, rsp
sub rsp, 0x90
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0xb0], rcx
mov byte [rsp + 0xb8], dil
test byte [rax], al
lea rdx, [rax + 0x10400]
add rbx, 0x3fffff
nop
and rbx, 0xffffffffffc00000
mov qword [rsp + 0x38], rbx
cmp rcx, rdx
je 0x40bedb
xor edx, edx
jmp 0x40c2a7
lea rdx, [rax + 0x10408]
mov ecx, 0x400000
lea rdi, [0x007f3d98]
mov rax, rdx
call fcn.0040d920
test rax, rax
jne 0x40bf25
mov rcx, qword [rsp + 0xb0]
mov rbx, qword [rsp + 0x38]
movzx edi, byte [rsp + 0xb8]
mov rdx, rax
mov rax, qword [rsp + 0xa0]
nop dword [rax + rax]
jmp 0x40c2a7
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x70], rcx
mov rdx, rax
movabs rsi, 0x800000000000
add rdx, rsi
shr rdx, 0x16
mov rsi, qword [rsp + 0xa0]
jmp 0x40bf7a
mov r10, qword [rsp + 0x30]
mov r11, qword [rsp + 0x78]
lea r10, [r11 + r10*8]
xchg qword [r10], rax
lea rdx, [r9 + 1]
mov rax, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x70]
mov rsi, r8
mov r8, rax
add r8, rcx
movabs r9, 0x7fffffffffff
add r8, r9
shr r8, 0x16
cmp rdx, r8
ja 0x40c205
mov r8, rdx
shr rdx, 0x14
cmp rdx, 0x40
jae 0x40c269
mov qword [rsp + 0x68], r8
mov r10, qword [rsi + rdx*8 + 0x101d8]
nop dword [rax + rax]
test r10, r10
jne 0x40c073
mov qword [rsp + 0x60], rdx
mov rax, qword [sym.imp.kernel32.dll_VirtualAlloc]
nop
mov qword [rsp], rax
mov qword [rsp + 8], 0
mov qword [rsp + 0x10], section..idata
mov qword [rsp + 0x18], 0x3000
mov qword [rsp + 0x20], 4
nop
call fcn.004314a0
xorps xmm15, xmm15
mov r14, qword [0x007f3030]
mov r14, qword gs:[r14]
mov r14, qword [r14]
mov rax, qword [rsp + 0x28]
nop dword [rax]
test rax, rax
je 0x40c258
mov rdx, qword [rsp + 0xa0]
cmp byte [rdx + 0x103d8], 0
je 0x40c03d
nop
jmp 0x40c03e
nop
mov rsi, qword [rsp + 0x60]
lea rsi, [rdx + rsi*8]
lea rsi, [rsi + 0x101d8]
mov r10, rax
xchg qword [rsi], rax
mov rax, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x70]
mov rsi, rdx
mov r8, qword [rsp + 0x68]
movabs r9, 0x7fffffffffff
test byte [r10], al
and r8d, 0xfffff
mov r11, qword [r10 + r8*8]
test r11, r11
jne 0x40c247
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x78], r10
lea rax, [rsi + 0x103e0]
mov ebx, 0x10d0
mov ecx, 8
lea rdi, [0x007f5e58]
call fcn.0040d920
test rax, rax
jne 0x40c0d5
mov eax, 0x10d0
mov ebx, 8
lea rcx, [0x007f5e58]
call fcn.0040d560
test rax, rax
je 0x40c236
movzx esi, byte [rsp + 0xb8]
nop dword [rax]
test sil, sil
je 0x40c1ee
mov r8, qword [rsp + 0xa0]
mov r9, qword [r8 + 0x10438]
nop dword [rax + rax]
cmp qword [r8 + 0x10430], r9
jne 0x40c1b6
mov qword [rsp + 0x48], rax
shl r9, 4
test r9, r9
jne 0x40c122
mov r9, qword [0x007f2ed0]
mov qword [rsp + 0x40], r9
mov rax, r9
mov ebx, 8
lea rcx, [0x007f5e58]
call fcn.0040d560
nop dword [rax + rax]
test rax, rax
je 0x40c225
mov rsi, qword [rsp + 0xa0]
mov r8, qword [rsi + 0x10430]
mov rbx, qword [rsi + 0x10428]
mov qword [rsi + 0x10428], rax
mov r9, qword [rsp + 0x40]
shr r9, 3
mov qword [rsi + 0x10438], r9
mov rax, qword [rsi + 0x10428]
mov rcx, qword [rsi + 0x10430]
cmp rcx, r8
cmovg rcx, r8
cmp rax, rbx
je 0x40c1a1
shl rcx, 3
call fcn.0045f6a0
mov rsi, qword [rsp + 0xa0]
mov rax, qword [rsp + 0x48]
movzx esi, byte [rsp + 0xb8]
mov r8, qword [rsp + 0xa0]
mov rcx, qword [r8 + 0x10430]
mov rdx, qword [r8 + 0x10438]
lea r9, [rcx + 1]
cmp rdx, r9
jb 0x40c21c
mov qword [r8 + 0x10430], r9
cmp rcx, r9
jae 0x40c211
mov rdx, qword [r8 + 0x10428]
mov r9, qword [rsp + 0x68]
mov qword [rdx + rcx*8], r9
jmp 0x40bf55
mov r8, qword [rsp + 0xa0]
mov r9, qword [rsp + 0x68]
nop dword [rax + rax]
jmp 0x40bf55
mov rbx, rcx
add rsp, 0x90
pop rbp
ret
mov rax, rcx
mov rcx, r9
call fcn.0045ece0
mov rcx, r9
nop
call fcn.0045ed60
lea rax, [0x005846fc]
mov ebx, 0x22
call fcn.00433a60
lea rax, [0x005866a8]
mov ebx, 0x2c
call fcn.00433a60
lea rax, [0x005819e6]
mov ebx, 0x19
call fcn.00433a60
lea rax, [0x00585823]
mov ebx, 0x27
call fcn.00433a60
mov rax, rdx
mov ecx, 0x40
call fcn.0045ed00
mov r9, qword [rsi + 0x10]
mov qword [rcx], r9
mov r9, qword [rax + 0x16c68]
sub r9, qword [rax + 0x16c38]
nop
mov qword [rax + 0x16c68], r9
mov r9, qword [rax + 0x16c50]
mov qword [rsi], r9
mov qword [rax + 0x16c50], rsi
mov rdx, r11
mov rsi, qword [rcx]
test rsi, rsi
je 0x40c3cc
mov qword [rsp + 0x58], rsi
mov rdx, qword [rsi]
movzx r8d, byte [rsi + 8]
mov r9, rdx
sub rdx, rbx
test r8, r8
cmovne r9, rdx
lea rdx, [rbx + r9]
cmp r9, rdx
jbe 0x40c2e5
movabs r8, 0x7fffffffffff
xor r10d, r10d
jmp 0x40c35e
movabs r8, 0x7fffffffffff
lea r10, [r8 + rdx]
shr r10, 0x16
nop word [rax + rax]
cmp r10, 0x4000000
jb 0x40c30e
xor r10d, r10d
jmp 0x40c35e
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x70], rdx
mov rax, r9
nop dword [rax + rax]
call fcn.00416220
mov rcx, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x58]
movzx edi, byte [rsp + 0xb8]
movabs r8, 0x7fffffffffff
mov r9, qword [rsp + 0x50]
mov r10, rax
mov rax, qword [rsp + 0xa0]
mov r11, r10
cmp r10, r9
je 0x40c3b8
test r11, r11
je 0x40c276
mov qword [rsp + 0x88], r11
mov rax, r11
call fcn.004161a0
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0xb0]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x58]
movzx edi, byte [rsp + 0xb8]
movabs r8, 0x7fffffffffff
mov r11, qword [rsp + 0x88]
jmp 0x40c276
movzx r10d, byte [rsi + 8]
test r10, r10
cmovne rdx, r9
mov qword [rsi], rdx
mov rcx, rbx
jmp 0x40c3e0
mov rcx, rbx
movabs r8, 0x7fffffffffff
xor ebx, ebx
mov r11, rdx
nop
test rbx, rbx
jne 0x40c4a7
xor eax, eax
mov rbx, rcx
mov ecx, 0x400000
call fcn.0040c580
nop dword [rax + rax]
test rax, rax
je 0x40c51c
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x70], rbx
mov rax, qword [rsp + 0xa0]
lea rcx, [rax + 0x16c38]
mov qword [rsp + 0x80], rcx
mov rax, rcx
call fcn.00418c20
mov rcx, qword [rsp + 0x88]
mov qword [rax], rcx
mov byte [rax + 8], 1
mov rcx, qword [0x00785100]
mov qword [rax + 0x10], rcx
mov qword [0x00785100], rax
mov rax, qword [rsp + 0x80]
nop
call fcn.00418c20
mov r11, qword [rsp + 0x88]
mov rcx, r11
mov rbx, qword [rsp + 0x70]
add rcx, rbx
mov qword [rax], rcx
mov rcx, qword [0x00785100]
mov qword [rax + 0x10], rcx
mov qword [0x00785100], rax
mov rax, qword [rsp + 0xa0]
movzx edi, byte [rsp + 0xb8]
movabs r8, 0x7fffffffffff
mov rdx, r11
lea rsi, [rbx + r11]
cmp r11, rsi
jbe 0x40c4c4
movabs r9, 0x800000000000
mov esi, 0x1c
jmp 0x40c503
movabs r9, 0x800000000000
lea r10, [r9 + r11]
shr r10, 0x16
cmp r10, 0x4000000
jb 0x40c4e6
mov esi, 0x21
jmp 0x40c503
add rsi, r8
shr rsi, 0x16
cmp rsi, 0x4000000
mov esi, 0
mov r10d, 0x20
cmovae rsi, r10
test rsi, rsi
jne 0x40c53a
test r11, 0x3fffff
jne 0x40c529
mov rax, rdx
mov rcx, rbx
jmp 0x40bf2a
xor eax, eax
xor ebx, ebx
add rsp, 0x90
pop rbp
ret
lea rax, [0x0058422b]
mov ebx, 0x21
call fcn.00433a60
lea rax, [0x00586ad8]
mov ebx, 0x2e
call fcn.00433a60
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
mov byte [rsp + 0x20], dil
call fcn.0045ca00
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
movzx edi, byte [rsp + 0x20]
jmp fcn.0040be80