Function at 0x446130
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0xac
mov dword [esp], edx
mov dword [esp + 0x1c], eax
and eax, 1
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
call sub.msvcrt.dll_strlen
mov edi, eax
mov eax, dword [ebx]
mov dword [esp + 0x20], eax
test eax, eax
je 0x446553
mov dword [esp], eax
xor ebp, ebp
lea esi, [esp + 0x20]
call sub.msvcrt.dll_strlen
lea edi, [edi + eax + 2]
jmp 0x446195
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea edi, [edi + eax + 1]
cmp ebp, 0x1f
je 0x4463f0
add ebp, 1
mov eax, dword [ebx + ebp*4]
mov dword [esi + ebp*4], eax
test eax, eax
jne 0x446180
mov eax, dword [esp + 0x14]
add edi, 1
xor esi, esi
cmp byte [eax], 0x7e
je 0x446365
mov eax, dword [esp + 0x18]
mov dword [esp], edi
test eax, eax
jne 0x446327
call sub.libgcrypt_20.dll_gcry_malloc
mov ebx, eax
test eax, eax
je 0x44659e
mov eax, dword [esp + 0x14]
test esi, esi
je 0x44633a
movzx edx, byte [esi]
lea ecx, [eax + 1]
mov ebp, ebx
test dl, dl
je 0x446200
lea esi, [esi]
add esi, 1
add ebp, 1
mov byte [ebp - 1], dl
movzx edx, byte [esi]
test dl, dl
jne 0x4461f0
mov eax, dword [esp + 0x14]
mov byte [ebp], 0
movzx edx, byte [eax + 1]
test dl, dl
je 0x446220
add ecx, 1
add ebp, 1
mov byte [ebp - 1], dl
movzx edx, byte [ecx]
test dl, dl
jne 0x446210
mov byte [ebp], 0
xor edi, edi
lea esi, [esp + 0x20]
mov dword [esp], 0
call sub.libgcrypt_20.dll_gcry_free
mov edx, dword [esp + 0x20]
test edx, edx
je 0x44628e
nop
test edi, edi
jne 0x446253
cmp byte [ebx], 0x2f
jne 0x446253
cmp byte [ebx + 1], 0
je 0x446309
mov eax, 0x2f
add ebp, 1
mov word [ebp - 1], ax
movzx eax, byte [edx]
test al, al
je 0x446280
lea esi, [esi]
lea esi, [esi]
add edx, 1
add ebp, 1
mov byte [ebp - 1], al
movzx eax, byte [edx]
test al, al
jne 0x446270
add edi, 1
mov byte [ebp], 0
mov edx, dword [esi + edi*4]
test edx, edx
jne 0x446240
test byte [esp + 0x1c], 2
je 0x4462bd
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 0x4462bd
cmp al, 0x5c
jne 0x446417
mov dword [esp + 4], 0x5c
mov dword [esp], ebx
call sub.msvcrt.dll_strchr
test eax, eax
je 0x4462f3
movzx edx, byte [ebx]
test dl, dl
je 0x4462f3
mov eax, ebx
lea esi, [esi]
cmp dl, 0x2f
je 0x4463d0
add eax, 1
movzx edx, byte [eax]
test dl, dl
jne 0x4462e0
add esp, 0xac
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
add ebp, 1
mov byte [ebp - 1], al
add edx, 1
movzx eax, byte [edx]
test al, al
jne 0x446300
add edi, 1
mov byte [ebp], 0
mov edx, dword [esi + edi*4]
test edx, edx
jne 0x446240
jmp 0x44628e
call sub.libgcrypt_20.dll_gcry_xmalloc
mov ebx, eax
mov eax, dword [esp + 0x14]
test esi, esi
jne 0x4461de
movzx edx, byte [eax]
mov ebp, ebx
test dl, dl
je 0x446220
lea esi, [esi]
nop
add eax, 1
add ebp, 1
mov byte [ebp - 1], dl
movzx edx, byte [eax]
test dl, dl
jne 0x446350
jmp 0x446220
movzx eax, byte [eax + 1]
cmp al, 0x2f
je 0x446511
test al, al
je 0x446511
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
add eax, 1
test edx, edx
mov dword [esp], eax
je 0x44653f
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 0x4463ad
mov byte [eax], 0
mov dword [esp], ebx
xor esi, esi
call sub.libgcrypt_20.dll_gcry_free
mov eax, dword [esp + 0x18]
mov dword [esp], edi
test eax, eax
je 0x4461c3
jmp 0x446327
mov byte [eax], 0x5c
add eax, 1
movzx edx, byte [eax]
test dl, dl
jne 0x4462e0
add esp, 0xac
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x4465b9
mov dword [esp], 0x16
xor ebx, ebx
call sub.libgpg_error_0.dll_gpg_err_set_errno
add esp, 0xac
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00450660
mov edi, eax
test eax, eax
je 0x446569
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 + 0x18]
lea eax, [esi + eax + 2]
test edx, edx
mov dword [esp], eax
jne 0x44655b
call sub.libgcrypt_20.dll_gcry_malloc
mov dword [esp + 0x14], eax
test eax, eax
je 0x4465af
mov eax, dword [esp + 0x14]
mov esi, eax
cmp ebx, ebp
je 0x446481
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 ecx, eax
cmp dl, 0x2f
je 0x446580
mov ebp, esi
test dl, dl
je 0x4464b7
mov ecx, edi
jmp 0x4464a5
mov esi, eax
add eax, 1
add ecx, 1
mov byte [eax - 1], dl
mov ebp, eax
movzx edx, byte [ecx]
test dl, dl
jne 0x4464a0
lea ecx, [esi + 2]
mov eax, 0x2f
mov word [ebp], ax
mov dword [esp + 4], ebx
mov dword [esp], ecx
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 + 0x14]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
cmp eax, 2
jbe 0x4462bd
lea edx, [ebx + eax - 2]
cmp byte [edx], 0x2f
jne 0x4462bd
cmp byte [ebx + eax - 1], 0x2e
jne 0x4462bd
mov byte [edx], 0
jmp 0x4462bd
mov dword [esp], str.HOME
call sub.msvcrt.dll_getenv
mov esi, eax
test eax, eax
je 0x4461b4
cmp byte [eax], 0
je 0x4461b4
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add edi, eax
jmp 0x4461b4
call sub.libgcrypt_20.dll_gcry_strdup
mov ebx, eax
test eax, eax
jne 0x446396
jmp 0x4462f3
add edi, 1
jmp 0x4461a2
call sub.libgcrypt_20.dll_gcry_xmalloc
mov dword [esp + 0x14], eax
jmp 0x44645c
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x4465d5
mov dword [esp], ebx
xor ebx, ebx
call sub.libgcrypt_20.dll_gcry_free
jmp 0x4462f3
cmp byte [edi + 1], 0
jne 0x446498
mov byte [esi], 0x2f
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
jmp 0x4464cc
mov dword [esp], 0
call sub.libgcrypt_20.dll_gcry_free
jmp 0x4462f3
mov dword [esp], edi
call sub.libgcrypt_20.dll_gcry_free
jmp 0x446571
mov dword [esp + 8], str.do_make_filename
mov dword [esp + 4], 0x1b0
mov dword [esp], str._home_wk_b_gnupg_2.2_dist_PLAY_release_gnupg_w32_2.2.19_common_stringhelp.c
call fcn.0044e200
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 [0x4788f8]
mov dword [esp + 8], ebx
mov dword [esp + 4], str._nfatal:_getcwd_failed:__s_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call sub.msvcrt.dll_exit
lea esi, [esi]
lea esi, [esi]
nop
push ebp
push edi
mov edi, ecx
push esi
mov esi, eax
push ebx
sub esp, 0x2c
movsx eax, byte [eax]
mov dword [esp + 0x14], edx
test al, al
je 0x446830
xor ebx, ebx
xor ebp, ebp
test edx, edx
je 0x446800
lea esi, [esi]
lea esi, [esi]
cmp al, 0x3a
sete cl
cmp al, 0x25
sete dl
or cl, dl
jne 0x446680
cmp al, 0xa
je 0x446680
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
je 0x446683
lea esi, [esi]
lea esi, [esi]
add ebp, 1
add ebx, 1
movsx eax, byte [esi + ebx]
test al, al
jne 0x446650
lea eax, [ebx + ebp*2 + 1]
mov dword [esp], eax
test edi, edi
je 0x4467e0
call sub.libgcrypt_20.dll_gcry_xmalloc
movzx edx, byte [esi]
mov edi, eax
test dl, dl
je 0x4467f6
xor ebx, ebx
jmp 0x446752
cmp dl, 0x25
je 0x446794
cmp dl, 0xa
je 0x4467b0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4467d0
movsx eax, dl
mov dword [esp + 0x1c], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1b], dl
mov dword [esp], eax
call sub.msvcrt.dll_strchr
movzx edx, byte [esp + 0x1b]
mov ecx, dword [esp + 0x1c]
test eax, eax
je 0x4467d0
mov ecx, edx
lea eax, [edi + ebx]
shr cl, 4
mov byte [eax], 0x25
lea eax, [ecx + 0x30]
cmp cl, 9
mov byte [esp + 0x10], al
lea eax, [ecx + 0x57]
movzx ecx, byte [esp + 0x10]
cmovbe eax, ecx
and edx, 0xf
lea ecx, [ebx + 2]
cmp dl, 9
mov byte [ebp], al
lea ebp, [edx + 0x30]
lea eax, [edx + 0x57]
cmovle eax, ebp
add ebx, 3
lea ebp, [edi + ebx]
mov byte [edi + ecx], al
add esi, 1
movzx edx, byte [esi]
test dl, dl
je 0x446786
lea eax, [edi + ebx]
lea ecx, [ebx + 1]
mov dword [esp + 0x10], eax
lea ebp, [edi + ecx]
cmp dl, 0x3a
jne 0x4466c0
mov byte [eax], 0x25
add esi, 1
lea eax, [ebx + 2]
add ebx, 3
mov byte [ebp], 0x33
lea ebp, [edi + ebx]
mov byte [edi + eax], 0x61
movzx edx, byte [esi]
test dl, dl
jne 0x446752
mov byte [ebp], 0
add esp, 0x2c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [edi + ebx]
mov byte [eax], 0x25
lea eax, [ebx + 2]
add ebx, 3
mov byte [ebp], 0x32
lea ebp, [edi + ebx]
mov byte [edi + eax], 0x35
jmp 0x446748
lea eax, [edi + ebx]
mov byte [eax], 0x25
lea eax, [ebx + 2]
add ebx, 3
mov byte [ebp], 0x30
lea ebp, [edi + ebx]
mov byte [edi + eax], 0x61
jmp 0x446748
mov eax, dword [esp + 0x10]
mov ebx, ecx
mov byte [eax], dl
jmp 0x446748
call sub.libgcrypt_20.dll_gcry_malloc
mov edi, eax
test eax, eax
je 0x44678a
movzx edx, byte [esi]
test dl, dl
jne 0x4466af
mov ebp, edi
jmp 0x446786
mov ebp, edx
mov ebx, edx
cmp al, 0x25
sete cl
cmp al, 0x3a
sete dl
or cl, dl
jne 0x446816
cmp al, 0xa
jne 0x446819
add ebp, 1
add ebx, 1
movzx eax, byte [esi + ebx]
test al, al
jne 0x446804
jmp 0x44668e
mov eax, 1
jmp 0x446692