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

Disassembly:
sub esp, 0x168
mov eax, dword [0x1008602c]
xor eax, esp
mov dword [esp + 0x164], eax
mov ecx, dword [esp + 0x174]
xor eax, eax
push ebx
mov ebx, dword [esp + 0x170]
mov edx, 0x1c0
push ebp
push esi
mov esi, dword [esp + 0x17c]
lea ecx, [ecx + 0x19]
shl ecx, 4
mov ebp, 0x1b0
push edi
xor edi, edi
mov dword [esp + 0x28], eax
add ecx, esi
mov dword [esp + 0x14], edi
cmp dword [esi + 0xb8], 2
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x10], edx
jne 0x100498d5
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, edx
cmp dword [eax + esi], 2
je 0x100498d5
mov ebp, dword [esi + 0xac]
mov dword [esp + 0x20], ebp
lea ebp, [edx - 0x10]
jmp 0x100498dc
mov eax, dword [esi + 0x64]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x14]
push eax
mov eax, dword [ecx + 8]
push 0x53
push dword [eax + 4]
mov eax, dword [0x10086c9c]
mov eax, dword [eax + 0x2c]
call eax
test eax, eax
jne 0x10049e19
mov edx, dword [esp + 0x14]
test edx, edx
je 0x10049e19
mov ecx, dword [esi + 0xb8]
cmp ecx, 2
jne 0x1004992d
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, dword [esp + 0x10]
cmp dword [eax + esi], ecx
je 0x1004992d
mov eax, dword [esi + 0x218]
jmp 0x10049933
mov eax, dword [esi + 0x1e0]
test eax, eax
jne 0x10049969
cmp ecx, 2
jne 0x1004995b
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
mov ecx, 0x1c0
cmovne eax, ecx
cmp dword [eax + esi], 2
je 0x1004995b
mov eax, dword [esi + 0x238]
jmp 0x10049961
mov eax, dword [esi + 0x200]
test eax, eax
je 0x10049ad5
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 8]
cmp byte [eax + 0x47], 0
je 0x10049ad5
push 0
push 2
push 1
push 6
call fcn.10044ac0
add esp, 0x10
test al, al
je 0x100499a6
push str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
push ebx
call fcn.10017bb0
add esp, 8
mov edi, 0x4d
jmp 0x10049e3d
push 0
push 0x2000
push 0
push 0
push 2
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov edx, eax
mov dword [esp + 0x28], edx
test edx, edx
jne 0x100499ef
push 0x100
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1002aab0
push eax
push str.schannel:_failed_to_create_certificate_store:__s
push ebx
call fcn.10017bb0
mov edi, 0x4d
jmp 0x10049e3a
mov ecx, dword [esi + 0xb8]
mov edi, 0x1c0
cmp ecx, 2
jne 0x10049a18
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, edi
cmp dword [eax + esi], ecx
je 0x10049a18
mov eax, dword [esi + 0x238]
jmp 0x10049a1e
mov eax, dword [esi + 0x200]
test eax, eax
je 0x10049a38
push ebx
push str._memory_blob_
push dword [eax + 4]
push dword [eax]
push edx
call fcn.10049ea0
add esp, 0x14
jmp 0x10049a67
cmp ecx, 2
jne 0x10049a56
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
cmovne eax, edi
cmp dword [eax + esi], ecx
je 0x10049a56
mov eax, dword [esi + 0x218]
jmp 0x10049a5c
mov eax, dword [esi + 0x1e0]
push ebx
push eax
push edx
call fcn.1004a0a0
add esp, 0xc
mov edi, eax
test edi, edi
jne 0x10049e3d
push 0x30
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.10053e30
mov eax, dword [esp + 0x34]
add esp, 0xc
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x44], 0x30
push eax
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
test eax, eax
jne 0x10049ad1
push 0x100
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1002aab0
push eax
push str.schannel:_failed_to_create_certificate_chain_engine:__s
push ebx
call fcn.10017bb0
mov edi, 0x4d
jmp 0x10049e3a
mov edx, dword [esp + 0x14]
cmp dword [esi + 0xb8], 2
xorps xmm0, xmm0
movups xmmword [esp + 0x34], xmm0
mov dword [esp + 0x34], 0x10
jne 0x10049b0d
cmp dword [esi + 0x14c], 0xffffffff
mov eax, ebp
mov ecx, 0x1c0
cmovne eax, ecx
cmp dword [eax + esi], 2
je 0x10049b0d
mov cl, byte [ebx + 0x4d3]
jmp 0x10049b13
mov cl, byte [ebx + 0x467]
lea eax, [esp + 0x1c]
mov dword [esp + 0x10], 0
push eax
push 0
test cl, cl
mov eax, 0x20000000
cmovne eax, dword [esp + 0x18]
push eax
lea eax, [esp + 0x40]
push eax
push dword [edx + 0x10]
push 0
push edx
push dword [esp + 0x40]
call dword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
test eax, eax
jne 0x10049b77
push 0x100
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1002aab0
push eax
push str.schannel:_CertGetCertificateChain_failed:__s
push ebx
call fcn.10017bb0
mov dword [esp + 0x34], 0
jmp 0x10049e35
cmp byte [ebx + 0x469], 0
mov eax, 0xfffffffd
mov ecx, 0xfeffffbd
cmove ecx, eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x10]
mov eax, dword [eax]
and ecx, dword [eax + 4]
je 0x10049c4a
test cl, 4
je 0x10049bba
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_REVOKED
push ebx
call fcn.10017bb0
add esp, 8
mov edi, 0x3c
jmp 0x10049e3d
test ecx, 0x10000
je 0x10049bda
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_PARTIAL_CHAIN
push ebx
call fcn.10017bb0
add esp, 8
mov edi, 0x3c
jmp 0x10049e3d
test cl, 0x20
je 0x10049bf7
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_UNTRUSTED_ROOT
push ebx
call fcn.10017bb0
add esp, 8
mov edi, 0x3c
jmp 0x10049e3d
test cl, 1
je 0x10049c14
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_NOT_TIME_VALID
push ebx
call fcn.10017bb0
add esp, 8
mov edi, 0x3c
jmp 0x10049e3d
test cl, 0x40
je 0x10049c31
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_REVOCATION_STATUS_UNKNOWN
push ebx
call fcn.10017bb0
add esp, 8
mov edi, 0x3c
jmp 0x10049e3d
push ecx
push str.schannel:_CertGetCertificateChain_error_mask:_0x_08x
push ebx
call fcn.10017bb0
add esp, 0xc
mov edi, 0x3c
jmp 0x10049e3d
cmp dword [esi + 0xb8], 2
jne 0x10049c70
cmp dword [esi + 0x14c], 0xffffffff
mov eax, 0x1c0
cmovne ebp, eax
cmp dword [esi + ebp], 2
je 0x10049c70
mov al, byte [esi + 0x241]
jmp 0x10049c76
mov al, byte [esi + 0x209]
test al, al
je 0x10049e3d
mov eax, dword [esp + 0x14]
xor esi, esi
push esi
push esi
push eax
push ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], esi
call fcn.1004a370
mov ebp, eax
add esp, 0x10
mov dword [esp + 0x30], ebp
test ebp, ebp
jne 0x10049ccd
push str.schannel:_CertGetNameString___returned_no_certificate_name_information
push ebx
call fcn.10017bb0
add esp, 8
lea edi, [esi + 0x3c]
push dword [esp + 0x10]
call dword [0x10086004]
add esp, 4
jmp 0x10049e3d
push ebp
call dword [section..data]
mov edi, eax
add esp, 4
mov dword [esp + 0x10], edi
test edi, edi
jne 0x10049cf3
push eax
lea edi, [eax + 0x1b]
call dword [0x10086004]
add esp, 4
jmp 0x10049e3d
push ebp
push edi
push dword [esp + 0x34]
push ebx
call fcn.1004a370
add esp, 0x10
cmp eax, ebp
je 0x10049d2b
push str.schannel:_CertGetNameString___returned_certificate_name_information_of_unexpected_size
push ebx
call fcn.10017bb0
add esp, 8
mov edi, 0x3c
push dword [esp + 0x10]
call dword [0x10086004]
add esp, 4
jmp 0x10049e3d
mov edi, 0x3c
test ebp, ebp
je 0x10049df8
nop dword [eax + eax]
add esi, dword [esp + 0x10]
cmp byte [esi], 0
je 0x10049dd2
cmp edi, 0x3c
jne 0x10049dd7
push esi
call fcn.10062892
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x10049d6a
lea edi, [eax + 0x1b]
jmp 0x10049dc4
mov edi, dword [esp + 0x20]
push edi
push ebp
call fcn.10050e60
add esp, 8
push ebp
push edi
cmp eax, 1
jne 0x10049d91
push str.schannel:_connection_hostname___s__validated_against_certificate_name___s__n
push ebx
call fcn.10017c70
add esp, 0x10
xor edi, edi
jmp 0x10049dbb
push str.schannel:_connection_hostname___s__did_not_match_against_certificate_name___s__n
push ebx
call fcn.10017c70
add esp, 0x10
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x10049da2
mov eax, dword [esp + 0x18]
sub esi, ecx
inc eax
mov edi, 0x3c
add eax, esi
mov dword [esp + 0x18], eax
push ebp
call fcn.100577ad
add esp, 4
mov esi, dword [esp + 0x18]
cmp esi, dword [esp + 0x30]
jb 0x10049d40
cmp edi, 0x3c
je 0x10049df8
test edi, edi
je 0x10049e0a
push str.schannel:_server_certificate_name_verification_failed
push ebx
call fcn.10017bb0
add esp, 8
push dword [esp + 0x10]
call dword [0x10086004]
add esp, 4
jmp 0x10049e3d
push dword [esp + 0x20]
push str.schannel:_CertGetNameString___failed_to_match_connection_hostname___s__against_server_certificate_names
push ebx
call fcn.10017bb0
add esp, 0xc
push dword [esp + 0x10]
call dword [0x10086004]
add esp, 4
jmp 0x10049e3d
push 0x100
lea ecx, [esp + 0x78]
push ecx
push eax
call fcn.1002a360
push eax
push str.schannel:_Failed_to_read_remote_certificate_context:__s
push ebx
call fcn.10017bb0
mov edi, 0x3c
add esp, 0x18
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10049e4c
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x10049e5d
push 0
push eax
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10049e6c
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10049e7b
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov ecx, dword [esp + 0x174]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10052640
add esp, 0x168
ret