Function at 0x1401231b0
Capabilities:
Access peb ldr_data
Encode data using xor
Generate random numbers using the delphi lcg
Get kernel32 base address
Hash data with crc32
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push rbx
push rsi
push rdi
push r12
push r15
sub rsp, 0x90
mov rax, qword [0x140188020]
xor rax, rsp
mov qword [rsp + 0x78], rax
cmp byte [rcx + 0x41], 0
mov r12, rdx
mov r15d, r8d
mov rbx, rcx
je 0x1401232c1
mov rcx, qword [rcx + 0x50]
mov rax, rcx
test rcx, rcx
je 0x140123202
cmp dword [rbx + 0x58], r15d
jae 0x140123202
call fcn.14012b910
mov qword [rbx + 0x50], 0
jmp 0x140123207
test rax, rax
jne 0x140123218
lea ecx, [r15 + r15]
call fcn.14012bbf0
mov qword [rbx + 0x50], rax
mov dword [rbx + 0x58], r15d
mov r8, r15
mov rdx, r12
mov rcx, rax
mov rdi, r15
call fcn.14012dc00
test r15d, r15d
je 0x1401232bd
xor r11d, r11d
lea rsi, [0x140168c70]
nop dword [rax]
mov rax, qword [rbx + 0x50]
lea r11, [r11 + 1]
mov r8d, dword [rbx + 0x4c]
mov edx, dword [rbx + 0x44]
mov r9d, r8d
mov ecx, edx
and r9d, 0xfffd
movsx r10, byte [r11 + rax - 1]
or r9d, 2
xor rcx, r10
shr edx, 8
movzx eax, cl
xor edx, dword [rsi + rax*4]
movzx eax, dl
add eax, dword [rbx + 0x48]
imul eax, eax, 0x8088405
mov dword [rbx + 0x44], edx
inc eax
mov ecx, eax
shr rcx, 0x18
mov dword [rbx + 0x48], eax
movzx eax, r8b
xor rcx, rax
shr r8d, 8
xor r8d, dword [rsi + rcx*4]
mov ecx, r9d
xor ecx, 1
mov dword [rbx + 0x4c], r8d
mov rax, qword [rbx + 0x50]
imul ecx, r9d
shr ecx, 8
xor cl, r10b
mov byte [r11 + rax - 1], cl
sub rdi, 1
jne 0x140123240
mov r12, qword [rbx + 0x50]
mov rdx, qword [rbx + 0x30]
test rdx, rdx
je 0x1401232fe
mov ecx, dword [rbx + 0x38]
lea eax, [rcx + r15]
cmp eax, dword [rbx + 0x3c]
jb 0x1401232e4
mov dword [rbx + 0x24], 0x30000
xor eax, eax
jmp 0x14012346f
add rcx, rdx
mov r8, r15
mov rdx, r12
call fcn.14012dc00
add dword [rbx + 0x38], r15d
mov eax, r15d
jmp 0x14012346f
mov qword [rsp + 0x88], r13
mov r13, qword [rbx + 8]
test r13, r13
je 0x14012345e
mov qword [rsp + 0xd8], rbp
lea rdx, [0x14016def8]
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x80], r14
call fcn.14010c740
mov rcx, rax
call fcn.14001c8f0
mov rcx, qword gs:[0x60]
mov rsi, rax
mov rdx, qword [rcx + 0x18]
mov rcx, qword [rdx + 0x10]
mov rdi, qword [rcx]
cmp qword [rdi + 0x60], 0
je 0x14012342d
mov eax, 0x5a4d
nop dword [rax]
nop word [rax + rax]
mov r11, qword [rdi + 0x30]
mov rdi, qword [rdi]
test r11, r11
je 0x140123422
cmp word [r11], ax
jne 0x14012342d
movsxd rax, dword [r11 + 0x3c]
cmp dword [rax + r11], 0x4550
jne 0x14012342d
mov ecx, dword [rax + r11 + 0x88]
test ecx, ecx
je 0x14012342d
mov ebp, dword [r11 + rcx + 0x1c]
lea rax, [r11 + rcx]
mov r9d, dword [rax + 0x20]
add rbp, r11
mov r14d, dword [rax + 0x24]
add r9, r11
mov ebx, dword [rax + 0x18]
add r14, r11
xor r10d, r10d
test ebx, ebx
je 0x14012341d
mov eax, dword [r9]
xor r8b, r8b
add rax, r11
cmp byte [rax], r8b
je 0x140123411
mov rdx, rsi
sub rdx, rax
movzx ecx, byte [rdx + rax]
test cl, cl
je 0x14012340c
cmp byte [rax], cl
jne 0x140123411
inc rax
mov r8b, 1
cmp byte [rax], 0
jne 0x1401233e4
movsxd rax, r10d
movzx ecx, word [r14 + rax*2]
mov eax, dword [rbp + rcx*4]
add rax, r11
jmp 0x14012342f
test r8b, r8b
jne 0x1401233fb
inc r10d
add r9, 4
cmp r10d, ebx
jb 0x1401233d0
mov eax, 0x5a4d
cmp qword [rdi + 0x60], 0
jne 0x140123370
xor eax, eax
lea r9, [rsp + 0x70]
mov qword [rsp + 0x20], 0
mov r8d, r15d
mov rdx, r12
mov rcx, r13
call rax
mov eax, dword [rsp + 0x70]
mov r14, qword [rsp + 0x80]
mov rbp, qword [rsp + 0xd8]
jmp 0x140123467
mov dword [rbx + 0x24], 0x1000000
xor eax, eax
mov r13, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14012b8f0
add rsp, 0x90
pop r15
pop r12
pop rdi
pop rsi
pop rbx
ret