Function at 0x410550
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x80]
movzx esi, byte [rcx]
mov rbx, rcx
cmp sil, 0x24
je 0x41057e
cmp sil, 0x40
jne 0x410748
movzx eax, byte [rbx + 1]
lea r12, [rbp - 0x34]
lea rdi, [rbp - 0x38]
lea rdx, [rbx + 1]
test al, al
je 0x410668
nop word cs:[rax + rax]
cmp al, 0x2f
je 0x410668
cmp al, 0x5c
je 0x410668
lea rax, [rbx + 2]
mov r14d, 1
jmp 0x4105d5
add rax, 1
cmp cl, 0x2f
lea r10, [r14 + 1]
je 0x4105e2
cmp cl, 0x5c
je 0x4105e2
mov r14, r10
movzx ecx, byte [rax]
mov r8d, r14d
mov r15, rax
test cl, cl
jne 0x4105c0
lea eax, [r8 + 1]
cdqe
add rax, 0x1e
and rax, 0xfffffffffffffff0
call fcn.004765e0
sub rsp, rax
mov r8, r14
lea r13, [rsp + 0x30]
mov rcx, r13
call sub.msvcrt.dll_memcpy
cmp sil, 0x40
mov byte [r13 + r14], 0
je 0x410680
mov rcx, r13
call sub.msvcrt.dll_getenv
test rax, rax
mov r14, rax
je 0x41073c
xor r8d, r8d
mov rcx, r14
mov rdx, r15
call fcn.004662a0
mov rcx, rbx
mov r14, rax
call fcn.00483488
movzx esi, byte [r14]
cmp sil, 0x40
je 0x410655
cmp sil, 0x24
jne 0x41074b
mov rbx, r14
movzx eax, byte [rbx + 1]
lea rdx, [rbx + 1]
test al, al
jne 0x4105a0
mov r15, rdx
mov eax, 1
xor r14d, r14d
jmp 0x4105e8
cmp qword [0x00489a20], 0xffffffffffffffff
je 0x41075f
mov ecx, 0x20
mov dword [rbp - 0x38], 0x20
call fcn.0046aaf0
xor r8d, r8d
mov r14, rax
mov rcx, qword [0x00489a20]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
mov r9, r12
mov rdx, r13
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, 0xea
mov rcx, r14
je 0x4106e8
cmp dword [rbp - 0x34], 1
jne 0x4106f2
xor esi, esi
test eax, eax
mov r14, rcx
jne 0x4106f2
mov rcx, rsi
call fcn.00483488
jmp 0x410628
cmp dword [rbp - 0x34], 1
je 0x4107f0
call fcn.00483488
lea rdx, str._ROOT
xor r8d, r8d
mov rcx, r13
call fcn.004662a0
mov rcx, rax
mov rsi, rax
mov qword [rbp - 0x48], rax
call sub.msvcrt.dll_getenv
test rax, rax
mov r14, rax
mov r8, qword [rbp - 0x48]
jne 0x4106db
mov r14, qword [str._builds_idf_crosstool_NG_builds_xtensa_esp32s3_elf]
mov rcx, r8
call fcn.00483488
test r14, r14
jne 0x410628
lea r14, str._builds_idf_crosstool_NG_builds_xtensa_esp32s3_elf
jmp 0x410628
mov r14, rcx
mov rax, r14
lea rsp, [rbp - 0x28]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea r14, [0x00489a20]
xor r8d, r8d
mov r9d, 0x20019
lea rdx, str.SOFTWARE
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x41079c
mov qword [0x00489a20], 0xffffffffffffffff
jmp 0x4106f7
xor r8d, r8d
mov qword [rsp + 0x20], r14
mov r9d, 0x20019
lea rdx, str.Free_Software_Foundation
mov rcx, qword [0x00489a20]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41078c
xor r8d, r8d
mov qword [rsp + 0x20], r14
mov r9d, 0x20019
lea rdx, [0x0048ff85]
mov rcx, qword [0x00489a20]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x41068e
jmp 0x41078c
mov edx, dword [rbp - 0x38]
call fcn.0046ab70
mov r14, rax
mov rcx, qword [0x00489a20]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
mov r9, r12
xor r8d, r8d
mov rdx, r13
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov rcx, r14
jmp 0x4106cc