Function at 0x140001f50
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 0x140002020
dec esi
js 0x140001fd7
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 0x140001fa9
lea r15d, [rbx + 1]
cmp r15d, esi
jg 0x140001fd7
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 0x140002010
jns 0x140001fa0
lea esi, [rbx - 1]
cmp r15d, esi
jle 0x140001fa9
mov rdi, qword [rbp + 0x50]
movzx eax, byte [0x140004070]
cmp byte [rdi], 0
js 0x140002000
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 0x140001fe7
movzx eax, byte [r14]
jmp 0x140001fe7
lea rcx, str.WINEDEBUG
call qword [sym.imp.ucrtbase.dll_getenv]
mov dword [0x1400041c0], 0
mov rcx, rax
test rax, rax
je 0x140001fd7
call qword [sym.imp.ucrtbase.dll__strdup]
mov qword [rbp - 8], rax
test rax, rax
je 0x14000218a
mov r12, qword [rbp - 8]
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 0x14000207d
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 0x140002128
cmp r15, r12
jbe 0x1400021b0
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 0x1400020e2
mov r8, rbx
mov rdx, r15
mov rcx, r12
call sym.memcmp
test eax, eax
je 0x140002300
inc r14
cmp r14, 4
je 0x140002118
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 0x1400020cc
inc r14
cmp r14, 4
jne 0x1400020eb
nop word [rax + rax]
test r13, r13
je 0x140002180
mov r12, r13
jmp 0x140002060
movzx esi, byte [r12]
cmp sil, 0x2d
je 0x140002198
lea ebx, [rsi - 0x2b]
and ebx, 0xfd
je 0x140002258
mov r14d, 0xffffffff
xor ebx, ebx
test sil, sil
je 0x140002118
mov ecx, 4
mov rsi, r12
lea rdi, [0x1400053f3]
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x1400021c0
not ebx
and bl, byte [0x140004070]
or r14d, ebx
mov byte [0x140004070], r14b
test r13, r13
jne 0x14000211d
mov rcx, qword [rbp - 8]
call qword [sym.imp.ucrtbase.dll_free]
mov esi, dword [0x1400041c0]
jmp 0x140001f78
mov ebx, 0xffffffff
xor r14d, r14d
mov r15, r12
movzx esi, byte [r15 + 1]
lea r12, [r15 + 1]
jmp 0x14000214a
mov r12, r15
jmp 0x14000212d
mov rcx, r12
call qword [sym.imp.ucrtbase.dll_strlen]
mov qword [rbp - 0x18], rax
cmp rax, 0xe
ja 0x140002118
mov eax, dword [0x1400041c0]
mov rcx, qword [0x140004060]
mov dword [rbp - 0x10], eax
dec eax
mov qword [rbp - 0x20], rcx
mov edi, eax
js 0x1400023ff
mov rax, qword [sym.imp.ucrtbase.dll_strcmp]
xor r15d, r15d
mov qword [rbp - 0x28], r13
mov byte [rbp - 0x2a], bl
mov r13d, r15d
mov rbx, rcx
mov byte [rbp - 0x29], r14b
mov r15, rax
jmp 0x140002221
lea r13d, [r14 + 1]
cmp r13d, edi
jg 0x140002282
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 0x140002266
jns 0x140002218
lea edi, [r14 - 1]
jmp 0x14000221c
mov r15, r12
mov r14d, 0xffffffff
jmp 0x1400021a3
movzx ebx, byte [rbp - 0x2a]
movzx r14d, byte [rbp - 0x29]
mov r13, qword [rbp - 0x28]
not ebx
and bl, byte [rsi]
or r14d, ebx
mov byte [rsi], r14b
jmp 0x140002118
movsxd rsi, r13d
movzx r14d, byte [rbp - 0x29]
movzx ebx, byte [rbp - 0x2a]
mov r13, qword [rbp - 0x28]
mov r15, rsi
shl rsi, 4
mov eax, dword [0x1400041d0]
cmp dword [rbp - 0x10], eax
jge 0x140002395
add rsi, qword [rbp - 0x20]
cmp r15d, dword [rbp - 0x10]
jl 0x140002368
mov rax, qword [rbp - 0x18]
lea rcx, [rsi + 1]
inc rax
cmp eax, 8
jae 0x140002339
test al, 4
jne 0x140002417
test eax, eax
je 0x1400022e2
movzx edx, byte [r12]
mov byte [rsi + 1], dl
test al, 2
jne 0x14000242e
mov eax, dword [rbp - 0x10]
not ebx
and bl, byte [0x140004070]
or r14d, ebx
inc eax
mov byte [rsi], r14b
mov dword [0x1400041c0], eax
jmp 0x140002118
mov r14d, 1
mov ecx, edi
mov r15, qword [rbp - 0x10]
shl r14d, cl
mov ebx, r14d
cmp sil, 0x2b
je 0x1400023f5
sub esi, 0x2b
and esi, 0xfd
mov r14d, esi
je 0x1400021a3
mov r12, r15
xor r14d, r14d
jmp 0x14000214f
mov edx, eax
dec eax
mov r8, qword [r12 + rdx - 8]
mov qword [rcx + rdx - 8], r8
cmp eax, 8
jb 0x1400022e2
and eax, 0xfffffff8
xor edx, edx
mov r8d, edx
add edx, 8
mov r9, qword [r12 + r8]
mov qword [rcx + r8], r9
cmp edx, eax
jb 0x140002351
jmp 0x1400022e2
mov r8d, dword [rbp - 0x10]
lea eax, [r15 + 1]
mov rcx, qword [rbp - 0x20]
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 0x1400022b6
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 - 0x20], 0
mov rcx, qword [rax + 0x30]
je 0x140002409
mov r9, r8
xor edx, edx
mov r8, qword [rbp - 0x20]
call qword [sym.imp.kernel32.dll_HeapReAlloc]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov qword [0x140004060], rax
mov eax, dword [0x1400041c0]
mov dword [rbp - 0x10], eax
jmp 0x1400022a8
mov r12, r15
xor ebx, ebx
jmp 0x1400021a0
xor esi, esi
xor r15d, r15d
jmp 0x140002299
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov qword [rbp - 0x20], rax
jmp 0x1400023dc
mov edx, dword [r12]
mov eax, eax
mov dword [rsi + 1], edx
mov edx, dword [r12 + rax - 4]
mov dword [rcx + rax - 4], edx
jmp 0x1400022e2
mov eax, eax
movzx edx, word [r12 + rax - 2]
mov word [rcx + rax - 2], dx
jmp 0x1400022e2