Function at 0x409210
Capabilities:
Query environment variable
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
mov eax, dword [esp + 0xa8]
mov esi, dword [esp + 0xa0]
mov ebp, dword [esp + 0xa4]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xac]
mov dword [esp + 0x3c], eax
mov eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0x7c], eax
mov eax, esi
call fcn.004080f0
mov ebx, eax
test eax, eax
je 0x409320
call sub.cygopenssh.dll_sshbuf_new
mov edi, eax
test eax, eax
je 0x409ca4
mov dword [esp + 4], 0x14
mov dword [esp], eax
call sub.cygopenssh.dll_sshbuf_put_u8
test eax, eax
jne 0x409c23
mov dword [esp + 4], esi
mov dword [esp], edi
call sub.cygopenssh.dll_sshbuf_put_cstring
test eax, eax
jne 0x409c23
mov dword [esp + 4], ebp
mov dword [esp], edi
call sub.cygopenssh.dll_sshbuf_put_cstring
test eax, eax
jne 0x409c23
mov eax, dword [ebx + 8]
mov edx, edi
call fcn.00408150
mov dword [esp], edi
call sub.cygopenssh.dll_sshbuf_reset
mov esi, dword [ebx + 8]
mov dword [esp], edi
call sub.cygopenssh.dll_sshbuf_reset
cmp esi, 0xffffffff
je 0x4092e4
mov edx, edi
mov eax, esi
call fcn.00408290
cmp eax, 0xc
je 0x409728
cmp eax, 0x1e
je 0x409650
mov dword [esp + 0x70], 0xffffffff
mov dword [esp], edi
call sub.cygopenssh.dll_sshbuf_free
mov edi, dword [esp + 0x70]
mov eax, dword [esp + 0x7c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x409c9f
add esp, 0x8c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
xor edx, edx
mov ecx, edx
ret
cmp dword [0x4160c0], 0x7ffffffe
ja 0x409ce0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], str.start_helper_for__s
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 7
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x212
mov dword [esp + 4], str.pkcs11_start_helper
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshlog
lea eax, [esp + 0x74]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 1
call sub.cygwin1.dll_socketpair
mov edi, eax
cmp eax, 0xffffffff
je 0x409a03
mov dword [esp + 4], 0x24
mov dword [esp], 1
call sub.cygopenssh.dll_xcalloc
mov dword [esp + 0x70], 0
mov dword [esp + 0x44], eax
call sub.cygcrypto_1.1.dll_EC_KEY_OpenSSL
mov dword [esp], eax
call sub.cygcrypto_1.1.dll_EC_KEY_METHOD_new
mov dword [esp + 0x48], eax
test eax, eax
je 0x409a57
mov edi, dword [esp + 0x48]
lea eax, [esp + 0x70]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp], edi
mov dword [esp + 8], 0
call sub.cygcrypto_1.1.dll_EC_KEY_METHOD_get_sign
mov eax, dword [esp + 0x70]
mov dword [esp], edi
mov dword [esp + 0xc], 0x4084e0
mov dword [esp + 4], eax
mov dword [esp + 8], 0
call sub.cygcrypto_1.1.dll_EC_KEY_METHOD_set_sign
lea eax, [esp + 0x6c]
mov dword [esp], edi
mov dword [esp + 0x18], eax
lea eax, [esp + 0x68]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x64]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x60]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
add eax, 0x18
mov dword [esp + 8], eax
lea eax, [esp + 0x5c]
mov dword [esp + 4], eax
call sub.cygcrypto_1.1.dll_EC_KEY_METHOD_get_init
mov eax, dword [esp + 0x6c]
mov dword [esp], edi
mov dword [esp + 8], 0x407f80
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
call sub.cygcrypto_1.1.dll_EC_KEY_METHOD_set_init
call sub.cygcrypto_1.1.dll_RSA_get_default_method
mov dword [esp], eax
call sub.cygcrypto_1.1.dll_RSA_meth_dup
mov edi, eax
test eax, eax
je 0x409d1c
mov dword [esp], eax
call sub.cygcrypto_1.1.dll_RSA_meth_get_finish
mov edx, dword [esp + 0x44]
mov dword [edx + 0x14], eax
mov dword [esp + 4], str.ssh_pkcs11_helper
mov dword [esp], edi
call sub.cygcrypto_1.1.dll_RSA_meth_set1_name
test eax, eax
je 0x409c63
mov dword [esp + 4], 0x4088f0
mov dword [esp], edi
call sub.cygcrypto_1.1.dll_RSA_meth_set_priv_enc
test eax, eax
je 0x409c63
mov dword [esp + 4], 0x407db0
mov dword [esp], edi
call sub.cygcrypto_1.1.dll_RSA_meth_set_finish
test eax, eax
je 0x409c63
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], edx
call sub.cygwin1.dll_fork
mov edi, eax
cmp eax, 0xffffffff
je 0x409ad7
mov eax, dword [esp + 0x78]
test edi, edi
jne 0x409670
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.cygwin1.dll_dup2
cmp eax, 0xffffffff
je 0x4099c0
mov eax, dword [esp + 0x78]
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.cygwin1.dll_dup2
cmp eax, 0xffffffff
je 0x4099c0
mov eax, dword [esp + 0x74]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov dword [esp], str.SSH_PKCS11_HELPER
call sub.cygwin1.dll_getenv
mov esi, eax
test eax, eax
je 0x4099f9
cmp byte [eax], 0
mov eax, str._usr_bin_ssh_pkcs11_helper
cmove esi, eax
call sub.cygopenssh.dll_log_level_get
mov edx, str._vvv
mov dword [esp + 0x1c], esi
cmp eax, 4
mov eax, 0x410ca3
mov dword [esp + 0x18], 0x410d5f
cmovg eax, edx
mov dword [esp + 0x14], 0
cmovg ebx, edx
mov dword [esp + 0x10], 5
mov dword [esp + 0x20], eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x234
mov dword [esp + 4], str.pkcs11_start_helper
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshlog
mov dword [esp + 8], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], esi
mov dword [esp], esi
call sub.cygwin1.dll_execlp
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov ebx, eax
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str.exec:__s:__s_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [esp], 1
call sub.cygwin1.dll__exit
lea esi, [esi]
nop
lea eax, [esp + 0x70]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.cygopenssh.dll_sshbuf_get_u32
test eax, eax
je 0x4092ec
jmp 0x4092e4
mov dword [esp], eax
call sub.cygwin1.dll_close
mov ebx, dword [esp + 0x44]
mov eax, dword [esp + 0x74]
mov dword [ebx + 8], eax
mov dword [esp], esi
call sub.cygopenssh.dll_xstrdup
mov dword [ebx + 4], edi
mov dword [ebx], eax
mov dword [esp + 0x28], edi
mov edx, dword [ebx + 8]
mov dword [esp + 0x20], eax
mov eax, dword [0x4160c0]
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], str.helper__zu_for___s__on_fd__d_pid__ld
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 7
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x23e
mov dword [esp + 4], str.pkcs11_start_helper
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshlog
mov eax, dword [0x4160c0]
mov dword [esp + 0xc], 4
lea edx, [eax + 1]
mov dword [esp + 4], eax
mov eax, dword [0x4160c4]
mov dword [esp + 8], edx
mov dword [esp], eax
call sub.cygopenssh.dll_xrecallocarray
mov edx, dword [0x4160c0]
mov dword [0x4160c4], eax
lea ecx, [edx + 1]
mov dword [eax + edx*4], ebx
mov dword [0x4160c0], ecx
jmp 0x409258
lea eax, [esp + 0x70]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.cygopenssh.dll_sshbuf_get_u32
test eax, eax
jne 0x409d58
mov eax, dword [esp + 0x70]
mov dword [esp + 4], 4
mov dword [esp], eax
call sub.cygopenssh.dll_xcalloc
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x3c]
mov dword [edx], eax
test esi, esi
je 0x409778
mov eax, dword [esp + 0x70]
mov dword [esp + 4], 4
mov dword [esp], eax
call sub.cygopenssh.dll_xcalloc
mov dword [esi], eax
lea eax, [esp + 0x6c]
xor esi, esi
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x64]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x70]
test eax, eax
je 0x4092ec
mov dword [esp + 0x44], edi
mov ebp, dword [esp + 0x3c]
jmp 0x409863
cmp eax, 2
jne 0x409bab
mov eax, dword [ebx + 0x10]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x14]
mov dword [esp], eax
call sub.cygcrypto_1.1.dll_EC_KEY_set_method
mov eax, dword [ebx + 0x20]
lea ecx, [eax + 1]
mov dword [ebx + 0x20], ecx
cmp eax, 0x7ffffffe
ja 0x409be7
or dword [edi + 4], 1
mov eax, dword [ebx + 0x20]
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x20], eax
mov eax, dword [ebx]
mov dword [esp + 0x18], str.provider__s_remaining_keys:__zu_RSA__zu_ECDSA
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 7
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x1a9
mov dword [esp + 4], str.wrap_key
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshlog
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x60]
mov eax, dword [eax]
mov dword [eax + esi*4], edx
test ebp, ebp
je 0x409998
mov eax, dword [ebp]
mov edx, dword [esp + 0x68]
mov dword [eax + esi*4], edx
mov eax, dword [esp + 0x64]
add esi, 1
mov dword [esp], eax
call sub.cygwin1.dll_free
cmp dword [esp + 0x70], esi
jbe 0x4099b0
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x44]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x48]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.cygopenssh.dll_sshbuf_get_string
test eax, eax
jne 0x409b2b
lea eax, [esp + 0x68]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.cygopenssh.dll_sshbuf_get_cstring
test eax, eax
jne 0x409b2b
lea eax, [esp + 0x60]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call sub.cygopenssh.dll_sshkey_from_blob
test eax, eax
jne 0x409b6b
mov edi, dword [esp + 0x60]
mov ecx, dword [ebx]
mov dword [esp], edi
mov dword [esp + 0x3c], ecx
call sub.cygopenssh.dll_sshkey_type
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x18], str.wrap__s_for_provider__s
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 7
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x19b
mov dword [esp + 4], str.wrap_key
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshlog
mov eax, dword [edi]
test eax, eax
jne 0x4097a8
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], eax
mov eax, dword [edi + 8]
mov dword [esp], eax
call sub.cygcrypto_1.1.dll_RSA_set_method
mov eax, dword [ebx + 0x1c]
lea ecx, [eax + 1]
mov dword [ebx + 0x1c], ecx
cmp eax, 0x7ffffffe
jbe 0x4097d7
mov dword [esp + 0x18], str.RSA_refcount_error
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x19f
mov dword [esp + 4], str.wrap_key
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
lea esi, [esi]
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call sub.cygwin1.dll_free
jmp 0x40984a
mov edi, dword [esp + 0x44]
jmp 0x4092ec
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov ebx, eax
call sub.cygwin1.dll___getreent
mov dword [esp + 8], ebx
mov dword [esp + 4], str.dup2:__s_n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [esp], 1
call sub.cygwin1.dll__exit
mov esi, str._usr_bin_ssh_pkcs11_helper
jmp 0x409596
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov dword [esp + 0x18], 0x410cc9
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x214
mov dword [esp + 4], str.pkcs11_start_helper
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshlog
jmp 0x4092f8
mov dword [esp + 0x18], str.pkcs11_start_helper_methods_failed
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x219
mov dword [esp + 4], str.pkcs11_start_helper
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshlog
mov eax, dword [esp + 0x74]
mov edi, 0xffffffff
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov esi, dword [esp + 0x44]
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call sub.cygcrypto_1.1.dll_RSA_meth_free
mov eax, dword [esi + 0x10]
mov dword [esp], eax
call sub.cygcrypto_1.1.dll_EC_KEY_METHOD_free
mov dword [esp], esi
call sub.cygwin1.dll_free
jmp 0x4092f8
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov dword [esp + 0x18], 0x410d3a
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x21d
mov dword [esp + 4], str.pkcs11_start_helper
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshlog
jmp 0x409a93
mov dword [esp], eax
call sub.cygopenssh.dll_ssh_err
mov dword [esp + 0x18], str.parse_key
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x26b
mov dword [esp + 4], str.pkcs11_add_provider
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
mov dword [esp], eax
call sub.cygopenssh.dll_ssh_err
mov dword [esp + 0x18], 0x410db7
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x26d
mov dword [esp + 4], str.pkcs11_add_provider
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
mov dword [esp + 0x18], str.unknown_key_type
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x1a7
mov dword [esp + 4], str.wrap_key
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
mov dword [esp + 0x18], str.EC_refcount_error
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x1a4
mov dword [esp + 4], str.wrap_key
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
mov dword [esp], eax
call sub.cygopenssh.dll_ssh_err
mov dword [esp + 0x18], 0x410b9a
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x25c
mov dword [esp + 4], str.pkcs11_add_provider
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
mov dword [esp + 0x18], str.failed_to_prepare_method
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x201
mov dword [esp + 4], str.pkcs11_start_helper_methods
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
call sub.cygwin1.dll___stack_chk_fail
mov dword [esp + 0x18], str.sshbuf_new_failed
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x258
mov dword [esp + 4], str.pkcs11_add_provider
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
mov dword [esp + 0x18], str.too_many_helpers
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x211
mov dword [esp + 4], str.pkcs11_start_helper
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
mov dword [esp + 0x18], str.RSA_meth_dup_failed
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x1fc
mov dword [esp + 4], str.pkcs11_start_helper_methods
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
mov dword [esp], eax
call sub.cygopenssh.dll_ssh_err
mov dword [esp + 0x18], str.parse_nkeys
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x263
mov dword [esp + 4], str.pkcs11_add_provider
mov dword [esp], str.ssh_pkcs11_client.c
call sub.cygopenssh.dll_sshfatal
lea esi, [esi]
nop