Function at 0x140001240
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 [0x140003010]
mov rsi, rcx
cmp r14d, 0xffffffff
je 0x1400012f0
sub r14d, 1
js 0x1400012b9
mov r13, qword [0x140007128]
mov rbp, qword [sym.imp.ucrtbase.dll_strcmp]
lea r12, [rsi + 1]
xor r15d, r15d
jmp 0x140001291
lea r15d, [rdi + 1]
cmp r15d, r14d
jg 0x1400012b9
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 0x1400012e8
jns 0x140001288
lea r14d, [rdi - 1]
cmp r15d, r14d
jle 0x140001291
cmp byte [rsi], 0
movzx eax, byte [0x140003014]
js 0x1400012e0
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 0x1400012c5
movzx eax, byte [rbx]
jmp 0x1400012c5
lea rcx, str.WINEDEBUG
call qword [sym.imp.ucrtbase.dll_getenv]
mov dword [0x140003010], 0
mov rcx, rax
test rax, rax
je 0x1400012b9
call qword [sym.imp.ucrtbase.dll__strdup]
mov qword [rsp + 0x20], rax
test rax, rax
je 0x14000150c
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 0x140001354
mov byte [rax], 0
lea rbp, [rax + 1]
lea rdx, [0x140004410]
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 0x1400013f8
cmp r14, rsi
jbe 0x140001460
mov eax, 5
xor r15d, r15d
lea r13, str.fixme
cdqe
cmp rax, rbx
jne 0x1400013ad
mov r8, rbx
mov rdx, r13
mov rcx, rsi
call sym.memcmp
test eax, eax
je 0x140001594
add r15, 1
cmp r15, 4
je 0x1400013e0
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 0x140001397
add r15, 1
cmp r15, 4
jne 0x1400013b7
nop dword [rax]
test rbp, rbp
je 0x1400014f9
mov rsi, rbp
jmp 0x140001338
movzx edi, byte [rsi]
cmp dil, 0x2d
je 0x140001448
lea ebx, [rdi - 0x2b]
and ebx, 0xfd
je 0x140001468
mov r13d, 0xffffffff
xor ebx, ebx
test dil, dil
je 0x1400013e0
mov r12, qword [sym.imp.ucrtbase.dll_strcmp]
lea rdx, [0x140004413]
mov rcx, rsi
call r12
test eax, eax
jne 0x140001478
not ebx
and bl, byte [0x140003014]
or ebx, r13d
mov byte [0x140003014], bl
jmp 0x1400013e0
mov ebx, 0xffffffff
xor r13d, r13d
mov r14, rsi
movzx edi, byte [r14 + 1]
lea rsi, [r14 + 1]
jmp 0x140001414
mov rsi, r14
jmp 0x1400013fb
mov r14, rsi
mov r13d, 0xffffffff
jmp 0x140001453
mov rcx, rsi
call qword [sym.imp.ucrtbase.dll_strlen]
cmp rax, 0xe
ja 0x1400013e0
mov eax, dword [0x140003010]
mov rcx, qword [0x140007128]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x28], rcx
sub eax, 1
js 0x140001666
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 0x1400014d1
lea ebp, [r12 + 1]
cmp ebp, ebx
jg 0x140001530
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 0x140001518
jns 0x1400014c8
lea ebx, [r12 - 1]
jmp 0x1400014cd
mov rsi, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ucrtbase.dll_free]
mov r14d, dword [0x140003010]
jmp 0x140001264
movzx eax, byte [rsp + 0x3f]
mov rbp, qword [rsp + 0x30]
not eax
and al, byte [rdi]
or eax, r13d
mov byte [rdi], al
jmp 0x1400013e0
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 [0x140007130]
cmp dword [rsp + 0x38], eax
jge 0x1400015f8
add rdi, qword [rsp + 0x28]
cmp r15d, dword [rsp + 0x38]
jl 0x1400015ca
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 [0x140003014]
or eax, r13d
add r15d, 1
mov byte [rdi], al
mov dword [0x140003010], r15d
jmp 0x1400013e0
mov r13d, 1
mov ecx, r15d
shl r13d, cl
mov ebx, r13d
cmp dil, 0x2b
je 0x14000165c
sub edi, 0x2b
and edi, 0xfd
mov r13d, edi
je 0x140001453
mov rsi, r14
xor r13d, r13d
jmp 0x140001419
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 0x140001563
add eax, eax
mov edx, 0x10
cmp eax, edx
cmovl eax, edx
mov dword [0x140007130], 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 0x140001673
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 [0x140007128], rax
mov eax, dword [0x140003010]
mov dword [rsp + 0x38], eax
jmp 0x140001557
mov rsi, r14
xor ebx, ebx
jmp 0x140001450
xor edi, edi
xor r12d, r12d
xor r15d, r15d
jmp 0x140001547
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov qword [rsp + 0x28], rax
jmp 0x140001641