Function at 0x140022620
Capabilities:
Access peb ldr_data
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x1400ef0c0]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x28], rcx
xor r15d, r15d
lea r14d, [r15 + 0x14]
mov rax, qword gs:[0x58]
mov rdi, qword [rax]
mov esi, reloc.WLDAP32.dll_Ordinal_60
mov eax, dword [rsi + rdi]
mov ebp, 0x13f0
test al, 1
jne 0x1400226c9
or eax, 1
mov dword [rsi + rdi], eax
mov ebx, ebp
add rbx, rdi
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov edx, eax
mov dword [rbx + 0x1384], 0xffffffff
mov dword [rbx + 4], eax
lea ecx, [r15 + 1]
lea r8, [rbx + 8]
mov eax, edx
shr eax, 0x1e
xor eax, edx
imul edx, eax, 0x6c078965
add edx, ecx
mov dword [r8], edx
inc rcx
lea r8, [r8 + 4]
cmp rcx, 0x270
jb 0x1400226a1
mov dword [rbx], 0x270
mov eax, dword [rsi + rdi]
mov ebx, 0x13d8
test al, 2
jne 0x1400226e8
or eax, 2
mov dword [rsi + rdi], eax
mov qword [rdi + rbx], r15
mov qword [rdi + rbx + 8], 0x46
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x50], r15
mov r13d, reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x58], r13
mov byte [rsp + 0x40], 0
mov rdx, r14
lea rcx, [rsp + 0x40]
call fcn.140045ac0
mov rsi, r15
mov qword [rsp + 0x50], r15
lea r12, [rdi + rbx]
mov r15d, ebp
add r15, rdi
movzx ebx, byte [rsp + 0x20]
lea r13, str.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_____
dec r14
mov rdx, qword [r12 + 8]
mov rbp, qword [r12]
mov qword [rsp + 0x28], r15
sub rdx, rbp
cmp rdx, 0xffffffffffffffff
jne 0x140022767
mov rcx, r15
call fcn.14004d990
mov edi, eax
shl rdi, 0x20
mov rcx, r15
call fcn.14004d990
mov eax, eax
or rdi, rax
jmp 0x140022777
inc rdx
lea rcx, [rsp + 0x28]
call fcn.14004c4d0
mov rdi, rax
lea rax, [rdi + rbp]
movzx r9d, byte [rax + r13]
mov rcx, qword [rsp + 0x58]
cmp rsi, rcx
jae 0x1400227ad
lea rax, [rsi + 1]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x40]
cmp rcx, 0xf
cmova rax, qword [rsp + 0x40]
mov byte [rax + rsi], r9b
mov byte [rax + rsi + 1], 0
jmp 0x1400227c0
movzx r8d, bl
mov edx, 1
lea rcx, [rsp + 0x40]
call fcn.14001da20
mov rsi, qword [rsp + 0x50]
test r14, r14
jne 0x140022730
movabs rcx, 0x7fffffffffffffff
mov rax, rcx
sub rax, rsi
cmp rax, 4
lea r13d, [r14 + 0xf]
jb 0x14002292f
lea r15, [rsp + 0x40]
mov rdi, qword [rsp + 0x40]
mov r14, qword [rsp + 0x58]
cmp r14, r13
cmova r15, rdi
xorps xmm0, xmm0
mov r12, qword [rsp + 0x38]
movups xmmword [r12], xmm0
xor edx, edx
mov qword [r12 + 0x10], rdx
mov qword [r12 + 0x18], rdx
lea rbp, [rsi + 4]
mov rbx, r12
cmp rbp, r13
jbe 0x1400228a4
mov r13, rbp
or r13, 0xf
cmp r13, rcx
jbe 0x14002285f
mov r13, rcx
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.1400b6108
test rax, rax
je 0x140022887
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x1400228a0
mov eax, reloc.WLDAP32.dll_Ordinal_22
cmp r13, rax
cmovb r13, rax
lea rcx, [r13 + 1]
cmp rcx, 0x1000
jb 0x14002288e
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140022935
jmp 0x140022844
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
test rcx, rcx
je 0x14002289d
call fcn.1400b6108
mov rbx, rax
jmp 0x1400228a0
mov rbx, rdx
mov qword [r12], rbx
mov qword [r12 + 0x10], rbp
mov qword [r12 + 0x18], r13
mov r8, rsi
mov rdx, r15
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
mov dword [rsi + rbx], 0x6578652e
mov byte [rbx + rbp], 0
cmp r14, 0xf
jbe 0x140022901
lea rdx, [r14 + 1]
mov rax, rdi
cmp rdx, 0x1000
jb 0x1400228f9
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400228f9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.1400b6090
mov rax, r12
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400b5c40
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
call fcn.14001c620
nop
call fcn.14001c580
int3