Function at 0x1400b1d00
Capabilities:
Query environment variable

Disassembly:
sub rsp, 0x158
mov rax, qword [0x140188ca0]
xor rax, rsp
mov qword [rsp + 0x130], rax
cmp dword [0x14018c3c4], 0
jne 0x1400b1fa0
lea rcx, str.XML_DEBUG_CATALOG
mov qword [rsp + 0x140], r15
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, dword [0x14018c3c0]
mov r15d, 1
test rax, rax
cmovne edx, r15d
mov dword [0x14018c3c0], edx
call fcn.14008f340
mov rcx, rax
mov qword [0x14018c3d8], rax
mov dword [0x14018c3c4], r15d
call fcn.14008f380
lea rcx, str.XML_DEBUG_CATALOG
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov ecx, dword [0x14018c3c0]
test rax, rax
cmovne ecx, r15d
cmp qword [0x14018c3d0], 0
mov dword [0x14018c3c0], ecx
jne 0x1400b1f8c
mov qword [rsp + 0x160], rbx
lea rcx, str.XML_CATALOG_FILES
mov qword [rsp + 0x168], rbp
mov qword [rsp + 0x178], rdi
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rbx, rax
test rax, rax
jne 0x1400b1e81
lea rcx, str.libxml2.dll
call sub.KERNEL32.dll_GetModuleHandleA
lea rbx, str.file:___etc_xml_catalog
test rax, rax
jne 0x1400b1df6
xor ecx, ecx
call sub.KERNEL32.dll_GetModuleHandleA
test rax, rax
je 0x1400b1e81
mov r8d, 0xff
lea rdx, [rsp + 0x30]
mov rcx, rax
call sub.KERNEL32.dll_GetModuleFileNameA
test eax, eax
je 0x1400b1e81
mov eax, eax
lea rcx, [rsp + 0x30]
add rcx, rax
cmp byte [rcx], 0x5c
je 0x1400b1e32
nop dword [rax]
lea rax, [rsp + 0x30]
cmp rcx, rax
jbe 0x1400b1e32
dec rcx
cmp byte [rcx], 0x5c
jne 0x1400b1e20
lea rax, [rsp + 0x30]
cmp rcx, rax
je 0x1400b1e81
lea r8, [rsp + 0x12f]
sub r8, rcx
lea rdx, str...etccatalog
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
lea rcx, [rsp + 0x30]
call fcn.1400af700
mov rdi, rax
test rax, rax
je 0x1400b1e81
mov r8d, 0xff
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov rcx, rdi
call qword [fcn.14013e100]
mov edx, dword [0x140189454]
mov ecx, r15d
call fcn.1400b39b0
mov rbp, rax
test rax, rax
je 0x1400b1f74
cmp byte [rbx], 0
mov qword [rsp + 0x170], rsi
lea rsi, [rax + 0x70]
je 0x1400b1f65
mov qword [rsp + 0x150], r12
xor r12d, r12d
mov qword [rsp + 0x148], r14
movabs r14, 0x100002600
nop dword [rax]
movzx eax, byte [rbx]
cmp al, 0x20
ja 0x1400b1ee6
movsx rax, al
bt r14, rax
jae 0x1400b1ee6
inc rbx
jmp 0x1400b1ed0
movzx eax, byte [rbx]
test al, al
je 0x1400b1f55
mov rcx, rbx
cmp al, 0x20
ja 0x1400b1efe
movsx rax, al
bt r14, rax
jb 0x1400b1f09
movzx eax, byte [rbx + 1]
inc rbx
test al, al
jne 0x1400b1ef0
mov edx, ebx
sub edx, ecx
call fcn.14008c8f0
mov rdi, rax
test rax, rax
je 0x1400b1f4c
mov ecx, dword [0x140189454]
mov r9, rax
mov qword [rsp + 0x28], r12
xor r8d, r8d
mov dword [rsp + 0x20], ecx
xor edx, edx
mov ecx, r15d
call fcn.1400b3510
test rax, rax
mov qword [rsi], rax
mov rcx, rdi
cmovne rsi, rax
call qword [fcn.14013e100]
cmp byte [rbx], r12b
jne 0x1400b1ed0
mov r12, qword [rsp + 0x150]
mov r14, qword [rsp + 0x148]
mov rsi, qword [rsp + 0x170]
mov qword [0x14018c3d0], rbp
mov rbp, qword [rsp + 0x168]
mov rbx, qword [rsp + 0x160]
mov rdi, qword [rsp + 0x178]
mov rcx, qword [0x14018c3d8]
call fcn.14008f3a0
mov r15, qword [rsp + 0x140]
mov rcx, qword [rsp + 0x130]
xor rcx, rsp
call fcn.1400677f0
add rsp, 0x158
ret