Function at 0x21005d610
Capabilities:
Set environment variable

Disassembly:
push rbp
push r13
push r12
push rsi
push rbx
sub rsp, 0x40
lea rbp, [rsp + 0x40]
mov rbx, rcx
mov rcx, rdx
mov r12, rdx
mov r13, r8
call sym.msys_2.0.dll_strlen
mov rcx, qword [rbx + 0x10]
lea rdx, [rax + 1]
call sym.realloc_1
mov rdx, r12
mov qword [rbx + 0x10], rax
mov rcx, rax
call sym.msys_2.0.dll_strcpy
test r13, r13
je 0x21005d6b0
mov rcx, r13
call sym.msys_2.0.dll_strlen
mov rdx, qword [rbx + 8]
mov rcx, qword [rbx + 0x18]
lea rdx, [rdx + rax + 1]
call sym.realloc_1
mov rdx, qword [rbx]
mov qword [rbx + 0x18], rax
mov rcx, rax
call sym.msys_2.0.dll_stpcpy
mov rdx, r13
mov rcx, rax
call sym.msys_2.0.dll_strcpy
cmp byte [rbx + 0x30], 0
jne 0x21005d772
test byte [0x210273880], 1
jne 0x21005d890
mov rsp, rbp
pop rbx
pop rsi
pop r12
pop r13
pop rbp
ret
cmp byte [rbx + 0x31], 0
je 0x21005d6c1
cmp byte [r12], 0
je 0x21005d900
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
lea rcx, [rbp - 8]
mov eax, dword [rax - 0x2cc8]
mov dword [rbp - 8], eax
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov eax, dword [rax - 0x2cc4]
mov dword [rbp - 4], eax
call method.tmp_pathbuf.c_get__
mov r8d, 0x8000
mov rcx, r12
mov r13, rax
mov rdx, rax
call qword [rbx + 0x28]
mov rcx, r13
call sym.msys_2.0.dll_strlen
mov rdx, qword [rbx + 8]
mov rcx, qword [rbx + 0x18]
lea rdx, [rdx + rax + 1]
call sym.realloc_1
mov rdx, qword [rbx]
mov qword [rbx + 0x18], rax
mov rcx, rax
call sym.msys_2.0.dll_stpcpy
mov rdx, r13
mov rcx, rax
call sym.msys_2.0.dll_strcpy
mov edx, dword [rbp - 8]
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov dword [rax - 0x2cc8], edx
mov edx, dword [rbp - 4]
mov rax, qword gs:[0x30]
mov rax, qword [rax + 8]
mov dword [rax - 0x2cc4], edx
cmp byte [rbx + 0x30], 0
je 0x21005d690
cmp byte [0x21024fae6], 0
je 0x21005d690
mov r9, qword [rbx + 0x18]
mov r13, rsp
mov rax, qword gs:[8]
mov rax, qword [rax - 0x2938]
lea rdx, [0x21023a000]
lea rsi, [sym.__ascii_mbtowc]
lea rcx, [sym.__utf8_mbtowc]
test rax, rax
cmove rax, rdx
cmp qword [rax + 0xe8], rsi
je 0x21005d7d9
mov rax, qword gs:[8]
mov rax, qword [rax - 0x2938]
test rax, rax
cmove rax, rdx
mov rcx, qword [rax + 0xe8]
mov qword [rsp + 0x20], 0xffffffffffffffff
xor r8d, r8d
xor edx, edx
call sym._sys_mbstowcs_int_____reent__wchar_t__char_const__unsigned_long___mbstate_t___wchar_t__unsigned_long__char_const__unsigned_long_
lea r8, [rax + rax + 2]
lea rax, [r8 + 0xf]
and rax, 0xfffffffffffffff0
call fcn.21021b550
mov r9, qword [rbx + 0x18]
sub rsp, rax
lea r12, [rsp + 0x30]
mov rax, qword gs:[8]
mov rax, qword [rax - 0x2938]
lea rdx, [0x21023a000]
lea rcx, [sym.__utf8_mbtowc]
test rax, rax
cmove rax, rdx
cmp qword [rax + 0xe8], rsi
je 0x21005d856
mov rax, qword gs:[8]
mov rax, qword [rax - 0x2938]
test rax, rax
cmove rax, rdx
mov rcx, qword [rax + 0xe8]
mov qword [rsp + 0x20], 0xffffffffffffffff
mov rdx, r12
call sym._sys_mbstowcs_int_____reent__wchar_t__char_const__unsigned_long___mbstate_t___wchar_t__unsigned_long__char_const__unsigned_long_
mov rax, qword [rbx + 8]
xor edx, edx
mov rcx, r12
mov word [r12 + rax*2 - 2], dx
lea rdx, [r12 + rax*2]
call sym.SetEnvironmentVariableW
mov rsp, r13
test byte [0x210273880], 1
je 0x21005d69d
nop
mov rax, qword [rbx + 0x10]
lea r12, [0x210273880]
lea r9, [0x2102854aa]
mov edx, 0x40
lea r8, str.void_win_env::add_cache_const_char__const_char_
mov rcx, r12
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
test byte [0x210273880], 1
je 0x21005d69d
mov rax, qword [rbx + 0x18]
lea r9, str.native__s
mov edx, 0x40
mov rcx, r12
lea r8, str.void_win_env::add_cache_const_char__const_char_
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
nop
mov rsp, rbp
pop rbx
pop rsi
pop r12
pop r13
pop rbp
ret
mov edx, 1
mov ecx, 1
call sym.calloc_1
mov qword [rbx + 0x18], rax
jmp 0x21005d768