Function at 0x10166e10
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, 0xa4
call fcn.10228380
mov eax, dword [0x1033b254]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0xbc]
mov ecx, dword [esp + 0xcc]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xc8]
mov edx, dword [esp + 0xd4]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0xe0]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xe4]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xec]
mov dword [esp + 0x38], eax
xor eax, eax
mov ebp, dword [esp + 0xe8]
xor ebx, ebx
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xd0]
mov esi, dword [esp + 0xc4]
xor edi, edi
mov dword [esp + 0x50], ebp
test eax, eax
mov dword [esp + 0x30], 0x1ab
mov ebp, dword [esp + 0x30]
cmovne ebp, eax
mov dword [esp + 0x10], edi
test ecx, ecx
mov dword [esp + 0x30], ebp
mov ebp, dword [esp + 0x50]
mov eax, 0x1ab
cmovne eax, ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x64], eax
mov ecx, 0x800
test edx, edx
mov dword [esp + 0x44], 0xffffffff
mov eax, ecx
mov dword [esp + 0x2c], 0xffffffff
cmovne eax, edx
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xd8]
test eax, eax
cmovne ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x6c], ecx
test eax, eax
jne 0x10166f5a
test esi, esi
jne 0x10166f91
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x10167059
call sym.libcrypto_3.dll_ERR_new
push 0x102d9ec4
push 0x3f
push str.cryptopkcs12p12_crt.c
call sym.libcrypto_3.dll_ERR_set_debug
push esi
push 0x68
push 0x23
call sym.libcrypto_3.dll_ERR_set_error
add esp, 0x18
xor eax, eax
jmp 0x10167424
test esi, esi
je 0x10167055
push eax
push esi
call sym.libcrypto_3.dll_X509_check_private_key
add esp, 8
test eax, eax
je 0x10166f53
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x74]
push eax
call sym.libcrypto_3.dll_EVP_sha1
push eax
push esi
call sym.libcrypto_3.dll_X509_digest
add esp, 0x10
test eax, eax
je 0x10166f53
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x34]
test edi, edi
jne 0x10166fb1
lea eax, [esp + 0x44]
push eax
push esi
call sym.libcrypto_3.dll_X509_alias_get0
mov ebx, dword [esp + 0x30]
mov edi, eax
add esp, 8
mov dword [esp + 0x34], edi
test ebx, ebx
je 0x10166fbf
lea eax, [esp + 0x70]
mov dword [esp + 0x2c], ebx
jmp 0x10166fd1
lea eax, [esp + 0x2c]
push eax
push esi
call sym.libcrypto_3.dll_X509_keyid_get0
mov ebx, dword [esp + 0x34]
add esp, 8
push ebx
push eax
push dword [esp + 0x4c]
lea eax, [esp + 0x1c]
push edi
push esi
push eax
call fcn.10167550
add esp, 0x18
mov esi, eax
test ebp, ebp
je 0x10167051
push dword [esp + 0x38]
push esi
call ebp
add esp, 8
cmp eax, 0xffffffff
jne 0x1016702c
call sym.libcrypto_3.dll_ERR_new
push 0x102d9ec4
push 0x58
push str.cryptopkcs12p12_crt.c
call sym.libcrypto_3.dll_ERR_set_debug
push 0
push 0x73
push 0x23
call sym.libcrypto_3.dll_ERR_set_error
mov edi, dword [esp + 0x28]
add esp, 0x18
xor esi, esi
xor ebx, ebx
jmp 0x101673ff
test eax, eax
jne 0x10167051
test esi, esi
je 0x10167051
mov edi, dword [esp + 0x10]
push esi
push edi
call sym.libcrypto_3.dll_OPENSSL_sk_delete_ptr
add esp, 8
test eax, eax
je 0x10167055
push eax
call sym.libcrypto_3.dll_PKCS12_SAFEBAG_free
add esp, 4
jmp 0x10167055
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
xor ebx, ebx
push esi
mov dword [esp + 0x58], ebx
call sym.libcrypto_3.dll_OPENSSL_sk_num
add esp, 4
test eax, eax
jle 0x10167176
push ebx
push esi
call sym.libcrypto_3.dll_OPENSSL_sk_value
mov esi, eax
mov dword [esp + 0x54], 0xffffffff
lea eax, [esp + 0x54]
mov dword [esp + 0x50], 0xffffffff
push eax
push esi
call sym.libcrypto_3.dll_X509_alias_get0
mov ebx, eax
lea eax, [esp + 0x58]
push eax
push esi
call sym.libcrypto_3.dll_X509_keyid_get0
mov ebp, eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x64]
push esi
mov dword [esp + 0x78], eax
call sym.libcrypto_3.dll_PKCS12_SAFEBAG_create_cert
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x101671eb
test ebx, ebx
je 0x101670e0
push dword [esp + 0x5c]
push ebx
push esi
call sym.libcrypto_3.dll_PKCS12_add_friendlyname_utf8
add esp, 0xc
test eax, eax
je 0x101671eb
test ebp, ebp
je 0x101670fa
push dword [esp + 0x60]
push ebp
push esi
call sym.libcrypto_3.dll_PKCS12_add_localkeyid
add esp, 0xc
test eax, eax
je 0x101671eb
xor ebx, ebx
test edi, edi
jne 0x10167114
call sym.libcrypto_3.dll_OPENSSL_sk_new_null
mov edi, eax
test edi, edi
je 0x101671eb
mov ebx, 1
push esi
push edi
call sym.libcrypto_3.dll_OPENSSL_sk_push
add esp, 8
test eax, eax
je 0x101671dc
mov ebp, dword [esp + 0x50]
test ebp, ebp
je 0x10167158
push dword [esp + 0x38]
push esi
call ebp
add esp, 8
cmp eax, 0xffffffff
je 0x101671af
test eax, eax
jne 0x10167158
push esi
push edi
call sym.libcrypto_3.dll_OPENSSL_sk_delete_ptr
add esp, 8
test eax, eax
je 0x10167158
push eax
call sym.libcrypto_3.dll_PKCS12_SAFEBAG_free
add esp, 4
mov ebx, dword [esp + 0x54]
mov esi, dword [esp + 0x18]
inc ebx
push esi
mov dword [esp + 0x58], ebx
call sym.libcrypto_3.dll_OPENSSL_sk_num
add esp, 4
cmp ebx, eax
jl 0x10167070
mov esi, dword [esp + 0x58]
test edi, edi
je 0x101671fd
push dword [esp + 0x3c]
lea eax, [esp + 0x24]
push dword [esp + 0x18]
push dword [esp + 0x48]
push esi
push dword [esp + 0x40]
push edi
push eax
call sym.libcrypto_3.dll_PKCS12_add_safe_ex
mov ebx, dword [esp + 0x3c]
add esp, 0x1c
test eax, eax
je 0x10167326
mov dword [esp + 0x24], ebx
jmp 0x101671ff
call sym.libcrypto_3.dll_ERR_new
push 0x102d9ec4
push 0x67
push str.cryptopkcs12p12_crt.c
call sym.libcrypto_3.dll_ERR_set_debug
push 0
push 0x73
push 0x23
call sym.libcrypto_3.dll_ERR_set_error
add esp, 0x18
xor esi, esi
xor ebx, ebx
jmp 0x101673ff
test ebx, ebx
je 0x101671eb
push edi
call sym.libcrypto_3.dll_OPENSSL_sk_free
add esp, 4
xor edi, edi
push esi
call sym.libcrypto_3.dll_PKCS12_SAFEBAG_free
add esp, 4
xor esi, esi
xor ebx, ebx
jmp 0x101673ff
xor ebx, ebx
push sym.libcrypto_3.dll_PKCS12_SAFEBAG_free
push edi
call sym.libcrypto_3.dll_OPENSSL_sk_pop_free
mov eax, dword [esp + 0x24]
xor edi, edi
add esp, 8
mov dword [esp + 0x10], edi
test eax, eax
je 0x1016737d
push dword [esp + 0x3c]
push dword [esp + 0x18]
push dword [esp + 0x48]
push dword [esp + 0x70]
push esi
push dword [esp + 0x7c]
push eax
lea eax, [esp + 0x2c]
push eax
call sym.libcrypto_3.dll_PKCS12_add_key_ex
mov esi, eax
add esp, 0x20
test esi, esi
je 0x10167322
push 0xffffffffffffffff
push 0x1a1
push dword [esp + 0x24]
call sym.libcrypto_3.dll_EVP_PKEY_get_attr_by_NID
add esp, 0xc
lea edi, [esi + 8]
test eax, eax
js 0x10167282
push eax
push dword [esp + 0x20]
call sym.libcrypto_3.dll_EVP_PKEY_get_attr
push eax
push edi
call sym.libcrypto_3.dll_X509at_add1_attr
add esp, 0x10
test eax, eax
je 0x10167322
push 0xffffffffffffffff
push 0x358
push dword [esp + 0x24]
call sym.libcrypto_3.dll_EVP_PKEY_get_attr_by_NID
add esp, 0xc
test eax, eax
js 0x101672b1
push eax
push dword [esp + 0x20]
call sym.libcrypto_3.dll_EVP_PKEY_get_attr
push eax
push edi
call sym.libcrypto_3.dll_X509at_add1_attr
add esp, 0x10
test eax, eax
je 0x10167322
mov eax, dword [esp + 0x34]
test eax, eax
je 0x101672c9
push 0xffffffffffffffff
push eax
push esi
call sym.libcrypto_3.dll_PKCS12_add_friendlyname_utf8
add esp, 0xc
test eax, eax
je 0x10167322
mov eax, dword [esp + 0x28]
test eax, eax
je 0x101672e4
push eax
lea eax, [esp + 0x74]
push eax
push esi
call sym.libcrypto_3.dll_PKCS12_add_localkeyid
add esp, 0xc
test eax, eax
je 0x10167322
mov edi, dword [esp + 0x10]
test ebp, ebp
je 0x10167348
push dword [esp + 0x38]
push esi
call ebp
add esp, 8
cmp eax, 0xffffffff
jne 0x1016732d
call sym.libcrypto_3.dll_ERR_new
push 0x102d9ec4
push 0x89
push str.cryptopkcs12p12_crt.c
call sym.libcrypto_3.dll_ERR_set_debug
push 0
push 0x73
push 0x23
call sym.libcrypto_3.dll_ERR_set_error
add esp, 0x18
mov edi, dword [esp + 0x10]
xor esi, esi
jmp 0x101673ff
test eax, eax
jne 0x10167348
push esi
push edi
call sym.libcrypto_3.dll_OPENSSL_sk_delete_ptr
add esp, 8
test eax, eax
je 0x10167348
push eax
call sym.libcrypto_3.dll_PKCS12_SAFEBAG_free
add esp, 4
test edi, edi
je 0x1016737d
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push edi
push eax
call sym.libcrypto_3.dll_PKCS12_add_safe_ex
add esp, 0x1c
test eax, eax
je 0x10167372
mov esi, dword [esp + 0x20]
mov dword [esp + 0x24], esi
jmp 0x10167381
mov ebx, dword [esp + 0x20]
xor esi, esi
jmp 0x101673ff
mov esi, dword [esp + 0x24]
push sym.libcrypto_3.dll_PKCS12_SAFEBAG_free
push edi
call sym.libcrypto_3.dll_OPENSSL_sk_pop_free
push dword [esp + 0x44]
xor edi, edi
push dword [esp + 0x20]
push 0x15
call sym.libcrypto_3.dll_PKCS12_init_ex
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
je 0x101673c3
push esi
push eax
call sym.libcrypto_3.dll_PKCS12_pack_authsafes
add esp, 8
test eax, eax
jne 0x101673cb
mov esi, dword [esp + 0x14]
push esi
call sym.libcrypto_3.dll_PKCS12_free
add esp, 4
mov ebx, dword [esp + 0x24]
xor esi, esi
jmp 0x101673ff
push sym.libcrypto_3.dll_PKCS7_free
push esi
call sym.libcrypto_3.dll_OPENSSL_sk_pop_free
mov eax, dword [esp + 0x74]
add esp, 8
mov esi, dword [esp + 0x14]
xor ebx, ebx
cmp eax, 0xffffffff
je 0x10167422
push ebx
push eax
push ebx
push ebx
push 0xffffffffffffffff
push dword [esp + 0x54]
push esi
call sym.libcrypto_3.dll_PKCS12_set_mac
add esp, 0x1c
test eax, eax
jne 0x10167422
push esi
call sym.libcrypto_3.dll_PKCS12_free
push sym.libcrypto_3.dll_PKCS7_free
push ebx
call sym.libcrypto_3.dll_OPENSSL_sk_pop_free
push sym.libcrypto_3.dll_PKCS12_SAFEBAG_free
push edi
call sym.libcrypto_3.dll_OPENSSL_sk_pop_free
add esp, 0x14
xor eax, eax
jmp 0x10167424
mov eax, esi
mov ecx, dword [esp + 0xb0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1022836f
add esp, 0xa4
ret