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

Disassembly:
sub esp, 0x64
push ebx
push ebp
mov ebp, dword [esp + 0x70]
mov ebx, dword [ebp]
push esi
mov esi, dword [esp + 0x78]
add esi, 0x1f
shl esi, 4
push edi
or eax, 0xffffffff
mov edi, 2
add esi, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x78], ebx
cmp dword [ebp + 0xec], edi
jne 0x499a99
xor ecx, ecx
cmp dword [ebp + 0x1ac], eax
setne cl
shl ecx, 4
cmp dword [ecx + ebp + 0x214], edi
je 0x499a99
mov edx, dword [ebp + 0xe0]
mov dword [esp + 0x14], edx
jmp 0x499aa3
mov eax, dword [ebp + 0x9c]
mov dword [esp + 0x14], eax
mov edx, dword [ebp + 0xfc]
mov eax, dword [esp + 0x14]
xor ecx, ecx
cmp dword [esi + 8], 3
push edx
setne cl
push eax
push str.schannel:_SSL_TLS_connection_with__s_port__hu__step_2_3__n
push ebx
mov dword [esp + 0x28], ecx
call fcn.0048e8b0
mov eax, dword [esi + 0xc]
xor edi, edi
add esp, 0x10
cmp dword [eax], edi
je 0x499ece
cmp dword [eax + 4], edi
je 0x499ece
cmp dword [eax + 0x30], edi
jne 0x499b2b
mov dword [eax + 0x28], edi
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0x20], 0x1000
mov edx, dword [esi + 0xc]
mov eax, dword [edx + 0x20]
push eax
call dword [0x4d2020]
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0x30], eax
mov eax, dword [esi + 0xc]
add esp, 4
cmp dword [eax + 0x30], edi
jne 0x499b2b
push str.schannel:_unable_to_allocate_memory
push ebx
call fcn.0048e940
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x64
ret
mov ecx, dword [eax + 0x2c]
cmp ecx, edi
jne 0x499b65
mov dword [eax + 0x34], edi
mov edx, dword [esi + 0xc]
mov dword [edx + 0x24], edi
mov eax, dword [esi + 0xc]
mov dword [eax + 0x1c], 0x1000
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx + 0x1c]
push edx
call dword [0x4d2020]
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0x2c], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x2c]
add esp, 4
cmp ecx, edi
je 0x499b10
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x1c]
sub eax, edx
cmp eax, 0x400
jae 0x499bb2
lea edi, [edx + 0x400]
push edi
push ecx
call dword [0x4d2028]
add esp, 8
test eax, eax
jne 0x499ba4
push str.schannel:_unable_to_re_allocate_memory
push ebx
call fcn.0048e940
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x64
ret
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0x2c], eax
mov edx, dword [esi + 0xc]
mov dword [edx + 0x1c], edi
xor edi, edi
cmp dword [esp + 0x18], edi
je 0x499c22
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x24]
lea edx, [esp + 0x10]
push edx
mov edx, dword [eax + 0x1c]
mov eax, dword [eax + 0x2c]
sub edx, ecx
push edx
add eax, ecx
mov ecx, dword [esp + 0x84]
mov edx, dword [ebp + ecx*4 + 0x1a8]
push eax
push edx
call fcn.0048e6c0
add esp, 0x10
cmp eax, 0x51
je 0x499e9b
cmp eax, edi
jne 0x499ec0
mov ecx, dword [esp + 0x10]
cmp ecx, edi
je 0x499ec0
mov eax, dword [esi + 0xc]
add dword [eax + 0x24], ecx
mov eax, dword [esi + 0xc]
mov dword [eax + 0x34], edi
mov ecx, dword [esp + 0x10]
push ecx
push str.schannel:_encrypted_data_got__zd_n
push ebx
call fcn.0048e8b0
add esp, 0xc
mov eax, dword [esi + 0xc]
mov edx, dword [eax + 0x1c]
mov eax, dword [eax + 0x24]
push edx
push eax
push str.schannel:_encrypted_data_buffer:_offset__zu_length__zu_n
push ebx
call fcn.0048e8b0
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx + 0x24]
push edx
call fcn.00491470
mov edi, eax
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x24]
push ecx
call dword [0x4d2020]
push eax
mov ecx, edi
mov edx, 2
lea eax, [esp + 0x54]
call fcn.00497100
push 0
xor ecx, ecx
xor edx, edx
lea eax, [esp + 0x64]
call fcn.00497100
mov edx, 2
lea ecx, [esp + 0x58]
lea eax, [esp + 0x4c]
call fcn.00497110
push 0
xor ecx, ecx
lea eax, [esp + 0x74]
call fcn.00497100
xor ecx, ecx
push 0
lea edx, [ecx + 0x11]
lea eax, [esp + 0x84]
call fcn.00497100
push 0
xor ecx, ecx
xor edx, edx
lea eax, [esp + 0x94]
call fcn.00497100
add esp, 0x2c
mov edx, 3
lea ecx, [esp + 0x50]
lea eax, [esp + 0x20]
call fcn.00497110
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x499b10
mov eax, dword [esi + 0xc]
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x2c]
push edx
push eax
push ecx
call fcn.00450960
mov edx, dword [esp + 0x20]
add esp, 0xc
test edx, edx
je 0x499b1e
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 4]
lea edi, [ecx + 8]
push edi
lea edi, [eax + 0x3c]
push edi
lea edi, [esp + 0x28]
push edi
push 0
push 0
lea edi, [esp + 0x40]
push edi
mov edi, dword [eax + 0x38]
push 0
push 0
push edi
push edx
mov edx, dword [0x4d4cf0]
push ecx
mov ecx, dword [eax]
mov eax, dword [edx + 0x18]
push ecx
call eax
mov ecx, dword [esp + 0x40]
mov edi, eax
push ecx
mov dword [esp + 0x1c], edi
call dword [0x4d2024]
add esp, 4
mov dword [esp + 0x40], 0
cmp edi, 0x80090318
je 0x499edb
cmp edi, 0x90320
je 0x499e5b
cmp edi, 0x90312
je 0x499d70
test edi, edi
jne 0x499f26
xor ebx, ebx
lea edi, [esp + 0x50]
cmp dword [edi + 4], 2
jne 0x499dca
mov eax, dword [edi]
test eax, eax
jbe 0x499dca
mov edx, dword [esp + 0x78]
push eax
push str.schannel:_sending_next_handshake_data:_sending__lu_bytes..._n
push edx
call fcn.0048e8b0
mov ecx, dword [edi]
mov edx, dword [edi + 8]
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x8c]
push ecx
mov ecx, dword [ebp + eax*4 + 0x1a8]
push edx
push ecx
push ebp
call fcn.0048eec0
add esp, 0x20
test eax, eax
mov eax, dword [esp + 0x1c]
jne 0x499f44
cmp dword [edi], eax
jne 0x499f44
mov eax, dword [edi + 8]
test eax, eax
je 0x499ddd
mov edx, dword [0x4d4cf0]
push eax
mov eax, dword [edx + 0x40]
call eax
inc ebx
add edi, 0xc
cmp ebx, 3
jl 0x499d76
cmp dword [esp + 0x48], 5
jne 0x499f6f
mov eax, dword [esp + 0x44]
test eax, eax
jbe 0x499f6f
mov ebx, dword [esp + 0x78]
push eax
push str.schannel:_encrypted_data_length:__lu_n
push ebx
call fcn.0048e8b0
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x24]
mov edx, dword [esp + 0x50]
add esp, 0xc
cmp ecx, edx
jbe 0x499f7d
mov eax, dword [eax + 0x2c]
mov edi, eax
sub edi, edx
push edx
add edi, ecx
push edi
push eax
call fcn.00454000
mov ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x50]
add esp, 0xc
cmp dword [esp + 0x18], 0x90312
mov dword [ecx + 0x24], edx
jne 0x499f98
mov dword [esp + 0x18], 0
jmp 0x499bb0
mov eax, dword [esi + 0xc]
mov ecx, 0x80
test byte [eax + 0x38], cl
je 0x499f04
push edi
push ebp
call fcn.004a7110
push eax
push str.schannel:_next_InitializeSecurityContext_failed:__s
push ebx
call fcn.0048e940
add esp, 0x14
mov eax, edi
sub eax, 0x80090325
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 0xffffffe7
pop ebp
add eax, 0x3c
pop ebx
add esp, 0x64
ret
cmp dword [esi + 8], 3
je 0x499ea8
mov dword [esi + 8], 2
push str.schannel:_failed_to_receive_handshake__need_more_data_n
push ebx
call fcn.0048e8b0
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret
push str.schannel:_failed_to_receive_handshake__SSL_TLS_connection_failed
push ebx
call fcn.0048e940
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x23
pop ebx
add esp, 0x64
ret
mov eax, dword [esi + 0xc]
push str.schannel:_received_incomplete_message__need_more_data_n
mov dword [eax + 0x34], 1
push ebx
mov dword [esi + 8], 2
call fcn.0048e8b0
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret
or dword [eax + 0x38], ecx
push str.schannel:_a_client_certificate_has_been_requested_n
push ebx
mov dword [esi + 8], 3
call fcn.0048e8b0
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret
cmp edi, 0x80090322
jne 0x499e6c
push edi
push ebp
call fcn.004a7110
push eax
push str.schannel:_SNI_or_certificate_check_failed:__s
jmp 0x499e79
lea ecx, [ebx + ebx*2]
mov edx, dword [esp + ecx*4 + 0x50]
push edx
push eax
mov eax, dword [esp + 0x80]
push str.schannel:_failed_to_send_next_handshake_data:_sent__zd_of__lu_bytes
push eax
call fcn.0048e940
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, 0x23
pop ebx
add esp, 0x64
ret
mov ecx, dword [esi + 0xc]
mov ebx, dword [esp + 0x78]
mov dword [ecx + 0x24], 0
cmp dword [esp + 0x18], 0x90312
jne 0x499f98
pop edi
mov dword [esi + 8], 2
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret
cmp dword [esp + 0x18], 0
jne 0x499fb4
push str.schannel:_SSL_TLS_handshake_complete_n
push ebx
mov dword [esi + 8], 4
call fcn.0048e8b0
add esp, 8
mov eax, 2
cmp dword [ebp + 0xec], eax
jne 0x499fe1
xor edx, edx
cmp dword [ebp + 0x1ac], 0xffffffff
setne dl
shl edx, 4
cmp dword [edx + ebp + 0x214], eax
je 0x499fe1
mov eax, dword [ebx + 0x658]
jmp 0x499fe7
mov eax, dword [ebx + 0x654]
test eax, eax
je 0x49a01b
push eax
mov eax, dword [esp + 0x80]
mov ecx, ebp
call fcn.004997c0
mov edi, eax
add esp, 4
test edi, edi
je 0x49a01b
push str.SSL:_public_key_does_not_match_pinned_public_key_
push ebx
call fcn.0048e940
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
cmp dword [ebp + 0x23c], 0
je 0x499eb6
mov eax, dword [esi + 0xc]
cmp dword [eax + 0x50], 0
je 0x499eb6
mov ecx, dword [esp + 0x7c]
push ecx
push ebp
call fcn.004aac10
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret