Function at 0x14020e000
Capabilities:
Query environment variable

Disassembly:
endbr64
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov r12, qword [0x140485900]
mov ebx, dword [0x140377ba4]
mov rax, qword [r12]
mov qword [rsp + 0x98], rax
xor eax, eax
mov r15, rcx
mov rsi, rdx
mov rdi, r8
mov rbp, r9
cmp ebx, 0xffffffff
je 0x14020e250
mov eax, dword [0x140377ba0]
cmp eax, 0xffffffff
je 0x14020e200
not eax
and ebx, eax
mov r13d, dword [0x140585c10]
test r13d, r13d
je 0x14020e084
mov rax, qword [r15]
mov rdx, qword [r15 + 8]
xor rax, qword [0x140585c20]
xor rdx, qword [0x140585c28]
or rax, rdx
je 0x14020e268
cmp qword [0x140585c00], 0
lea r13, [0x140585c08]
je 0x14020e420
mov rcx, r13
call sym.AcquireSRWLockShared
mov edx, dword [0x140585bd0]
test edx, edx
je 0x14020e0c9
mov rax, qword [r15]
mov rdx, qword [r15 + 8]
xor rax, qword [0x140585be0]
xor rdx, qword [0x140585be8]
or rax, rdx
je 0x14020e300
mov rcx, r13
call sym.ReleaseSRWLockShared
mov rcx, r13
call sym.AcquireSRWLockExclusive
mov eax, dword [0x140585bd0]
test eax, eax
jne 0x14020e1b8
lea rdx, [rsp + 0x50]
mov rcx, r15
lea r14, str.randomx
call sym.hash2hex
mov r8, rdx
mov rcx, r14
lea rdx, str.RandomX_new_secondary_seed_hash_is__s
call sym.minfo
mov rcx, qword [0x140585c00]
mov r8d, 0x20
mov rdx, r15
call sym.randomx_init_cache
lea rdx, str.RandomX_secondary_cache_updated
mov rcx, r14
call sym.minfo
movdqu xmm0, xmmword [r15]
mov dword [0x140585bd0], 1
movups xmmword [0x140585be0], xmm0
movdqu xmm1, xmmword [r15 + 0x10]
movups xmmword [0x140585bf0], xmm1
lea rcx, [0x140377b60]
call sym.__emutls_get_address
mov r8, qword [0x140585c00]
mov ecx, ebx
mov r14, rax
mov rdx, rax
call sym.rx_init_light_vm
mov rcx, qword [r14]
mov r9, rbp
mov r8, rdi
mov rdx, rsi
call sym.randomx_calculate_hash
mov rcx, r13
call sym.ReleaseSRWLockExclusive
mov rax, qword [rsp + 0x98]
sub rax, qword [r12]
jne 0x14020e75d
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [r15]
mov rdx, qword [r15 + 8]
xor rax, qword [0x140585be0]
xor rdx, qword [0x140585be8]
or rax, rdx
jne 0x14020e0e7
mov rax, qword [r15 + 0x10]
mov rdx, qword [r15 + 0x18]
xor rax, qword [0x140585bf0]
xor rdx, qword [0x140585bf8]
or rax, rdx
jne 0x14020e0e7
jmp 0x14020e154
lea rcx, str.MONERO_RANDOMX_UMASK
call sym.getenv
mov r13, rax
test rax, rax
je 0x14020e2f0
xor r8d, r8d
lea rdx, [rsp + 0x48]
mov rcx, rax
call sym.strtol
cmp r13, qword [rsp + 0x48]
je 0x14020e448
cmp eax, 0x7ffffffe
ja 0x14020e448
mov edx, eax
not edx
and ebx, edx
mov dword [0x140377ba0], eax
jmp 0x14020e05a
call sym.randomx_get_flags
mov dword [0x140377ba4], eax
mov ebx, eax
jmp 0x14020e047
mov rax, qword [r15 + 0x10]
mov rdx, qword [r15 + 0x18]
xor rax, qword [0x140585c30]
xor rdx, qword [0x140585c38]
or rax, rdx
jne 0x14020e084
cmp qword [0x140585c48], 0
je 0x14020e360
lea r13, [0x140585c58]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_TryAcquireSRWLockShared]
test al, al
je 0x14020e360
mov r11d, dword [0x140585c10]
test r11d, r11d
je 0x14020e2e0
mov rax, qword [r15]
mov rdx, qword [r15 + 8]
xor rax, qword [0x140585c20]
xor rdx, qword [0x140585c28]
or rax, rdx
je 0x14020e450
nop word [rax + rax]
mov rcx, r13
call sym.ReleaseSRWLockShared
jmp 0x14020e084
mov dword [0x140377ba0], 0
jmp 0x14020e05a
mov rax, qword [r15 + 0x10]
mov rdx, qword [r15 + 0x18]
xor rax, qword [0x140585bf0]
xor rdx, qword [0x140585bf8]
or rax, rdx
jne 0x14020e0c9
lea rcx, [0x140377b60]
call sym.__emutls_get_address
mov r8, qword [0x140585c00]
mov ecx, ebx
mov r14, rax
mov rdx, rax
call sym.rx_init_light_vm
mov rcx, qword [r14]
mov r9, rbp
mov r8, rdi
mov rdx, rsi
call sym.randomx_calculate_hash
mov rcx, r13
call sym.ReleaseSRWLockShared
jmp 0x14020e18d
lea r13, [0x140585c50]
mov rcx, r13
call sym.AcquireSRWLockShared
mov ecx, dword [0x140585c10]
test ecx, ecx
je 0x14020e2e0
mov rax, qword [r15]
mov rdx, qword [r15 + 8]
xor rax, qword [0x140585c20]
xor rdx, qword [0x140585c28]
or rax, rdx
jne 0x14020e2e0
mov rax, qword [r15 + 0x10]
mov rdx, qword [r15 + 0x18]
xor rax, qword [0x140585c30]
xor rdx, qword [0x140585c38]
or rax, rdx
jne 0x14020e2e0
lea rcx, [0x140377b40]
call sym.__emutls_get_address
mov r8, qword [0x140585c40]
mov ecx, ebx
mov r14, rax
mov rdx, rax
call sym.rx_init_light_vm
mov rcx, qword [r14]
mov r9, rbp
mov r8, rdi
mov rdx, rsi
call sym.randomx_calculate_hash
mov rax, qword [rsp + 0x98]
sub rax, qword [r12]
jne 0x14020e75d
mov rcx, r13
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.ReleaseSRWLockShared
mov rcx, r13
call sym.AcquireSRWLockExclusive
cmp qword [0x140585c00], 0
je 0x14020e560
mov rcx, r13
call sym.ReleaseSRWLockExclusive
jmp 0x14020e099
xor eax, eax
jmp 0x14020e244
mov rax, qword [r15 + 0x10]
mov rdx, qword [r15 + 0x18]
xor rax, qword [0x140585c30]
xor rdx, qword [0x140585c38]
or rax, rdx
jne 0x14020e2e0
lea rcx, [0x140377b20]
mov dword [rsp + 0x3c], 0
call sym.__emutls_get_address
mov rcx, qword [rax]
mov r14, rax
test rcx, rcx
jne 0x14020e3dd
mov r8, qword [0x140585c48]
test r8, r8
je 0x14020e2e0
mov edx, dword [0x140377ba0]
cmp edx, 0xffffffff
je 0x14020e621
test dl, 4
jne 0x14020e2e0
test bl, 8
jne 0x14020e5e2
mov dword [rsp + 0x28], ebx
mov eax, ebx
or eax, 5
not edx
mov ecx, edx
xor edx, edx
and ecx, eax
call sym.randomx_create_vm
mov qword [r14], rax
mov rcx, rax
test rax, rax
jne 0x14020e3dd
mov r9d, dword [0x140585bc4]
test r9d, r9d
je 0x14020e72f
mov r10d, dword [rsp + 0x28]
mov eax, dword [0x140377ba0]
mov r9, qword [0x140585c48]
or r10d, 4
cmp eax, 0xffffffff
je 0x14020e6b2
not eax
mov r8, r9
xor edx, edx
and eax, r10d
mov ecx, eax
call sym.randomx_create_vm
mov qword [r14], rax
mov rcx, rax
test rax, rax
jne 0x14020e3dd
lea rdx, str.Couldnt_allocate_RandomX_full_VM
lea rcx, str.randomx
call sym.merror
mov rcx, qword [r14]
test rcx, rcx
je 0x14020e2e0
jmp 0x14020e3dd
lea rdx, [rsp + 0x50]
mov rcx, r15
lea r14, str.randomx
call sym.hash2hex
mov r8, rdx
mov rcx, r14
lea rdx, str.RandomX_new_secondary_seed_hash_is__s
call sym.minfo
lea rdx, [0x140585c00]
mov ecx, ebx
call sym.rx_alloc_cache
mov rcx, qword [0x140585c00]
mov r8d, 0x20
mov rdx, r15
call sym.randomx_init_cache
lea rdx, str.RandomX_secondary_cache_updated
mov rcx, r14
call sym.minfo
movdqu xmm2, xmmword [r15]
mov dword [0x140585bd0], 1
movups xmmword [0x140585be0], xmm2
movdqu xmm3, xmmword [r15 + 0x10]
movups xmmword [0x140585bf0], xmm3
jmp 0x14020e436
xor edx, edx
lea rcx, [0x140377b80]
mov dword [rsp + 0x38], edx
mov qword [rsp + 0x30], r8
call sym.__emutls_get_address
mov dword [rsp + 0x28], ebx
mov r8, qword [rsp + 0x30]
mov r10d, dword [rax]
mov edx, dword [rsp + 0x38]
test r10d, r10d
jne 0x14020e615
mov eax, ebx
or eax, 0x10
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
or eax, 5
jmp 0x14020e4cc
lea rcx, str.MONERO_RANDOMX_UMASK
call sym.getenv
mov rcx, rax
test rax, rax
je 0x14020e67f
lea rdx, [rsp + 0x48]
xor r8d, r8d
mov qword [rsp + 0x28], rax
call sym.strtol
mov rcx, qword [rsp + 0x28]
mov edx, eax
cmp rcx, qword [rsp + 0x48]
je 0x14020e6a4
cmp eax, 0x7ffffffe
ja 0x14020e6a4
mov dword [0x140377ba0], eax
test al, 4
jne 0x14020e54a
mov r8, qword [0x140585c48]
test bl, 8
jne 0x14020e5e2
jmp 0x14020e4c3
mov edx, ebx
mov r8, qword [0x140585c48]
mov dword [0x140377ba0], 0
and edx, 8
jne 0x14020e5e0
mov dword [rsp + 0x28], ebx
jmp 0x14020e615
mov dword [0x140377ba0], 0
xor edx, edx
jmp 0x14020e66a
lea rcx, str.MONERO_RANDOMX_UMASK
mov dword [rsp + 0x30], r10d
mov qword [rsp + 0x28], r9
call sym.getenv
mov r9, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x30]
test rax, rax
mov rcx, rax
je 0x14020e751
xor r8d, r8d
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x38], r10d
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x28], rax
call sym.strtol
mov rcx, qword [rsp + 0x28]
cmp rcx, qword [rsp + 0x48]
mov r9, qword [rsp + 0x30]
mov r10d, dword [rsp + 0x38]
je 0x14020e71a
cmp eax, 0x7ffffffe
cmova eax, dword [rsp + 0x3c]
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x3c]
mov dword [0x140377ba0], eax
mov eax, dword [0x140377ba0]
jmp 0x14020e517
lea rdx, str.Couldnt_allocate_RandomX_full_VM_using_large_pages__will_print_only_once_
lea rcx, str.randomx
mov dword [0x140585bc4], 1
call sym.mdebug
jmp 0x14020e4f8
xor r8d, r8d
mov dword [0x140377ba0], r8d
jmp 0x14020e724
call dbg.__stack_chk_fail
nop
nop word cs:[rax + rax]
nop