Function at 0x4096f3
Capabilities:
Query environment variable

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp + 0x10], rcx
lea rcx, str.LIBUSB_DEBUG
call sym.getenv
mov qword [rbp - 0x20], rax
mov dword [rbp - 0x14], 0
lea rcx, [0x00528f00]
call sym.usbi_mutex_static_lock
cmp qword [rbp + 0x10], 0
jne 0x40975a
mov rax, qword [0x00528ef0]
test rax, rax
je 0x40975a
mov eax, dword [0x00528efc]
add eax, 1
mov dword [0x00528efc], eax
lea rcx, [0x00528f00]
call sym.usbi_mutex_static_unlock
mov eax, 0
jmp 0x409a0a
mov ecx, 0x100
call sym.malloc
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x40977b
mov dword [rbp - 0x14], 0xfffffff5
jmp 0x4099fb
mov rax, qword [rbp - 0x28]
mov r8d, 0x100
mov edx, 0
mov rcx, rax
call sym.memset
cmp qword [rbp - 0x20], 0
je 0x4097c0
mov rax, qword [rbp - 0x20]
mov rcx, rax
call sym.atoi
mov rdx, qword [rbp - 0x28]
mov dword [rdx], eax
mov rax, qword [rbp - 0x28]
mov eax, dword [rax]
test eax, eax
je 0x4097c0
mov rax, qword [rbp - 0x28]
mov dword [rax + 4], 1
mov rax, qword [rbp - 0x28]
add rax, 0x20
mov edx, 0
mov rcx, rax
call sym.usbi_mutex_init
mov rax, qword [rbp - 0x28]
add rax, 0x38
mov edx, 0
mov rcx, rax
call sym.usbi_mutex_init
mov rax, qword [rbp - 0x28]
add rax, 0x50
mov edx, 0
mov rcx, rax
call sym.usbi_mutex_init
mov rax, qword [rbp - 0x28]
add rax, 0x10
mov rcx, rax
call sym.list_init_1
mov rax, qword [rbp - 0x28]
add rax, 0x28
mov rcx, rax
call sym.list_init_1
mov rax, qword [rbp - 0x28]
add rax, 0x40
mov rcx, rax
call sym.list_init_1
mov rax, qword [0x00514ea0]
mov rax, qword [rax + 8]
test rax, rax
je 0x409860
mov rax, qword [0x00514ea0]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x28]
mov rcx, rax
call rdx
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 0
jne 0x409963
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.usbi_io_init
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 0
jns 0x40989b
mov rax, qword [0x00514ea0]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x409940
mov rax, qword [0x00514ea0]
mov rax, qword [rax + 0x10]
call rax
jmp 0x409940
cmp qword [rbp + 0x10], 0
je 0x4098af
mov rax, qword [rbp + 0x10]
mov rdx, qword [rbp - 0x28]
mov qword [rax], rdx
jmp 0x4098d5
mov rax, qword [0x00528ef0]
test rax, rax
jne 0x4098d5
mov rax, qword [rbp - 0x28]
mov qword [0x00528ef0], rax
mov eax, dword [0x00528efc]
add eax, 1
mov dword [0x00528efc], eax
lea rcx, [0x00528f00]
call sym.usbi_mutex_static_unlock
lea rcx, [0x00528ef8]
call sym.usbi_mutex_static_lock
mov eax, dword [0x004f1c20]
test eax, eax
je 0x409910
mov dword [0x004f1c20], 0
lea rax, [0x0052c1b0]
mov rcx, rax
call sym.list_init_1
mov rax, qword [rbp - 0x28]
lea rcx, [rax + 0xf0]
lea rax, [0x0052c1b0]
mov rdx, rax
call sym.list_add
lea rcx, [0x00528ef8]
call sym.usbi_mutex_static_unlock
mov eax, 0
jmp 0x409a0a
nop
mov rax, qword [rbp - 0x28]
add rax, 0x38
mov rcx, rax
call sym.usbi_mutex_destroy
mov rax, qword [rbp - 0x28]
add rax, 0x20
mov rcx, rax
call sym.usbi_mutex_destroy
jmp 0x409964
nop
mov rax, qword [rbp - 0x28]
add rax, 0x20
mov rcx, rax
call sym.usbi_mutex_lock
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 0x18]
sub rax, 0x20
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x28]
sub rax, 0x20
mov qword [rbp - 0x10], rax
jmp 0x4099ca
mov rax, qword [rbp - 8]
add rax, 0x20
mov rcx, rax
call sym.list_del
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.libusb_unref_device
mov rax, qword [rbp - 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x28]
sub rax, 0x20
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 8]
lea rdx, [rax + 0x20]
mov rax, qword [rbp - 0x28]
add rax, 0x10
cmp rdx, rax
jne 0x409996
mov rax, qword [rbp - 0x28]
add rax, 0x20
mov rcx, rax
call sym.usbi_mutex_unlock
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sym.free
lea rcx, [0x00528f00]
call sym.usbi_mutex_static_unlock
mov eax, dword [rbp - 0x14]
add rsp, 0x50
pop rbp
ret