Function at 0x1400041a0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov qword [rsp + 0x30], rcx
mov ebx, dword [0x140007020]
cmp ebx, 0xffffffff
je 0x1400041cd
test ebx, ebx
jg 0x140004500
jmp 0x14000455a
lea rcx, str.WINEDEBUG
call qword [sym.imp.ucrtbase.dll_getenv]
mov dword [0x140007020], 0
test rax, rax
je 0x14000455a
mov rcx, rax
call qword [sym.imp.ucrtbase.dll__strdup]
test rax, rax
je 0x1400044f6
mov rsi, qword [sym.imp.ucrtbase.dll_strchr]
lea rbx, [0x140005b42]
mov r14, qword [sym.imp.ucrtbase.dll_strcspn]
mov qword [rsp + 0x38], rax
mov rdi, rax
jmp 0x140004249
not r13b
and r13b, byte [0x140007024]
or r13b, r12b
mov byte [0x140007024], r13b
nop word cs:[rax + rax]
test rdi, rdi
je 0x1400044eb
mov r12, rdi
mov rcx, rdi
mov edx, 0x2c
call rsi
test rax, rax
je 0x140004270
mov rdi, rax
inc rdi
mov byte [rax], 0
jmp 0x140004272
xor edi, edi
mov rcx, r12
mov rdx, rbx
call r14
lea r15, [r12 + rax]
cmp byte [r12 + rax], 0
cmove r15, r12
mov rax, r15
sub rax, r12
jbe 0x1400042e0
cmp rax, 3
je 0x14000430c
cmp rax, 4
je 0x1400042fa
cmp rax, 5
jne 0x140004240
mov eax, dword [r12]
mov ecx, 0x6d786966
xor eax, ecx
movzx ecx, byte [r12 + 4]
xor ecx, 0x65
or ecx, eax
je 0x14000432c
mov eax, dword [r12]
mov ecx, 0x63617274
xor eax, ecx
movzx ecx, byte [r12 + 4]
xor ecx, 0x65
or ecx, eax
jne 0x140004240
mov cl, 3
jmp 0x14000432e
movzx eax, byte [r15]
cmp al, 0x2d
sete r13b
setne r12b
neg r12b
neg r13b
cmp al, 0x2d
jne 0x140004350
jmp 0x140004358
cmp dword [r12], 0x6e726177
jne 0x140004240
mov cl, 2
jmp 0x14000432e
movzx eax, word [r12]
xor eax, 0x7265
movzx ecx, byte [r12 + 2]
xor ecx, 0x72
or cx, ax
jne 0x140004240
mov cl, 1
jmp 0x14000432e
xor ecx, ecx
mov dl, 1
shl dl, cl
movzx eax, byte [r15]
cmp al, 0x2b
movzx r12d, dl
mov r13d, r12d
mov ecx, 0
cmove r13d, ecx
cmovne r12d, ecx
cmp al, 0x2d
je 0x140004358
movzx ecx, al
cmp ecx, 0x2b
jne 0x140004360
movzx eax, byte [r15 + 1]
inc r15
test al, al
je 0x140004240
mov rcx, r15
lea rdx, [0x140005b45]
call qword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
je 0x14000421e
mov ebp, dword [0x140007020]
mov rcx, r15
call qword [sym.imp.ucrtbase.dll_strlen]
cmp rax, 0xe
ja 0x140004240
mov dword [rsp + 0x2c], r12d
mov r12, qword [0x140007198]
test ebp, ebp
mov qword [rsp + 0x40], rbp
jle 0x1400043ff
lea r14d, [rbp - 1]
xor esi, esi
jmp 0x1400043c9
inc ebx
mov esi, ebx
cmp esi, r14d
jg 0x140004401
lea eax, [r14 + rsi]
mov ebx, eax
shr ebx, 0x1f
add ebx, eax
sar ebx, 1
movsxd rbp, ebx
shl rbp, 4
lea rdx, [r12 + rbp]
inc rdx
mov rcx, r15
call qword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
je 0x140004450
jns 0x1400043c0
dec ebx
mov r14d, ebx
cmp esi, r14d
jle 0x1400043c9
jmp 0x140004401
xor esi, esi
mov r9d, dword [0x1400071a0]
mov rbx, qword [rsp + 0x40]
cmp ebx, r9d
jl 0x14000447b
add r9d, r9d
cmp r9d, 0x11
mov eax, 0x10
cmovl r9d, eax
mov dword [0x1400071a0], r9d
shl r9, 4
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rcx, qword [rax + 0x30]
xor edx, edx
test r12, r12
je 0x140004462
mov r8, r12
call qword [sym.imp.kernel32.dll_HeapReAlloc]
jmp 0x14000446b
not r13b
and r13b, byte [r12 + rbp]
or r13b, byte [rsp + 0x2c]
mov byte [r12 + rbp], r13b
jmp 0x1400044d1
mov r8, r9
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov r12, rax
mov qword [0x140007198], rax
mov ebx, dword [0x140007020]
mov eax, ebx
movsxd r14, esi
sub eax, esi
jle 0x1400044a2
mov rcx, r14
shl rcx, 4
lea rdx, [r12 + rcx]
add rcx, r12
add rcx, 0x10
movsxd r8, eax
shl r8, 4
call sym.memmove
shl r14, 4
lea rcx, [r12 + r14]
inc rcx
mov rdx, r15
call qword [sym.imp.ucrtbase.dll_strcpy]
not r13b
and r13b, byte [0x140007024]
or r13b, byte [rsp + 0x2c]
mov byte [r12 + r14], r13b
inc ebx
mov dword [0x140007020], ebx
mov rsi, qword [sym.imp.ucrtbase.dll_strchr]
lea rbx, [0x140005b42]
mov r14, qword [sym.imp.ucrtbase.dll_strcspn]
jmp 0x140004240
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ucrtbase.dll_free]
mov ebx, dword [0x140007020]
test ebx, ebx
jle 0x14000455a
dec ebx
mov rsi, qword [0x140007198]
mov rax, qword [rsp + 0x30]
lea rdi, [rax + 1]
xor r15d, r15d
mov r14, qword [sym.imp.ucrtbase.dll_strcmp]
jmp 0x14000452a
inc ebp
mov r15d, ebp
cmp r15d, ebx
jg 0x14000455a
lea eax, [r15 + rbx]
mov ebp, eax
shr ebp, 0x1f
add ebp, eax
sar ebp, 1
movsxd r12, ebp
shl r12, 4
lea rdx, [rsi + r12]
inc rdx
mov rcx, rdi
call r14
test eax, eax
je 0x140004576
jns 0x140004520
dec ebp
mov ebx, ebp
cmp r15d, ebx
jle 0x14000452a
lea rsi, [0x140007024]
mov rcx, qword [rsp + 0x30]
cmp byte [rcx], 0
jns 0x140004579
movzx eax, byte [0x140007024]
mov byte [rcx], al
jmp 0x140004579
add rsi, r12
movzx eax, byte [rsi]
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret