Function at 0x140001f30
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov esi, dword [0x1400041c0]
mov qword [rbp + 0x50], rcx
cmp esi, 0xffffffff
je 0x140002000
dec esi
js 0x140001fb7
mov rax, qword [rbp + 0x50]
mov r13, qword [0x140004060]
xor r15d, r15d
mov rdi, qword [sym.imp.ucrtbase.dll_strcmp]
lea r12, [rax + 1]
jmp 0x140001f89
lea r15d, [rbx + 1]
cmp r15d, esi
jg 0x140001fb7
lea eax, [rsi + r15]
mov rcx, r12
mov ebx, eax
shr ebx, 0x1f
add ebx, eax
sar ebx, 1
movsxd r14, ebx
shl r14, 4
add r14, r13
lea rdx, [r14 + 1]
call rdi
test eax, eax
je 0x140001ff0
jns 0x140001f80
lea esi, [rbx - 1]
cmp r15d, esi
jle 0x140001f89
mov rdi, qword [rbp + 0x50]
movzx eax, byte [0x140004070]
cmp byte [rdi], 0
js 0x140001fe0
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rdi, qword [rbp + 0x50]
mov byte [rdi], al
jmp 0x140001fc7
movzx eax, byte [r14]
jmp 0x140001fc7
lea rcx, str.WINEDEBUG
call qword [sym.imp.ucrtbase.dll_getenv]
mov dword [0x1400041c0], 0
mov rcx, rax
test rax, rax
je 0x140001fb7
call qword [sym.imp.ucrtbase.dll__strdup]
mov qword [rbp - 8], rax
mov r12, qword [rbp - 8]
test rax, rax
je 0x140002237
nop word cs:[rax + rax]
mov edx, 0x2c
mov rcx, r12
xor r13d, r13d
call qword [sym.imp.ucrtbase.dll_strchr]
test rax, rax
je 0x14000205d
mov byte [rax], 0
lea r13, [rax + 1]
lea rdx, [0x1400053f0]
mov rcx, r12
call qword [sym.imp.ucrtbase.dll_strcspn]
lea r15, [r12 + rax]
mov rbx, rax
movzx esi, byte [r15]
test sil, sil
je 0x140002110
cmp r15, r12
jbe 0x140002180
xor edi, edi
lea r14, str.fixme
mov eax, 5
mov qword [rbp - 0x10], r15
cdqe
mov r15, r14
mov r14, rdi
mov edi, r14d
cmp rax, rbx
jne 0x1400020c2
mov r8, rbx
mov rdx, r15
mov rcx, r12
call sym.memcmp
test eax, eax
je 0x1400022b9
inc r14
cmp r14, 4
je 0x1400020f8
lea rax, str.fixme
mov edi, r14d
mov r15, qword [rax + r14*8]
mov rcx, r15
call qword [sym.imp.ucrtbase.dll_strlen]
cdqe
cmp rax, rbx
je 0x1400020ac
inc r14
cmp r14, 4
jne 0x1400020cb
nop word [rax + rax]
test r13, r13
je 0x14000222d
mov r12, r13
jmp 0x140002040
movzx esi, byte [r12]
cmp sil, 0x2d
je 0x140002168
lea ebx, [rsi - 0x2b]
and ebx, 0xfd
je 0x140002188
mov r14d, 0xffffffff
xor ebx, ebx
test sil, sil
je 0x1400020f8
mov ecx, 4
mov rsi, r12
lea rdi, [0x1400053f3]
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x140002198
not ebx
and bl, byte [0x140004070]
or r14d, ebx
mov byte [0x140004070], r14b
jmp 0x1400020f8
mov ebx, 0xffffffff
xor r14d, r14d
mov r15, r12
movzx esi, byte [r15 + 1]
lea r12, [r15 + 1]
jmp 0x14000212e
mov r12, r15
jmp 0x140002115
mov r15, r12
mov r14d, 0xffffffff
jmp 0x140002173
mov rcx, r12
call qword [sym.imp.ucrtbase.dll_strlen]
cmp rax, 0xe
ja 0x1400020f8
mov eax, dword [0x1400041c0]
mov rcx, qword [0x140004060]
mov dword [rbp - 0x10], eax
dec eax
mov qword [rbp - 0x18], rcx
mov edi, eax
js 0x140002389
mov rax, qword [sym.imp.ucrtbase.dll_strcmp]
xor r15d, r15d
mov qword [rbp - 0x20], r13
mov byte [rbp - 0x22], bl
mov r13d, r15d
mov rbx, rcx
mov byte [rbp - 0x21], r14b
mov r15, rax
jmp 0x1400021f9
lea r13d, [r14 + 1]
cmp r13d, edi
jg 0x14000225e
lea eax, [rdi + r13]
mov rcx, r12
mov r8d, eax
shr r8d, 0x1f
add r8d, eax
sar r8d, 1
movsxd rsi, r8d
mov r14, rsi
shl rsi, 4
add rsi, rbx
lea rdx, [rsi + 1]
call r15
test eax, eax
je 0x140002242
jns 0x1400021f0
lea edi, [r14 - 1]
jmp 0x1400021f4
mov rcx, qword [rbp - 8]
call qword [sym.imp.ucrtbase.dll_free]
mov esi, dword [0x1400041c0]
jmp 0x140001f58
movzx ebx, byte [rbp - 0x22]
movzx r14d, byte [rbp - 0x21]
mov r13, qword [rbp - 0x20]
not ebx
and bl, byte [rsi]
or r14d, ebx
mov byte [rsi], r14b
jmp 0x1400020f8
movsxd rsi, r13d
movzx r14d, byte [rbp - 0x21]
movzx ebx, byte [rbp - 0x22]
mov r13, qword [rbp - 0x20]
mov r15, rsi
shl rsi, 4
mov eax, dword [0x1400041d0]
cmp dword [rbp - 0x10], eax
jge 0x14000231f
add rsi, qword [rbp - 0x18]
cmp r15d, dword [rbp - 0x10]
jl 0x1400022f2
lea rcx, [rsi + 1]
mov rdx, r12
not ebx
call qword [sym.imp.ucrtbase.dll_strcpy]
mov eax, dword [rbp - 0x10]
and bl, byte [0x140004070]
or r14d, ebx
inc eax
mov byte [rsi], r14b
mov dword [0x1400041c0], eax
jmp 0x1400020f8
mov r14d, 1
mov ecx, edi
mov r15, qword [rbp - 0x10]
shl r14d, cl
mov ebx, r14d
cmp sil, 0x2b
je 0x14000237f
sub esi, 0x2b
and esi, 0xfd
mov r14d, esi
je 0x140002173
mov r12, r15
xor r14d, r14d
jmp 0x140002133
mov r8d, dword [rbp - 0x10]
lea eax, [r15 + 1]
mov rcx, qword [rbp - 0x18]
mov rdx, rsi
cdqe
sub r8d, r15d
shl rax, 4
movsxd r8, r8d
add rcx, rax
shl r8, 4
call qword [sym.imp.ucrtbase.dll_memmove]
jmp 0x14000228e
add eax, eax
mov edx, 0x10
cmp eax, 0x10
cmovl eax, edx
mov dword [0x1400041d0], eax
cdqe
shl rax, 4
mov r8, rax
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
cmp qword [rbp - 0x18], 0
mov rcx, qword [rax + 0x30]
je 0x140002393
mov r9, r8
xor edx, edx
mov r8, qword [rbp - 0x18]
call qword [sym.imp.kernel32.dll_HeapReAlloc]
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
mov qword [0x140004060], rax
mov eax, dword [0x1400041c0]
mov dword [rbp - 0x10], eax
jmp 0x140002284
mov r12, r15
xor ebx, ebx
jmp 0x140002170
xor esi, esi
xor r15d, r15d
jmp 0x140002275
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov qword [rbp - 0x18], rax
jmp 0x140002366