Function at 0x1004a6060
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov r15d, dword [0x1005078b0]
mov ebp, ecx
test r15d, r15d
jne 0x1004a6310
mov ebx, 0xff
lea rdi, str._proc_curproc_file
jmp 0x1004a609f
mov rcx, rsi
add rbx, 0x100
call sub.msys_gcrypt_20.dll_gcry_free
lea rcx, [rbx + 1]
call sub.msys_gcrypt_20.dll_gcry_xmalloc
mov r8, rbx
mov rcx, rdi
mov rdx, rax
mov rsi, rax
call sub.msys_2.0.dll_readlink
test eax, eax
js 0x1004a64a9
cdqe
cmp rax, rbx
jb 0x1004a6521
cmp rbx, 0xfff
jne 0x1004a6090
mov byte [rsi], 0
lea r8, str.value_too_large
mov rdx, rdi
lea rcx, str.error_reading_symlink__s:__s_n
call sub.msys_gpg_error_0.dll_gpgrt_log_info
cmp byte [rsi], 0
je 0x1004a652a
mov edx, 0x2f
mov rcx, rsi
call sub.msys_2.0.dll_strrchr
test rax, rax
je 0x1004a652a
mov byte [rax], 0
mov edx, 0x2f
mov rcx, rsi
call sub.msys_2.0.dll_strrchr
test rax, rax
je 0x1004a652a
mov byte [rax], 0
xor r8d, r8d
lea rdx, str._bin_gpgconf.ctl
mov rcx, rsi
call fcn.10049f2e0
mov rcx, rsi
mov rbx, rax
call sub.msys_gcrypt_20.dll_gcry_free
xor edx, edx
mov rcx, rbx
call fcn.1004a5910
test eax, eax
jne 0x1004a6562
lea rdx, [0x1004f1ca4]
mov rcx, rbx
call sub.msys_gpg_error_0.dll_gpgrt_fopen
mov rdi, rax
test rax, rax
je 0x1004a6543
lea rax, [rsp + 0x50]
mov qword [rsp + 0x48], rbx
lea r13, [rsp + 0x58]
mov qword [rsp + 0x50], 0
lea rsi, str._var_run
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], rax
mov dword [rsp + 0xb0], ebp
nop word [rax + rax]
mov rdx, qword [rsp + 0x28]
xor r9d, r9d
mov r8, r13
mov rcx, rdi
call sub.msys_gpg_error_0.dll_gpgrt_read_line
test rax, rax
jle 0x1004a6268
sub rax, 1
jmp 0x1004a61fd
mov byte [rdx], 0
sub rax, 1
jb 0x1004a63d0
mov r8, qword [rsp + 0x50]
lea rdx, [r8 + rax]
movzx ecx, byte [rdx]
cmp cl, 0xa
je 0x1004a61f0
cmp cl, 0xd
je 0x1004a61f0
mov rcx, r8
lea rbp, str.rootdir
mov r12d, 7
call fcn.10049e720
mov rbx, qword [rsp + 0x50]
mov r14, qword [rbp]
mov r8, r12
mov rcx, rbx
mov rdx, r14
call sub.msys_2.0.dll_strncmp
test eax, eax
je 0x1004a6344
add rbp, 8
cmp rsi, rbp
je 0x1004a61c8
mov rcx, qword [rbp]
call sub.msys_2.0.dll_strlen
mov r12, rax
jmp 0x1004a622d
mov rcx, rdi
mov rbx, qword [rsp + 0x48]
mov ebp, dword [rsp + 0xb0]
call sub.msys_gpg_error_0.dll_gpgrt_ferror
test eax, eax
jne 0x1004a656c
mov rcx, rdi
call sub.msys_gpg_error_0.dll_gpgrt_fclose
mov rcx, rbx
call sub.msys_gcrypt_20.dll_gcry_free
mov rcx, qword [rsp + 0x50]
call sub.msys_gcrypt_20.dll_gcry_free
test r15d, r15d
jne 0x1004a62c7
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x1004a62b6
cmp byte [rax], 0x2f
je 0x1004a65c8
mov rdx, qword [rsp + 0x30]
lea rcx, str.invalid_rootdir__s_specified_in_gpgconf.ctl_n
call sub.msys_gpg_error_0.dll_gpgrt_log_info
mov rcx, qword [rsp + 0x30]
call sub.msys_gcrypt_20.dll_gcry_free
mov rcx, qword [rsp + 0x38]
call sub.msys_gcrypt_20.dll_gcry_free
mov rcx, qword [rsp + 0x40]
call sub.msys_gcrypt_20.dll_gcry_free
mov qword [0x100507898], 0
mov qword [0x1005078a0], 0
mov qword [0x1005078a8], 0
mov dword [0x1005078b0], 1
cmp ebp, 1
je 0x1004a6450
mov rax, qword [0x1005078a8]
cmp ebp, 2
cmove rax, qword [0x100507898]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
add r12, 1
movzx eax, byte [rbx + r12]
cmp al, 0x20
je 0x1004a6340
cmp al, 9
je 0x1004a6340
cmp al, 0x3d
jne 0x1004a6247
lea r12, [rbx + r12 + 1]
mov rcx, r12
call fcn.10049e720
mov rcx, r12
call fcn.10049faa0
mov r12, rax
test rax, rax
je 0x1004a642c
lea rdx, str..enable
mov rcx, r14
call sub.msys_2.0.dll_strcmp
test eax, eax
je 0x1004a63e0
lea rdx, str.sysconfdir
mov rcx, r14
call sub.msys_2.0.dll_strcmp
test eax, eax
je 0x1004a6418
lea rdx, str.socketdir
mov rcx, r14
call sub.msys_2.0.dll_strcmp
test eax, eax
jne 0x1004a6400
mov rcx, qword [rsp + 0x40]
call sub.msys_gcrypt_20.dll_gcry_free
mov qword [rsp + 0x40], r12
jmp 0x1004a61c8
mov r8, qword [rsp + 0x50]
jmp 0x1004a6213
mov rcx, r12
call sub.msys_2.0.dll_atoi
test eax, eax
je 0x1004a645c
mov rcx, r12
call sub.msys_gcrypt_20.dll_gcry_free
jmp 0x1004a61c8
mov rcx, qword [rsp + 0x30]
call sub.msys_gcrypt_20.dll_gcry_free
mov qword [rsp + 0x30], r12
jmp 0x1004a61c8
mov rcx, qword [rsp + 0x38]
call sub.msys_gcrypt_20.dll_gcry_free
mov qword [rsp + 0x38], r12
jmp 0x1004a61c8
call sub.msys_gpg_error_0.dll_gpg_err_code_from_syserror
movzx ecx, ax
call sub.msys_gpg_error_0.dll_gpg_strerror
mov rdx, r14
lea rcx, str.error_getting__s_from_gpgconf.ctl:__s_n
mov r8, rax
call sub.msys_gpg_error_0.dll_gpgrt_log_info
jmp 0x1004a61c8
mov rax, qword [0x1005078a0]
jmp 0x1004a632b
lea rdx, [0x1004f1cef]
mov rcx, r12
call fcn.10049ee50
test eax, eax
je 0x1004a63ec
lea rdx, str.true
mov rcx, r12
call fcn.10049ee50
test eax, eax
je 0x1004a63ec
lea rdx, str.fact
mov rcx, r12
call fcn.10049ee50
test eax, eax
mov eax, 1
cmovne r15d, eax
jmp 0x1004a63ec
call sub.msys_gpg_error_0.dll_gpg_err_code_from_syserror
mov byte [rsi], 0
lea rcx, str.GNUPG_BUILD_ROOT
mov r12d, eax
call sub.msys_2.0.dll_getenv
mov rbx, rax
test rax, rax
je 0x1004a60ee
cmp byte [rax], 0x2f
jne 0x1004a60ee
movzx ecx, r12w
call sub.msys_gpg_error_0.dll_gpg_strerror
mov rdx, rdi
lea rcx, str.error_reading_symlink__s:__s_n
mov r8, rax
call sub.msys_gpg_error_0.dll_gpgrt_log_info
mov rcx, rsi
call sub.msys_gcrypt_20.dll_gcry_free
mov rcx, rbx
xor r8d, r8d
lea rdx, str._bin_gpgconf
call fcn.10049f2e0
lea rcx, str.trying_fallback__s_n
mov rdx, rax
mov rsi, rax
call sub.msys_gpg_error_0.dll_gpgrt_log_info
jmp 0x1004a60ee
mov byte [rsi + rax], 0
jmp 0x1004a60ee
mov rcx, rsi
call sub.msys_gcrypt_20.dll_gcry_free
mov dword [0x1005078b0], 1
xor eax, eax
jmp 0x1004a632b
call sub.msys_gpg_error_0.dll_gpg_err_code_from_syserror
movzx ecx, ax
call sub.msys_gpg_error_0.dll_gpg_strerror
mov rdx, rbx
lea rcx, str.error_opening__s:__s_n
mov r8, rax
call sub.msys_gpg_error_0.dll_gpgrt_log_info
mov rcx, rbx
call sub.msys_gcrypt_20.dll_gcry_free
jmp 0x1004a6532
call sub.msys_gpg_error_0.dll_gpg_err_code_from_syserror
movzx ecx, ax
call sub.msys_gpg_error_0.dll_gpg_strerror
mov rdx, rbx
lea rcx, str.error_reading__s:__s_n
mov r8, rax
call sub.msys_gpg_error_0.dll_gpgrt_log_info
mov rcx, rdi
call sub.msys_gpg_error_0.dll_gpgrt_fclose
mov rcx, rbx
call sub.msys_gcrypt_20.dll_gcry_free
mov rcx, qword [rsp + 0x50]
call sub.msys_gcrypt_20.dll_gcry_free
mov rcx, qword [rsp + 0x30]
call sub.msys_gcrypt_20.dll_gcry_free
mov rcx, qword [rsp + 0x38]
call sub.msys_gcrypt_20.dll_gcry_free
mov rcx, qword [rsp + 0x40]
call sub.msys_gcrypt_20.dll_gcry_free
jmp 0x1004a6532
mov rdx, qword [rsp + 0x38]
test rdx, rdx
je 0x1004a65e8
cmp byte [rdx], 0x2f
je 0x1004a65e8
lea rcx, str.invalid_sysconfdir__s_specified_in_gpgconf.ctl_n
call sub.msys_gpg_error_0.dll_gpgrt_log_info
jmp 0x1004a62c7
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x1004a6608
cmp byte [rdx], 0x2f
je 0x1004a6608
lea rcx, str.invalid_socketdir__s_specified_in_gpgconf.ctl_n
call sub.msys_gpg_error_0.dll_gpgrt_log_info
jmp 0x1004a62c7
mov rbx, qword [rsp + 0x30]
jmp 0x1004a6617
mov byte [rax], 0
cmp byte [rbx], 0
je 0x1004a6629
mov rcx, rbx
call sub.msys_2.0.dll_strlen
lea rax, [rbx + rax - 1]
cmp byte [rax], 0x2f
je 0x1004a660f
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], 0
mov qword [0x1005078a8], rax
je 0x1004a6676
mov rax, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x38]
cmp byte [rax], 0
jne 0x1004a6658
jmp 0x1004a666a
mov byte [rax], 0
cmp byte [rbx], 0
je 0x1004a666a
mov rcx, rbx
call sub.msys_2.0.dll_strlen
lea rax, [rbx + rax - 1]
cmp byte [rax], 0x2f
je 0x1004a6650
mov rax, qword [rsp + 0x38]
mov qword [0x1005078a0], rax
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x1004a6306
cmp byte [rax], 0
mov rbx, qword [rsp + 0x40]
jne 0x1004a6698
jmp 0x1004a66aa
mov byte [rax], 0
cmp byte [rbx], 0
je 0x1004a66aa
mov rcx, rbx
call sub.msys_2.0.dll_strlen
lea rax, [rbx + rax - 1]
cmp byte [rax], 0x2f
je 0x1004a6690
mov rax, qword [rsp + 0x40]
mov qword [0x100507898], rax
jmp 0x1004a6306