Function at 0x407ff0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0xbc
mov dword [esp], edx
mov dword [esp + 0x28], eax
and eax, 1
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
call sub.msvcrt.dll_strlen
mov ebp, dword [ebx]
mov esi, eax
lea edx, [eax + 1]
test ebp, ebp
je 0x408068
mov dword [esp], ebp
lea edi, [esp + 0x30]
call sub.msvcrt.dll_strlen
mov dword [esp + 0x2c], ebp
lea edx, [esi + eax + 2]
xor esi, esi
mov ebp, edx
jmp 0x408055
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea ebp, [ebp + eax + 1]
cmp esi, 0x1f
je 0x4082b7
add esi, 1
mov eax, dword [ebx + esi*4]
mov dword [edi + esi*4], eax
test eax, eax
jne 0x408040
mov edx, ebp
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
xor edi, edi
lea esi, [edx + 1]
cmp byte [eax], 0x7e
je 0x40822c
mov eax, dword [esp + 0x24]
mov dword [esp], esi
test eax, eax
jne 0x4081ee
call sub.libgcrypt_20.dll_gcry_malloc
mov ebx, eax
test eax, eax
je 0x40846d
mov eax, dword [esp + 0x20]
test edi, edi
je 0x408201
lea ecx, [eax + 1]
movzx eax, byte [edi]
mov esi, ebx
test al, al
je 0x4080bf
add edi, 1
mov byte [esi], al
add esi, 1
movzx eax, byte [edi]
test al, al
jne 0x4080b0
mov eax, dword [esp + 0x20]
mov byte [esi], 0
movzx eax, byte [eax + 1]
test al, al
je 0x4080df
nop
add ecx, 1
mov byte [esi], al
add esi, 1
movzx eax, byte [ecx]
test al, al
jne 0x4080d0
mov byte [esi], 0
lea edi, [esp + 0x30]
mov dword [esp], 0
call sub.libgcrypt_20.dll_gcry_free
xor ecx, ecx
test ebp, ebp
je 0x40814d
lea esi, [esi]
nop
test ecx, ecx
jne 0x408113
cmp byte [ebx], 0x2f
jne 0x408113
cmp byte [ebx + 1], 0
je 0x4081d0
mov eax, 0x2f
add esi, 1
mov word [esi - 1], ax
movzx eax, byte [ebp]
test al, al
je 0x408140
lea esi, [esi]
nop
add ebp, 1
mov byte [esi], al
add esi, 1
movzx eax, byte [ebp]
test al, al
jne 0x408130
add ecx, 1
mov byte [esi], 0
mov ebp, dword [edi + ecx*4]
test ebp, ebp
jne 0x408100
test byte [esp + 0x28], 2
je 0x40817c
mov dword [esp + 4], 0x3a
mov dword [esp], ebx
call sub.msvcrt.dll_strchr
lea ebp, [eax + 1]
test eax, eax
cmove ebp, ebx
movzx eax, byte [ebp]
cmp al, 0x2f
je 0x40817c
cmp al, 0x5c
jne 0x4082de
mov dword [esp + 4], 0x5c
mov dword [esp], ebx
call sub.msvcrt.dll_strchr
test eax, eax
je 0x4081b4
movzx edx, byte [ebx]
test dl, dl
je 0x4081b4
mov eax, ebx
lea esi, [esi]
cmp dl, 0x2f
je 0x408298
movzx edx, byte [eax + 1]
add eax, 1
test dl, dl
jne 0x4081a0
add esp, 0xbc
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [esi], al
add esi, 1
add ebp, 1
movzx eax, byte [ebp]
test al, al
jne 0x4081c8
add ecx, 1
mov byte [esi], 0
mov ebp, dword [edi + ecx*4]
test ebp, ebp
jne 0x408100
jmp 0x40814d
call sub.libgcrypt_20.dll_gcry_xmalloc
mov ebx, eax
mov eax, dword [esp + 0x20]
test edi, edi
jne 0x4080a4
movzx eax, byte [eax]
mov edx, dword [esp + 0x20]
mov esi, ebx
test al, al
je 0x4080df
lea esi, [esi]
add edx, 1
mov byte [esi], al
add esi, 1
movzx eax, byte [edx]
test al, al
jne 0x408218
jmp 0x4080df
movzx eax, byte [eax + 1]
cmp al, 0x2f
je 0x4083d0
test al, al
je 0x4083d0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
add eax, 1
test edx, edx
mov dword [esp], eax
je 0x4083fe
call sub.libgcrypt_20.dll_gcry_xstrdup
mov ebx, eax
mov dword [esp + 4], 0x2f
mov dword [esp], ebx
call sub.msvcrt.dll_strchr
test eax, eax
je 0x408274
mov byte [eax], 0
mov dword [esp], ebx
xor edi, edi
call sub.libgcrypt_20.dll_gcry_free
mov eax, dword [esp + 0x24]
mov dword [esp], esi
test eax, eax
je 0x408089
jmp 0x4081ee
mov byte [eax], 0x5c
movzx edx, byte [eax + 1]
add eax, 1
test dl, dl
jne 0x4081a0
add esp, 0xbc
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x40847e
mov dword [esp], 0x16
xor ebx, ebx
call sub.libgpg_error_0.dll_gpg_err_set_errno
add esp, 0xbc
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.0040d4b0
mov edi, eax
test eax, eax
je 0x408438
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp], ebx
mov esi, eax
call sub.msvcrt.dll_strlen
mov edx, dword [esp + 0x24]
lea eax, [esi + eax + 2]
test edx, edx
mov dword [esp], eax
je 0x408418
call sub.libgcrypt_20.dll_gcry_xmalloc
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
mov esi, eax
cmp ebx, ebp
je 0x408340
mov esi, ebp
mov dword [esp + 4], ebp
mov ebp, eax
sub esi, ebx
mov dword [esp], eax
add esi, 1
mov dword [esp + 8], esi
add esi, ebp
call sub.msvcrt.dll_memcpy
movzx edx, byte [edi]
lea eax, [esi + 1]
mov ebp, eax
cmp dl, 0x2f
je 0x40844f
test dl, dl
je 0x408377
mov ecx, edi
jmp 0x408363
add eax, 1
add ecx, 1
mov byte [eax - 1], dl
mov ebp, esi
mov esi, eax
movzx edx, byte [ecx]
test dl, dl
jne 0x408360
add ebp, 2
mov eax, 0x2f
mov word [esi], ax
mov dword [esp + 4], ebx
mov dword [esp], ebp
call sub.msvcrt.dll_strcpy
mov dword [esp], edi
call sub.libgcrypt_20.dll_gcry_free
mov dword [esp], ebx
call sub.libgcrypt_20.dll_gcry_free
mov ebx, dword [esp + 0x20]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
cmp eax, 2
jbe 0x40817c
lea edx, [ebx + eax - 2]
cmp byte [edx], 0x2f
jne 0x40817c
cmp byte [ebx + eax - 1], 0x2e
jne 0x40817c
mov byte [edx], 0
jmp 0x40817c
mov dword [esp], str.HOME
call sub.msvcrt.dll_getenv
mov edi, eax
test eax, eax
je 0x40807a
cmp byte [eax], 0
je 0x40807a
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add esi, eax
jmp 0x40807a
call sub.libgcrypt_20.dll_gcry_strdup
mov ebx, eax
test eax, eax
jne 0x40825d
jmp 0x4081b4
call sub.libgcrypt_20.dll_gcry_malloc
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40831b
mov dword [esp], edi
call sub.libgcrypt_20.dll_gcry_free
jmp 0x408440
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x4084af
mov dword [esp], ebx
xor ebx, ebx
call sub.libgcrypt_20.dll_gcry_free
jmp 0x4081b4
cmp byte [edi + 1], 0
jne 0x408355
mov byte [esi], 0x2f
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
jmp 0x40838b
mov dword [esp], 0
call sub.libgcrypt_20.dll_gcry_free
jmp 0x4081b4
mov dword [esp + 0x10], str.do_make_filename
mov dword [esp + 0xc], 0x1d0
mov dword [esp + 8], str._home_gpgbuilder_b_gnupg_dist_PLAY_release_gnupg_w32_2.4.3_common_stringhelp.c
mov dword [esp + 4], 0x4250b5
mov dword [esp], 6
call sub.libgpg_error_0.dll_gpgrt_log
call sub.msvcrt.dll_abort
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp], 2
mov ebx, eax
call dword [0x421c7c]
mov dword [esp + 8], ebx
mov dword [esp + 4], str._nfatal:_getcwd_failed:__s_n
mov dword [esp], eax
call fcn.00407fc0
mov dword [esp], 2
call sub.msvcrt.dll_exit
nop
push edi
push esi
push ebx
sub esp, 0x10
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov ebx, eax
mov dword [esp], esi
call sub.msvcrt.dll_strncmp
mov edx, eax
xor eax, eax
test edx, edx
jne 0x408537
lea eax, [esi + ebx]
movzx edx, byte [eax]
cmp dl, 9
sete cl
test dl, 0xdf
je 0x408540
test cl, cl
jne 0x408540
xor eax, eax
add esp, 0x10
pop ebx
pop esi
pop edi
ret
cmp dl, 0x20
je 0x408550
test cl, cl
je 0x408537
lea esi, [esi]
movzx edx, byte [eax + 1]
add eax, 1
cmp dl, 0x20
je 0x408550
cmp dl, 9
je 0x408550
add esp, 0x10
pop ebx
pop esi
pop edi
ret