Function at 0x140222830
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x100
mov qword [rbp - 0x31], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140302028]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r15, rcx
mov qword [rbp - 0x29], rcx
xor edi, edi
mov dword [rsp + 0x40], edi
lea rcx, str.NITRO_LOG_SINKS
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r14d, edi
mov qword [rbp + 0x1f], rdi
mov qword [rbp + 0x27], reloc.WS2_32.dll_ntohs
mov byte [rbp + 0xf], dil
lea r12, [rdi - 1]
test rax, rax
je 0x1402228bc
mov r8, r12
inc r8
cmp byte [rax + r8], 0
jne 0x1402228a2
mov rdx, rax
lea rcx, [rbp + 0xf]
call fcn.140074910
mov r14, qword [rbp + 0x1f]
mov qword [r15], rdi
mov qword [r15 + 8], rdi
mov qword [r15 + 0x10], rdi
mov dword [rsp + 0x40], 1
test r14, r14
je 0x14022297f
lea rbx, [rbp + 0xf]
cmp qword [rbp + 0x27], 0x10
cmovae rbx, qword [rbp + 0xf]
cmp r14, 4
jb 0x1402229f9
lea rsi, [r14 + rbx]
lea r8, [rsi - 3]
sub r8, rbx
mov edx, 0x66
mov rcx, rbx
call sub.VCRUNTIME140.dll_memchr
mov r9, rax
test rax, rax
je 0x1402229f9
lea r13, str.file
nop dword [rax + rax]
mov rcx, rdi
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r9 + rcx]
inc rcx
cmp al, byte [rcx + r13 - 1]
jne 0x140222949
cmp rcx, 4
jne 0x140222930
mov eax, edi
jmp 0x14022294e
sbb eax, eax
or eax, 1
test eax, eax
je 0x140222976
inc r9
lea r8, [rsi - 3]
sub r8, r9
mov edx, 0x66
mov rcx, r9
call sub.VCRUNTIME140.dll_memchr
mov r9, rax
test rax, rax
jne 0x140222920
jmp 0x1402229f9
sub r9, rbx
cmp r9, 0xffffffffffffffff
je 0x1402229f9
lea rcx, [rbp - 0x11]
call fcn.140222410
mov r8, rax
mov rdx, qword [r15 + 8]
cmp qword [r15 + 0x10], rdx
je 0x1402229b8
mov qword [rdx], rdi
mov qword [rdx + 8], rdi
mov rax, qword [rax]
mov qword [rdx], rax
mov rax, qword [r8 + 8]
mov qword [rdx + 8], rax
mov qword [r8], rdi
mov qword [r8 + 8], rdi
add qword [r15 + 8], 0x10
jmp 0x1402229c1
mov rcx, r15
call fcn.140212120
nop
mov rbx, qword [rbp - 9]
test rbx, rbx
je 0x1402229f9
mov eax, r12d
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x1402229f5
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r12d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x1402229f5
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
mov r14, qword [rbp + 0x1f]
lea rbx, [rbp + 0xf]
cmp qword [rbp + 0x27], 0x10
cmovae rbx, qword [rbp + 0xf]
cmp r14, 6
jb 0x140222bec
lea rsi, [r14 + rbx]
lea r8, [rsi - 5]
sub r8, rbx
mov edx, reloc.WS2_32.dll_WSAStartup
mov rcx, rbx
call sub.VCRUNTIME140.dll_memchr
mov r9, rax
test rax, rax
je 0x140222bec
lea r13, str.stdout
nop dword [rax]
mov rcx, rdi
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r9 + rcx]
inc rcx
cmp al, byte [rcx + r13 - 1]
jne 0x140222a69
cmp rcx, 6
jne 0x140222a50
mov eax, edi
jmp 0x140222a6e
sbb eax, eax
or eax, 1
test eax, eax
je 0x140222a96
inc r9
lea r8, [rsi - 5]
sub r8, r9
mov edx, reloc.WS2_32.dll_WSAStartup
mov rcx, r9
call sub.VCRUNTIME140.dll_memchr
mov r9, rax
test rax, rax
jne 0x140222a40
jmp 0x140222bec
sub r9, rbx
cmp r9, 0xffffffffffffffff
je 0x140222bec
mov ecx, gethostname
call fcn.14009f0b0
mov rsi, rax
mov qword [rbp - 0x21], rax
test rax, rax
je 0x140222b66
mov dword [rax + 8], 1
mov dword [rax + 0xc], 1
lea rax, vtable.std::_Ref_count_obj_class_spdlog::sinks::stdout_sink_struct_spdlog::details::console_mutex__.0
mov qword [rsi], rax
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rbx, rax
mov dword [rsi + 0x18], edi
lea rax, vtable.spdlog::sinks::stdout_sink_base_struct_spdlog::details::console_mutex_.0
mov qword [rsi + 0x10], rax
call fcn.140223790
mov qword [rsi + 0x20], rax
mov qword [rsi + 0x28], rbx
mov ecx, 0x90
call fcn.14009f0b0
mov rbx, rax
mov qword [rbp - 0x61], rax
test rax, rax
je 0x140222b4a
mov qword [rbp - 0x41], rdi
mov qword [rbp - 0x39], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x51], 0
mov r8d, 2
lea rdx, [0x140243bb0]
lea rcx, [rbp - 0x51]
call fcn.140074910
lea r8, [rbp - 0x51]
xor edx, edx
mov rcx, rbx
call fcn.140217ef0
jmp 0x140222b4d
mov rax, rdi
mov dword [rsp + 0x40], 5
mov qword [rsi + 0x30], rax
lea rax, vtable.spdlog::sinks::stdout_sink_struct_spdlog::details::console_mutex_.0
mov qword [rsi + 0x10], rax
jmp 0x140222b69
mov rsi, rdi
or dword [rsp + 0x40], 2
lea rax, [rsi + 0x10]
mov qword [rsp + 0x48], rax
mov qword [rbp - 0x79], rsi
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x21], xmm0
mov rdx, qword [r15 + 8]
cmp qword [r15 + 0x10], rdx
je 0x140222ba2
mov qword [rdx], rax
mov qword [rdx + 8], rsi
mov rcx, rdi
mov qword [rbp - 0x79], rcx
add qword [r15 + 8], 0x10
jmp 0x140222bb3
lea r8, [rsp + 0x48]
mov rcx, r15
call fcn.140212120
mov rcx, qword [rbp - 0x79]
test rcx, rcx
je 0x140222bec
mov eax, r12d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140222be8
mov rbx, qword [rbp - 0x79]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r12d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140222be8
mov rcx, qword [rbp - 0x79]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov r14, qword [rbp + 0x1f]
lea rsi, [rbp + 0xf]
cmp qword [rbp + 0x27], 0x10
cmovae rsi, qword [rbp + 0xf]
cmp r14, 7
jb 0x140222d7b
lea r8, [rsi - 6]
add r8, r14
sub r8, rsi
mov edx, reloc.WS2_32.dll_WSASetLastError
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
mov rbx, rax
test rax, rax
je 0x140222d7b
nop word [rax + rax]
mov r8d, 7
lea rdx, str.procmon
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140222c70
inc rbx
lea r8, [rsi - 6]
add r8, r14
sub r8, rbx
mov edx, reloc.WS2_32.dll_WSASetLastError
mov rcx, rbx
call sub.VCRUNTIME140.dll_memchr
mov rbx, rax
test rax, rax
jne 0x140222c30
jmp 0x140222d7b
sub rbx, rsi
cmp rbx, 0xffffffffffffffff
je 0x140222d7b
mov ecx, 0x58
call fcn.14009f0b0
mov rsi, rax
mov qword [rbp - 0x59], rax
test rax, rax
je 0x140222cfe
mov dword [rax + 8], 1
mov dword [rax + 0xc], 1
lea rax, vtable.std::_Ref_count_obj_class_nitro::spdlog_sinks::procmon_sink_class_nitro::platform::MutexImpl__.0
mov qword [rsi], rax
lea rbx, [rsi + 0x10]
mov qword [rbp - 0x61], rbx
mov rcx, rbx
call fcn.140216e50
nop
lea rax, vtable.nitro::spdlog_sinks::procmon_sink_class_nitro::platform::MutexImpl_.0
mov qword [rbx], rax
mov qword [rbx + 0x40], r12
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
lea rcx, str..GlobalProcmonDebugLogger
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 0x40], rax
jmp 0x140222d01
mov rsi, rdi
or dword [rsp + 0x40], 8
lea rax, [rsi + 0x10]
mov qword [rbp - 0x71], rax
mov qword [rbp - 0x69], rsi
xorps xmm0, xmm0
movdqu xmmword [rbp - 1], xmm0
mov rdx, qword [r15 + 8]
cmp qword [r15 + 0x10], rdx
je 0x140222d36
mov qword [rdx], rax
mov qword [rdx + 8], rsi
mov qword [rbp - 0x69], rdi
add qword [r15 + 8], 0x10
jmp 0x140222d46
lea r8, [rbp - 0x71]
mov rcx, r15
call fcn.140212120
mov rdi, qword [rbp - 0x69]
test rdi, rdi
je 0x140222d7b
mov eax, r12d
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x140222d7b
mov rbx, qword [rbp - 0x69]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], r12d
cmp r12d, 1
jne 0x140222d7b
mov rcx, qword [rbp - 0x69]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rbp + 0x27]
cmp rdx, 0x10
jb 0x140222dba
inc rdx
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140222db4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140222db4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14009f0ec
nop
mov rax, r15
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.14009f440
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret