Function at 0x14001b800
Capabilities:
Query environment variable

Disassembly:
push rdi
push r12
push r13
sub rsp, 0xa0
mov rax, qword [r8 + 0x10]
xor r13d, r13d
cmp qword [0x140183c50], r13
mov r12d, edx
mov rdi, rcx
mov qword [rsp + 0xd0], rax
jne 0x14001b846
lea rcx, str.Audio_subsystem_is_not_initialized
call fcn.14005ec50
xor eax, eax
add rsp, 0xa0
pop r13
pop r12
pop rdi
ret
test r12d, r12d
je 0x14001b86f
cmp dword [0x140183cd4], r13d
jne 0x14001b86f
lea rcx, str.No_capture_support
call fcn.14005ec50
xor eax, eax
add rsp, 0xa0
pop r13
pop r12
pop rdi
ret
mov qword [rsp + 0xc0], rbx
lea rbx, [0x140183d10]
mov qword [rsp + 0xc8], rbp
mov ebp, dword [rsp + 0xe8]
dec ebp
cmp ebp, 0x10
jae 0x14001b8ab
lea rcx, [rbx + rbp*8]
cmp qword [rcx], r13
je 0x14001b8a8
inc ebp
add rcx, 8
cmp ebp, 0x10
jb 0x14001b898
cmp ebp, 0x10
jne 0x14001b8c0
lea rcx, str.Too_many_open_audio_devices
call fcn.14005ec50
xor eax, eax
jmp 0x14001bc14
mov qword [rsp + 0x98], r14
test r9, r9
lea r14, [rsp + 0x30]
mov rcx, r8
cmovne r14, r9
mov rdx, r14
call fcn.14001b540
test eax, eax
je 0x14001bb49
test rdi, rdi
jne 0x14001b95d
mov r8d, dword [0x140185710]
lea rcx, str.SDL_AUDIO_DEVICE_NAME
mov rdx, qword [0x140185718]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, eax
test eax, eax
je 0x14001b956
cmp rbx, qword [0x140185710]
jbe 0x14001b94f
mov rcx, qword [0x140185718]
mov rdx, rbx
call fcn.140061da0
test rax, rax
jne 0x14001b92e
xor edi, edi
jmp 0x14001b956
mov r8d, ebx
mov qword [0x140185718], rax
mov rdx, rax
mov qword [0x140185710], rbx
lea rcx, str.SDL_AUDIO_DEVICE_NAME
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov rdi, qword [0x140185718]
lea rbx, [0x140183d10]
test r12d, r12d
je 0x14001b9f1
cmp dword [0x140183cdc], r13d
je 0x14001baa0
test rdi, rdi
je 0x14001b9c5
movzx ecx, byte [rdi]
lea rdx, str.System_audio_capture_device
mov r8d, ecx
sub r8d, 0x53
jne 0x14001ba4f
sub rdi, rdx
test cl, cl
je 0x14001b9bc
movzx ecx, byte [rdi + rdx + 1]
inc rdx
mov r8d, ecx
movzx eax, byte [rdx]
sub r8d, eax
je 0x14001b992
lea rcx, str.No_such_device
call fcn.14005ec50
xor eax, eax
jmp 0x14001bc0c
test r8d, r8d
jne 0x14001ba4f
xor edi, edi
mov rax, rbx
xor ecx, ecx
nop dword [rax]
mov rdx, qword [rax]
test rdx, rdx
je 0x14001b9e1
cmp dword [rdx + 0x5c], edi
jne 0x14001ba8d
inc ecx
add rax, 8
cmp ecx, 0x10
jb 0x14001b9d0
jmp 0x14001bb2a
cmp dword [0x140183cd8], r13d
je 0x14001baa0
test rdi, rdi
je 0x14001ba62
movzx ecx, byte [rdi]
lea rdx, str.System_audio_output_device
mov r8d, ecx
sub r8d, 0x53
jne 0x14001ba4f
sub rdi, rdx
nop dword [rax]
test cl, cl
je 0x14001ba4a
movzx ecx, byte [rdi + rdx + 1]
inc rdx
mov r8d, ecx
movzx eax, byte [rdx]
sub r8d, eax
je 0x14001ba20
lea rcx, str.No_such_device
call fcn.14005ec50
xor eax, eax
jmp 0x14001bc0c
test r8d, r8d
je 0x14001ba62
lea rcx, str.No_such_device
call fcn.14005ec50
xor eax, eax
jmp 0x14001bc0c
xor edi, edi
mov rax, rbx
xor ecx, ecx
nop dword [rax]
mov rdx, qword [rax]
test rdx, rdx
je 0x14001ba7d
cmp dword [rdx + 0x5c], edi
je 0x14001ba8d
inc ecx
add rax, 8
cmp ecx, 0x10
jb 0x14001ba70
jmp 0x14001bb2a
lea rcx, str.Audio_device_already_open
call fcn.14005ec50
xor eax, eax
jmp 0x14001bc0c
test rdi, rdi
je 0x14001bb2a
mov rcx, qword [0x140183ce8]
call qword [0x140183a20]
mov r10, qword [0x140183d00]
test r12d, r12d
cmovne r10, qword [0x140183d08]
test r10, r10
je 0x14001bb1d
nop dword [rax]
cmp qword [r10], r13
je 0x14001bb0f
mov r9, qword [r10 + 8]
mov rdx, rdi
movzx eax, byte [rdi]
movzx ecx, byte [r9]
mov r8d, ecx
sub r8d, eax
jne 0x14001bb0f
sub r9, rdi
nop
test cl, cl
je 0x14001bb0a
movzx ecx, byte [r9 + rdx + 1]
inc rdx
mov r8d, ecx
movzx eax, byte [rdx]
sub r8d, eax
je 0x14001baf0
jmp 0x14001bb0f
test r8d, r8d
je 0x14001bb1a
mov r10, qword [r10 + 0x40]
test r10, r10
jne 0x14001bad0
jmp 0x14001bb1d
mov r13, qword [r10]
mov rcx, qword [0x140183ce8]
call qword [0x140183a30]
cmp dword [0x140183ce0], 0
jne 0x14001bb50
test r13, r13
jne 0x14001bb50
test rdi, rdi
je 0x14001bb50
lea rcx, str.No_such_device.
call fcn.14005ec50
xor eax, eax
jmp 0x14001bc0c
mov qword [rsp + 0xd8], rsi
mov edx, 0xa0
mov esi, 1
mov ecx, esi
call qword [0x140181b28]
mov rbx, rax
test rax, rax
je 0x14001bec1
mov qword [rsp + 0x90], r15
mov ecx, esi
lock xadd dword [0x140181b40], ecx
lea r15, [rax + 8]
lea edx, [rbp + 1]
mov dword [rax], edx
lea rcx, [0x1400195d0]
movups xmm0, xmmword [r14]
xor eax, eax
test r12d, r12d
movups xmmword [r15], xmm0
setne al
movups xmm1, xmmword [r14 + 0x10]
mov dword [rbx + 0x5c], eax
mov qword [rbx + 0x98], r13
xor r13d, r13d
movups xmmword [r15 + 0x10], xmm1
mov eax, r13d
xchg dword [rbx + 0x50], eax
mov eax, esi
xchg dword [rbx + 0x58], eax
mov eax, esi
xchg dword [rbx + 0x54], eax
cmp qword [0x140183cb0], rcx
jne 0x14001bc31
call fcn.140055920
mov qword [rbx + 0x70], rax
test rax, rax
jne 0x14001bc31
mov rcx, rbx
call fcn.14001b410
lea rcx, str.Couldnt_create_mixer_lock
call fcn.14005ec50
xor eax, eax
mov r15, qword [rsp + 0x90]
mov rsi, qword [rsp + 0xd8]
mov r14, qword [rsp + 0x98]
mov rbx, qword [rsp + 0xc0]
mov rbp, qword [rsp + 0xc8]
add rsp, 0xa0
pop r13
pop r12
pop rdi
ret
mov rdx, rdi
mov rcx, rbx
call qword [0x140183c68]
test eax, eax
js 0x14001beb4
mov eax, dword [r15]
mov edi, r13d
mov edx, dword [rsp + 0xe0]
cmp dword [r14], eax
je 0x14001bc63
test sil, dl
je 0x14001bc61
mov dword [r14], eax
jmp 0x14001bc63
mov edi, esi
movzx ecx, word [rbx + 0xc]
movzx eax, word [r14 + 4]
cmp ax, cx
je 0x14001bc82
test dl, 2
je 0x14001bc80
mov word [r14 + 4], cx
movzx eax, cx
jmp 0x14001bc82
mov edi, esi
movzx ecx, byte [rbx + 0xe]
movzx r9d, byte [r14 + 6]
cmp r9b, cl
je 0x14001bca1
test dl, 4
je 0x14001bc9f
mov byte [r14 + 6], cl
movzx r9d, cl
jmp 0x14001bca1
mov edi, esi
movzx ecx, word [rbx + 0x10]
movzx r8d, word [r14 + 8]
cmp cx, r8w
je 0x14001bcc2
test dl, 8
je 0x14001bcc0
mov word [r14 + 8], cx
movzx r8d, cx
jmp 0x14001bcc2
mov edi, esi
movzx ecx, ax
cmp ecx, 8
je 0x14001bcdd
cmp ecx, 0x10
je 0x14001bcdd
mov edx, 0x1010
cmp ax, dx
je 0x14001bcdd
xor al, al
jmp 0x14001bcdf
mov al, 0x80
mov byte [r14 + 7], al
shr ecx, 3
and ecx, 0x1f
movzx eax, r8w
imul ecx, eax
movzx eax, r9b
imul ecx, eax
mov dword [r14 + 0xc], ecx
movups xmm0, xmmword [r14]
movups xmmword [rbx + 0x28], xmm0
movups xmm1, xmmword [r14 + 0x10]
movups xmmword [rbx + 0x38], xmm1
test edi, edi
je 0x14001bd63
test r12d, r12d
je 0x14001bd2c
movzx ecx, word [rbx + 0xc]
movzx edx, byte [rbx + 0xe]
movzx r9d, word [r14 + 4]
movzx eax, byte [r14 + 6]
mov r8d, dword [r14]
jmp 0x14001bd45
mov r8d, dword [r15]
mov r15, r14
movzx ecx, word [r14 + 4]
movzx edx, byte [r14 + 6]
movzx r9d, word [rbx + 0xc]
movzx eax, byte [rbx + 0xe]
mov dword [rsp + 0x28], r8d
mov r8d, dword [r15]
mov byte [rsp + 0x20], al
call fcn.140042fc0
mov qword [rbx + 0x48], rax
test rax, rax
je 0x14001beb4
cmp qword [rbx + 0x18], r13
jne 0x14001bdb7
mov eax, dword [r14 + 0xc]
mov ecx, 0x2000
lea edx, [rax + rax]
call fcn.140076df0
mov qword [rbx + 0x88], rax
test rax, rax
jne 0x14001bd9a
mov rcx, rbx
call fcn.14001b410
lea rcx, str.Couldnt_create_audio_buffer_queue
jmp 0x14001bbf5
test r12d, r12d
mov qword [rbx + 0x40], rbx
lea rax, [0x140019b10]
lea rcx, [0x140019b60]
cmovne rax, rcx
mov qword [rbx + 0x38], rax
test edi, edi
je 0x14001bdc0
mov eax, dword [rbx + 0x34]
jmp 0x14001bdc3
mov eax, r13d
mov ecx, dword [rbx + 0x14]
mov dword [rbx + 0x68], eax
cmp ecx, eax
jbe 0x14001bdd2
mov dword [rbx + 0x68], ecx
mov eax, ecx
test eax, eax
mov ecx, eax
cmove rcx, rsi
call qword [fcn.140061120]
test rax, rax
je 0x14001bded
lock xadd dword [0x140181b40], esi
mov qword [rbx + 0x60], rax
test rax, rax
jne 0x14001be0a
mov rcx, rbx
call fcn.14001b410
lea rcx, str.Out_of_memory
jmp 0x14001bbf5
cmp dword [0x140183cd0], r13d
lea rcx, [0x140183d10]
mov qword [rcx + rbp*8], rbx
jne 0x14001bead
mov eax, 0x43
lea r8, str.SDLAudio_c_d
mov r9d, 0x50
lea rcx, [rsp + 0x50]
test r12d, r12d
mov edx, 0x40
cmovne r9d, eax
mov eax, dword [rbx]
mov dword [rsp + 0x20], eax
call fcn.14003b010
cmp qword [rsp + 0xd0], r13
lea rcx, [0x140019dd0]
mov eax, 0x10000
mov qword [rsp + 0x28], r13
mov r8, r13
mov qword [rsp + 0x20], r13
cmove r8, rax
lea rdx, [rsp + 0x50]
lea rax, [0x14001a1c0]
test r12d, r12d
mov r9, rbx
cmovne rcx, rax
call fcn.140037390
mov qword [rbx + 0x78], rax
test rax, rax
jne 0x14001bead
mov rcx, rbx
call fcn.14001b410
lea rcx, str.Couldnt_create_audio_thread
jmp 0x14001bbf5
mov eax, dword [rbx]
jmp 0x14001bbfc
mov rcx, rbx
call fcn.14001b410
jmp 0x14001bbfa
lea rcx, str.Out_of_memory
call fcn.14005ec50
xor eax, eax
jmp 0x14001bc04