Function at 0x10049aa50
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov esi, dword [rsp + 0xe0]
mov r12, rdx
mov r14, r8
mov r13d, r9d
test rdx, rdx
je 0x10049ace2
test rcx, rcx
je 0x10049aa8c
mov edx, dword [rcx + 0x1f08]
test edx, edx
jne 0x10049abf9
mov qword [rsp + 0x38], 0
mov rax, qword [sym.vim.exe_homedir]
mov rcx, qword [rax]
test rcx, rcx
je 0x10049aaae
call sub.msys_2.0.dll_strlen
mov qword [rsp + 0x38], rax
lea rcx, [0x1006c0cbe]
call sub.msys_2.0.dll_getenv
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x10049aadd
movzx eax, byte [rax]
test al, al
jne 0x10049acf7
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x48], 0
xor r15d, r15d
test esi, esi
je 0x10049ad1a
cmp byte [r12], 0
je 0x10049abc9
test r13d, r13d
jle 0x10049abc9
mov rdi, qword [sym.vim.exe_p_fic]
nop dword [rax]
mov rax, qword [sym.vim.exe_homedir]
mov rbx, qword [rsp + 0x38]
mov rbp, qword [rax]
jmp 0x10049ab3c
mov rax, qword [rsp + 0x60]
cmp rax, rbp
je 0x10049abc0
mov rbp, rax
mov rbx, r15
test rbx, rbx
je 0x10049ab28
mov eax, dword [rdi]
test eax, eax
jne 0x10049ac60
mov r8, rbx
mov rdx, rbp
mov rcx, r12
call sub.msys_2.0.dll_strncmp
test eax, eax
jne 0x10049ab28
add rbx, r12
movzx eax, byte [rbx]
cmp al, 0x2f
je 0x10049acd0
test esi, esi
jne 0x10049ab77
cmp al, 0x2c
je 0x10049ab7b
cmp al, 0x20
je 0x10049ab7b
test al, al
jne 0x10049ab28
mov r12, rbx
sub r13d, 1
je 0x10049abc5
mov byte [r14], 0x7e
mov r12, rbx
movzx eax, byte [rbx]
add r14, 1
jmp 0x10049abc5
test esi, esi
jne 0x10049abac
cmp al, 0x2c
je 0x10049ac73
cmp al, 0x20
je 0x10049ac73
sub r13d, 1
test r13d, r13d
jle 0x10049abc9
mov byte [r14], al
add r14, 1
add r12, 1
movzx eax, byte [r12]
test al, al
jne 0x10049ab98
mov byte [r14], 0
mov rax, qword [rsp + 0x48]
cmp qword [rsp + 0x40], rax
je 0x10049ace6
mov rcx, rax
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.vim.exe_vim_free
add r12, 1
movzx eax, byte [r12]
cmp al, 0x2f
je 0x10049abf5
mov rbx, qword [sym.vim.exe_mb_ptr2len]
mov rsi, r12
test al, al
jne 0x10049ac23
jmp 0x10049ac36
lea rdx, [r12 + 1]
cmp al, 0x2f
cmove rsi, rdx
mov rcx, r12
call qword [rbx]
cdqe
add r12, rax
movzx eax, byte [r12]
test al, al
jne 0x10049ac18
movsxd rdx, r13d
mov r9, rsi
lea r8, [0x1006c0cbb]
mov rcx, r14
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.vim.exe_vim_snprintf
movsxd r8, ebx
mov rdx, rbp
mov rcx, r12
call sym.vim.exe_mb_strnicmp
jmp 0x10049ab59
movzx eax, byte [r12]
cmp al, 0x20
je 0x10049ac80
cmp al, 0x2c
jne 0x10049acb2
sub r13d, 1
test r13d, r13d
jg 0x10049ac9a
jmp 0x10049abc9
sub r13d, 1
je 0x10049abc9
add r12, 1
mov byte [r14], al
add r14, 1
movzx eax, byte [r12]
cmp al, 0x20
je 0x10049ac90
cmp al, 0x2c
je 0x10049ac90
test r13d, r13d
jle 0x10049abc9
test al, al
jne 0x10049ab10
jmp 0x10049abc9
sub r13d, 1
mov r12, rbx
je 0x10049ab98
jmp 0x10049ab84
mov byte [r8], 0
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp al, 0x7e
je 0x10049ad2a
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x48]
call sub.msys_2.0.dll_strlen
mov r15, rax
test esi, esi
jne 0x10049aaf1
mov rcx, r12
call sym.vim.exe_skipwhite
mov r12, rax
jmp 0x10049aaf1
mov rcx, qword [rsp + 0x40]
mov dword [rsp + 0x58], 0
mov qword [rsp + 0x68], 0
call sub.msys_2.0.dll_strlen
xor edx, edx
lea r9, [rsp + 0x60]
lea rcx, [0x1006c0cc3]
mov dword [rsp + 0x5c], eax
lea rax, [rsp + 0x5c]
lea r8, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
call sym.vim.exe_modify_fname
mov rdi, qword [rsp + 0x60]
mov rcx, rdi
mov qword [rsp + 0x48], rdi
call sub.msys_2.0.dll_strlen
test eax, eax
jle 0x10049ad05
cdqe
lea rax, [rdi + rax - 1]
cmp byte [rax], 0x2f
jne 0x10049ad05
mov byte [rax], 0
jmp 0x10049ad05