Function at 0x140002930
Capabilities:
Query environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1a8]
sub rsp, 0x2a8
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x14000b010]
xor rax, rsp
mov qword [rbp + 0x190], rax
mov r14, r9
mov r13, r8
mov r12, rdx
mov r15, rcx
xor sil, sil
mov rdi, qword [0x14000b778]
xor ebx, ebx
mov qword [rsp + 0x70], rbx
test rdi, rdi
je 0x1400029d2
mov qword [rsp + 0x70], rdi
mov eax, 1
lock xadd dword [rdi], eax
inc eax
cmp eax, 1
jle 0x1400029bb
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
cmp dword [rdi + 4], ecx
je 0x1400029ca
or edx, 0xffffffff
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
mov dword [rdi + 4], ecx
inc dword [rdi + 8]
mov rbx, qword [rsp + 0x70]
cmp byte [0x14000b819], 0
je 0x140002bbb
cmp byte [0x14000b7c4], 0
je 0x140002bbb
cmp byte [0x14000b7cc], 0
je 0x140002bbb
cmp qword [0x14000b7e0], 0
jne 0x140002bbb
mov r8d, 0x208
lea rdx, [rbp - 0x80]
lea rcx, str.log_enabled
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140002b0a
mov sil, 1
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
mov ecx, eax
test eax, eax
setne al
mov byte [r15], al
test ecx, ecx
je 0x140002b0a
mov r8d, 0x208
lea rdx, [rbp - 0x80]
lea rcx, str.log_minpriority
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140002a81
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
cmp eax, 3
jge 0x140002a81
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
mov dword [r12], eax
xor edi, edi
jmp 0x140002a87
xor edi, edi
mov dword [r12], edi
mov r8d, 0x208
lea rdx, [rbp - 0x80]
lea rcx, str.log_destination
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140002ac1
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
cmp eax, 2
jge 0x140002ac1
lea rcx, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
mov dword [r13], eax
jmp 0x140002ac5
mov dword [r13], edi
mov r8d, 0x208
lea rdx, [rbp - 0x80]
lea rcx, str.log_component_ids
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140002aee
mov r8, r14
lea rdx, [rbp - 0x80]
call fcn.140003480
jmp 0x140002b0a
mov dword [rsp + 0x38], edi
movzx r9d, byte [rsp + 0x30]
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x48]
mov rcx, r14
call fcn.140004210
cmp byte [r15], 0
jne 0x140002bec
lea r8, [rsp + 0x68]
lea rdx, str.log_enabled
call fcn.140004e40
test al, al
je 0x140002bec
mov ecx, dword [rsp + 0x68]
test ecx, ecx
je 0x140002bec
mov sil, 1
setne al
mov byte [r15], al
lea r8, [rsp + 0x68]
lea rdx, str.log_minpriority
call fcn.140004e40
xor ecx, ecx
test al, al
cmovne ecx, dword [rsp + 0x68]
mov dword [r12], ecx
lea r8, [rsp + 0x68]
lea rdx, str.log_destination
call fcn.140004e40
xor ecx, ecx
test al, al
cmovne ecx, dword [rsp + 0x68]
mov dword [r13], ecx
lea r8, [rbp - 0x80]
call fcn.140004ce0
test al, al
je 0x140002b99
mov r8, r14
lea rdx, [rbp - 0x80]
call fcn.140003480
jmp 0x140002bec
mov dword [rsp + 0x34], 0
movzx r9d, byte [rsp + 0x30]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x58]
mov rcx, r14
call fcn.140004210
jmp 0x140002bec
mov sil, 1
movzx eax, byte [0x14000b818]
mov byte [r15], al
mov eax, dword [0x14000b7c0]
mov dword [r12], eax
mov eax, dword [0x14000b7c8]
mov dword [r13], eax
lea rdx, [0x14000b7d0]
mov rcx, r14
call fcn.140003760
nop
test rbx, rbx
je 0x140002c26
add dword [rbx + 8], 0xffffffff
mov eax, dword [rbx + 8]
jne 0x140002c01
mov dword [rbx + 4], 0
or ecx, 0xffffffff
lock xadd dword [rbx], ecx
cmp ecx, 1
je 0x140002c26
test eax, eax
jne 0x140002c26
xor r8d, r8d
lea edx, [rax + 1]
mov rcx, qword [rsp + 0x70]
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
movzx eax, sil
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.140004fa0
add rsp, 0x2a8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret