Function at 0x140002fc0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov r14d, dword [0x140004010]
mov rsi, rcx
cmp r14d, 0xffffffff
je 0x140003070
sub r14d, 1
js 0x140003039
mov r13, qword [0x140008148]
mov rbp, qword [sym.imp.ucrtbase.dll_strcmp]
lea r12, [rsi + 1]
xor r15d, r15d
jmp 0x140003011
lea r15d, [rdi + 1]
cmp r15d, r14d
jg 0x140003039
lea edi, [r14 + r15]
mov rcx, r12
sar edi, 1
movsxd rbx, edi
shl rbx, 4
add rbx, r13
lea rdx, [rbx + 1]
call rbp
test eax, eax
je 0x140003068
jns 0x140003008
lea r14d, [rdi - 1]
cmp r15d, r14d
jle 0x140003011
cmp byte [rsi], 0
movzx eax, byte [0x140004014]
js 0x140003060
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov byte [rsi], al
jmp 0x140003045
movzx eax, byte [rbx]
jmp 0x140003045
lea rcx, str.WINEDEBUG
call qword [sym.imp.ucrtbase.dll_getenv]
mov dword [0x140004010], 0
mov rcx, rax
test rax, rax
je 0x140003039
call qword [sym.imp.ucrtbase.dll__strdup]
mov qword [rsp + 0x20], rax
test rax, rax
je 0x14000328c
mov r15, qword [rsp + 0x20]
mov qword [rsp + 0x90], rsi
mov rsi, r15
nop dword [rax + rax]
mov edx, 0x2c
mov rcx, rsi
xor ebp, ebp
call qword [sym.imp.ucrtbase.dll_strchr]
test rax, rax
je 0x1400030d4
mov byte [rax], 0
lea rbp, [rax + 1]
lea rdx, [0x140005590]
mov rcx, rsi
call qword [sym.imp.ucrtbase.dll_strcspn]
lea r14, [rsi + rax]
mov rbx, rax
movzx edi, byte [r14]
test dil, dil
je 0x140003178
cmp r14, rsi
jbe 0x1400031e0
mov eax, 5
xor r15d, r15d
lea r13, str.fixme
cdqe
cmp rax, rbx
jne 0x14000312d
mov r8, rbx
mov rdx, r13
mov rcx, rsi
call sym.memcmp
test eax, eax
je 0x140003314
add r15, 1
cmp r15, 4
je 0x140003160
lea rax, str.fixme
mov r13, qword [rax + r15*8]
mov rcx, r13
call qword [sym.imp.ucrtbase.dll_strlen]
cdqe
cmp rax, rbx
je 0x140003117
add r15, 1
cmp r15, 4
jne 0x140003137
nop dword [rax]
test rbp, rbp
je 0x140003279
mov rsi, rbp
jmp 0x1400030b8
movzx edi, byte [rsi]
cmp dil, 0x2d
je 0x1400031c8
lea ebx, [rdi - 0x2b]
and ebx, 0xfd
je 0x1400031e8
mov r13d, 0xffffffff
xor ebx, ebx
test dil, dil
je 0x140003160
mov r12, qword [sym.imp.ucrtbase.dll_strcmp]
lea rdx, [0x140005593]
mov rcx, rsi
call r12
test eax, eax
jne 0x1400031f8
not ebx
and bl, byte [0x140004014]
or ebx, r13d
mov byte [0x140004014], bl
jmp 0x140003160
mov ebx, 0xffffffff
xor r13d, r13d
mov r14, rsi
movzx edi, byte [r14 + 1]
lea rsi, [r14 + 1]
jmp 0x140003194
mov rsi, r14
jmp 0x14000317b
mov r14, rsi
mov r13d, 0xffffffff
jmp 0x1400031d3
mov rcx, rsi
call qword [sym.imp.ucrtbase.dll_strlen]
cmp rax, 0xe
ja 0x140003160
mov eax, dword [0x140004010]
mov rcx, qword [0x140008148]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x28], rcx
sub eax, 1
js 0x1400033e6
xor r15d, r15d
mov qword [rsp + 0x30], rbp
mov r14, rcx
mov byte [rsp + 0x3f], bl
mov ebp, r15d
mov ebx, eax
mov r15, r12
jmp 0x140003251
lea ebp, [r12 + 1]
cmp ebp, ebx
jg 0x1400032b0
lea r12d, [rbx + rbp]
mov rcx, rsi
sar r12d, 1
movsxd rdi, r12d
shl rdi, 4
add rdi, r14
lea rdx, [rdi + 1]
call r15
test eax, eax
je 0x140003298
jns 0x140003248
lea ebx, [r12 - 1]
jmp 0x14000324d
mov rsi, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ucrtbase.dll_free]
mov r14d, dword [0x140004010]
jmp 0x140002fe4
movzx eax, byte [rsp + 0x3f]
mov rbp, qword [rsp + 0x30]
not eax
and al, byte [rdi]
or eax, r13d
mov byte [rdi], al
jmp 0x140003160
movsxd r12, ebp
movzx ebx, byte [rsp + 0x3f]
mov rbp, qword [rsp + 0x30]
mov rdi, r12
mov r15, r12
shl rdi, 4
mov eax, dword [0x140008150]
cmp dword [rsp + 0x38], eax
jge 0x140003378
add rdi, qword [rsp + 0x28]
cmp r15d, dword [rsp + 0x38]
jl 0x14000334a
lea rcx, [rdi + 1]
mov rdx, rsi
call qword [sym.imp.ucrtbase.dll_strcpy]
mov r15d, dword [rsp + 0x38]
mov eax, ebx
not eax
and al, byte [0x140004014]
or eax, r13d
add r15d, 1
mov byte [rdi], al
mov dword [0x140004010], r15d
jmp 0x140003160
mov r13d, 1
mov ecx, r15d
shl r13d, cl
mov ebx, r13d
cmp dil, 0x2b
je 0x1400033dc
sub edi, 0x2b
and edi, 0xfd
mov r13d, edi
je 0x1400031d3
mov rsi, r14
xor r13d, r13d
jmp 0x140003199
mov r8d, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x28]
lea rax, [r12 + 1]
mov rdx, rdi
shl rax, 4
sub r8d, r15d
add rcx, rax
movsxd r8, r8d
shl r8, 4
call qword [sym.imp.ucrtbase.dll_memmove]
jmp 0x1400032e3
add eax, eax
mov edx, 0x10
cmp eax, edx
cmovl eax, edx
mov dword [0x140008150], eax
cdqe
shl rax, 4
mov r8, rax
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
cmp qword [rsp + 0x28], 0
mov rcx, qword [rax + 0x30]
je 0x1400033f3
mov r9, r8
xor edx, edx
mov r8, qword [rsp + 0x28]
call qword [sym.imp.kernel32.dll_HeapReAlloc]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [0x140008148], rax
mov eax, dword [0x140004010]
mov dword [rsp + 0x38], eax
jmp 0x1400032d7
mov rsi, r14
xor ebx, ebx
jmp 0x1400031d0
xor edi, edi
xor r12d, r12d
xor r15d, r15d
jmp 0x1400032c7
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov qword [rsp + 0x28], rax
jmp 0x1400033c1