Function at 0x140041920
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xe0
mov qword [rbp - 0x31], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14010d268]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov r14, rcx
mov qword [rbp - 0x29], rcx
xor edi, edi
mov dword [rbp - 0x69], edi
lea rcx, str.NITRO_LOG_SINKS
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r15d, 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 0x1400419ab
mov r8, r12
inc r8
cmp byte [rax + r8], 0
jne 0x140041991
mov rdx, rax
lea rcx, [rbp + 0xf]
call fcn.14001d4c0
mov r15, qword [rbp + 0x1f]
mov qword [r14], rdi
mov qword [r14 + 8], rdi
mov qword [r14 + 0x10], rdi
mov dword [rbp - 0x69], 1
test r15, r15
je 0x140041a6f
lea rbx, [rbp + 0xf]
cmp qword [rbp + 0x27], 0x10
cmovae rbx, qword [rbp + 0xf]
cmp r15, 4
jb 0x140041ae9
lea rsi, [r15 + 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 0x140041ae9
lea r13, str.file
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 0x140041a39
cmp rcx, 4
jne 0x140041a20
mov eax, edi
jmp 0x140041a3e
sbb eax, eax
or eax, 1
test eax, eax
je 0x140041a66
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 0x140041a10
jmp 0x140041ae9
sub r9, rbx
cmp r9, 0xffffffffffffffff
je 0x140041ae9
lea rcx, [rbp - 0x21]
call fcn.140041430
mov r8, rax
mov rdx, qword [r14 + 8]
cmp qword [r14 + 0x10], rdx
je 0x140041aa8
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 [r14 + 8], 0x10
jmp 0x140041ab1
mov rcx, r14
call fcn.14002b300
nop
mov rbx, qword [rbp - 0x19]
test rbx, rbx
je 0x140041ae9
mov eax, r12d
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140041ae5
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r12d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140041ae5
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
mov r15, qword [rbp + 0x1f]
lea rbx, [rbp + 0xf]
cmp qword [rbp + 0x27], 0x10
cmovae rbx, qword [rbp + 0xf]
cmp r15, 6
jb 0x140041ca5
lea rsi, [r15 + 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 0x140041ca5
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 0x140041b59
cmp rcx, 6
jne 0x140041b40
mov eax, edi
jmp 0x140041b5e
sbb eax, eax
or eax, 1
test eax, eax
je 0x140041b86
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 0x140041b30
jmp 0x140041ca5
sub r9, rbx
cmp r9, 0xffffffffffffffff
je 0x140041ca5
mov ecx, gethostname
call fcn.14005f8a8
mov rbx, rax
mov qword [rbp - 0x41], rax
test rax, rax
je 0x140041c1f
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_stdout__struct_spdlog::details::console_mutex__.0
mov qword [rbx], rax
lea rsi, [rbx + 0x10]
mov qword [rbp - 0x39], rsi
mov rcx, rsi
call fcn.140039460
nop
lea rax, vtable.spdlog::sinks::stdout_sink_struct_spdlog::details::console_stdout__struct_spdlog::details::console_mutex_.0
mov qword [rsi], rax
mov ecx, dword [0x140111800]
mov rax, qword gs:[0x58]
mov edx, reloc.WS2_32.dll_sendto
mov rcx, qword [rax + rcx*8]
lea r13, [0x140111630]
mov eax, dword [rdx + rcx]
cmp dword [0x140111680], eax
jg 0x140041ed3
mov qword [rsi + 0x18], r13
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov qword [rsi + 0x20], rax
jmp 0x140041c22
mov rbx, rdi
mov dword [rbp - 0x69], 3
lea rax, [rbx + 0x10]
mov qword [rbp - 0x61], rax
mov qword [rbp - 0x59], rbx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x11], xmm0
mov rdx, qword [r14 + 8]
cmp qword [r14 + 0x10], rdx
je 0x140041c5c
mov qword [rdx], rax
mov qword [rdx + 8], rbx
mov rcx, rdi
mov qword [rbp - 0x59], rcx
add qword [r14 + 8], 0x10
jmp 0x140041c6c
lea r8, [rbp - 0x61]
mov rcx, r14
call fcn.14002b300
mov rcx, qword [rbp - 0x59]
test rcx, rcx
je 0x140041ca5
mov eax, r12d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140041ca1
mov rbx, qword [rbp - 0x59]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r12d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140041ca1
mov rcx, qword [rbp - 0x59]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov r15, qword [rbp + 0x1f]
lea rsi, [rbp + 0xf]
cmp qword [rbp + 0x27], 0x10
cmovae rsi, qword [rbp + 0xf]
cmp r15, 7
jb 0x140041e64
lea r8, [rsi - 6]
add r8, r15
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 0x140041e64
mov r8d, 7
lea rdx, str.procmon
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x140041d20
inc rbx
lea r8, [rsi - 6]
add r8, r15
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 0x140041ce0
jmp 0x140041e64
sub rbx, rsi
cmp rbx, 0xffffffffffffffff
je 0x140041e64
mov ecx, 0x58
call fcn.14005f8a8
mov rsi, rax
mov qword [rbp - 0x39], rax
test rax, rax
je 0x140041de8
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 - 0x41], rbx
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
mov qword [rbx + 0x28], rax
mov qword [rbx + 0x30], rax
mov qword [rbx + 0x38], rax
mov rcx, rbx
call fcn.140039460
nop
lea rax, vtable.spdlog::sinks::base_sink_class_nitro::platform::MutexImpl_.0
mov qword [rbx], rax
lea rcx, [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
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 0x140041deb
mov rsi, rdi
or dword [rbp - 0x69], 4
lea rax, [rsi + 0x10]
mov qword [rbp - 0x51], rax
mov qword [rbp - 0x49], rsi
xorps xmm0, xmm0
movdqu xmmword [rbp - 1], xmm0
mov rdx, qword [r14 + 8]
cmp qword [r14 + 0x10], rdx
je 0x140041e1f
mov qword [rdx], rax
mov qword [rdx + 8], rsi
mov qword [rbp - 0x49], rdi
add qword [r14 + 8], 0x10
jmp 0x140041e2f
lea r8, [rbp - 0x51]
mov rcx, r14
call fcn.14002b300
mov rdi, qword [rbp - 0x49]
test rdi, rdi
je 0x140041e64
mov eax, r12d
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x140041e64
mov rbx, qword [rbp - 0x49]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], r12d
cmp r12d, 1
jne 0x140041e64
mov rcx, qword [rbp - 0x49]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rbp + 0x27]
cmp rdx, 0x10
jb 0x140041ea3
inc rdx
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140041e9d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140041e9d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005f1b8
nop
mov rax, r14
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.14005f850
lea r11, [rsp + 0xe0]
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
lea rcx, [0x140111680]
call fcn.14005f68c
cmp dword [0x140111680], 0xffffffff
jne 0x140041c0a
mov edx, 2
mov rcx, r13
call sub.MSVCP140.dll__Mtx_init_in_situ
nop
lea rcx, [0x1400c4090]
call fcn.14005f45c
lea rcx, [0x140111680]
call fcn.14005f62c
jmp 0x140041c0a