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

Disassembly:
sub esp, 0x16c
mov eax, dword [0x600088]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push ebp
mov ebp, dword [esp + 0x178]
mov ecx, 0x220
push esi
mov esi, dword [esp + 0x180]
mov ebx, esi
shl ebx, 4
push edi
mov edi, dword [ebp]
add ebx, ebp
cmp dword [ebp + 0xec], 2
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x10], edi
jne 0x516d33
cmp dword [ebp + 0x1ac], 0xffffffff
mov eax, 0x210
cmovne eax, ecx
cmp dword [eax + ebp], 2
je 0x516d33
mov eax, dword [ebp + 0xe0]
jmp 0x516d39
mov eax, dword [ebp + 0x9c]
push dword [ebp + 0xfc]
cmp dword [ebx + 0x1f4], 3
push eax
push str.schannel:_SSL_TLS_connection_with__s_port__hu__step_2_3__n
push edi
mov dword [esp + 0x28], eax
setne byte [esp + 0x27]
call fcn.00504920
mov ecx, dword [ebx + 0x1f8]
add esp, 0x10
cmp dword [ecx], 0
je 0x517163
cmp dword [ecx + 4], 0
je 0x517163
cmp dword [ecx + 0x30], 0
jne 0x516dbc
mov dword [ecx + 0x28], 0
mov eax, dword [ebx + 0x1f8]
mov dword [eax + 0x20], 0x1000
mov eax, dword [ebx + 0x1f8]
push dword [eax + 0x20]
call dword [0x600ab0]
mov ecx, dword [ebx + 0x1f8]
add esp, 4
mov dword [ecx + 0x30], eax
mov ecx, dword [ebx + 0x1f8]
cmp dword [ecx + 0x30], 0
je 0x517436
cmp dword [ecx + 0x2c], 0
jne 0x516e0b
mov byte [ecx + 0x34], 0
mov eax, dword [ebx + 0x1f8]
mov dword [eax + 0x24], 0
mov eax, dword [ebx + 0x1f8]
mov dword [eax + 0x1c], 0x1000
mov eax, dword [ebx + 0x1f8]
push dword [eax + 0x1c]
call dword [0x600ab0]
mov ecx, dword [ebx + 0x1f8]
add esp, 4
mov dword [ecx + 0x2c], eax
mov ecx, dword [ebx + 0x1f8]
cmp dword [ecx + 0x2c], 0
je 0x517436
mov eax, dword [ecx + 0x1c]
mov edx, dword [ecx + 0x24]
sub eax, edx
cmp eax, 0x400
jae 0x516e61
lea esi, [edx + 0x400]
push esi
push dword [ecx + 0x2c]
call dword [0x600ab8]
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x516e4b
push str.schannel:_unable_to_re_allocate_memory
push edi
call fcn.00504840
add esp, 8
mov eax, 0x1b
jmp 0x517168
mov eax, dword [ebx + 0x1f8]
mov dword [eax + 0x2c], ecx
mov eax, dword [ebx + 0x1f8]
mov dword [eax + 0x1c], esi
mov esi, dword [esp + 0x20]
mov al, byte [esp + 0x17]
test al, al
je 0x516ed3
mov ecx, dword [ebx + 0x1f8]
lea eax, [esp + 0x24]
push eax
mov eax, dword [ecx + 0x1c]
sub eax, dword [ecx + 0x24]
push eax
mov eax, dword [ecx + 0x2c]
add eax, dword [ecx + 0x24]
push eax
push dword [ebp + esi*4 + 0x1a8]
call fcn.00504ad0
add esp, 0x10
cmp eax, 0x51
je 0x517181
test eax, eax
jne 0x517155
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x517155
mov eax, dword [ebx + 0x1f8]
add dword [eax + 0x24], ecx
mov eax, dword [ebx + 0x1f8]
mov byte [eax + 0x34], 0
push dword [esp + 0x24]
push str.schannel:_encrypted_data_got__zd_n
push edi
call fcn.00504920
add esp, 0xc
mov eax, dword [ebx + 0x1f8]
push dword [eax + 0x1c]
push dword [eax + 0x24]
push str.schannel:_encrypted_data_buffer:_offset__zu_length__zu_n
push edi
call fcn.00504920
mov eax, dword [ebx + 0x1f8]
push dword [eax + 0x24]
call fcn.00506d10
mov ecx, dword [ebx + 0x1f8]
mov esi, eax
push dword [ecx + 0x24]
call dword [0x600ab0]
mov ecx, eax
mov dword [esp + 0x48], esi
lea eax, [esp + 0x48]
mov dword [esp + 0x4c], 2
mov dword [esp + 0x78], eax
add esp, 0x18
mov dword [esp + 0x38], ecx
lea eax, [esp + 0x154]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 2
mov dword [esp + 0x154], 0
mov dword [esp + 0x158], 2
mov dword [esp + 0x15c], 0
mov dword [esp + 0x160], 0
mov dword [esp + 0x164], 0x11
mov dword [esp + 0x168], 0
mov dword [esp + 0x16c], 0
mov dword [esp + 0x170], 0
mov dword [esp + 0x174], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], 3
test ecx, ecx
je 0x517436
mov eax, dword [ebx + 0x1f8]
push dword [eax + 0x24]
push dword [eax + 0x2c]
push ecx
call fcn.004c2cb0
mov esi, dword [esp + 0x24]
add esp, 0xc
test esi, esi
je 0x516e41
mov edx, dword [ebx + 0x1f8]
mov ecx, dword [edx + 4]
lea eax, [ecx + 8]
push eax
lea eax, [edx + 0x3c]
push eax
lea eax, [esp + 0x54]
push eax
push 0
push 0
lea eax, [esp + 0x6c]
push eax
mov eax, dword [0x60d088]
push 0
push 0
push dword [edx + 0x38]
mov eax, dword [eax + 0x18]
push esi
push ecx
push dword [edx]
call eax
push dword [esp + 0x38]
mov esi, eax
mov dword [esp + 0x20], esi
call dword [0x600ab4]
add esp, 4
mov dword [esp + 0x38], 0
cmp esi, 0x80090318
je 0x51740d
cmp esi, 0x90320
je 0x51739c
cmp esi, 0x90312
je 0x51706c
test esi, esi
jne 0x5173a9
xor edi, edi
lea esi, [esp + 0x154]
cmp dword [esi + 4], 2
jne 0x5170c2
mov eax, dword [esi]
test eax, eax
je 0x5170c2
push eax
push str.schannel:_sending_next_handshake_data:_sending__lu_bytes..._n
push dword [esp + 0x18]
call fcn.00504920
lea eax, [esp + 0x34]
push eax
push dword [esi]
mov eax, dword [esp + 0x34]
push dword [esi + 8]
push dword [ebp + eax*4 + 0x1a8]
push ebp
call fcn.00504f00
mov ecx, dword [esp + 0x48]
add esp, 0x20
test eax, eax
jne 0x5171a6
cmp dword [esi], ecx
jne 0x5171a6
mov eax, dword [esi + 8]
test eax, eax
je 0x5170d4
push eax
mov eax, dword [0x60d088]
mov eax, dword [eax + 0x40]
call eax
inc edi
add esi, 0xc
cmp edi, 3
jl 0x517075
cmp dword [esp + 0x40], 5
jne 0x5171c4
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x5171c4
mov edi, dword [esp + 0x10]
push eax
push str.schannel:_encrypted_data_length:__lu_n
push edi
call fcn.00504920
mov eax, dword [ebx + 0x1f8]
add esp, 0xc
mov edx, dword [esp + 0x3c]
mov ecx, dword [eax + 0x24]
cmp ecx, edx
jbe 0x5171d5
mov eax, dword [eax + 0x2c]
sub ecx, edx
push edx
add ecx, eax
push ecx
push eax
call fcn.004c3230
mov ecx, dword [ebx + 0x1f8]
add esp, 0xc
mov eax, dword [esp + 0x3c]
mov dword [ecx + 0x24], eax
mov eax, dword [esp + 0x1c]
cmp eax, 0x90312
jne 0x5171f1
mov esi, dword [esp + 0x20]
xor al, al
jmp 0x516e65
push str.schannel:_failed_to_receive_handshake__SSL_TLS_connection_failed
push edi
call fcn.00504840
add esp, 8
mov eax, 0x23
mov ecx, dword [esp + 0x178]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ac0cf
add esp, 0x16c
ret
cmp dword [ebx + 0x1f4], 3
je 0x517194
mov dword [ebx + 0x1f4], 2
push str.schannel:_failed_to_receive_handshake__need_more_data_n
push edi
call fcn.00504920
add esp, 8
xor eax, eax
jmp 0x517168
lea eax, [edi + edi*2]
push dword [esp + eax*4 + 0x154]
push ecx
push str.schannel:_failed_to_send_next_handshake_data:_sent__zd_of__lu_bytes
push dword [esp + 0x1c]
call fcn.00504840
add esp, 0x10
jmp 0x517163
mov eax, dword [ebx + 0x1f8]
mov edi, dword [esp + 0x10]
mov dword [eax + 0x24], 0
mov eax, dword [esp + 0x1c]
cmp eax, 0x90312
jne 0x5171f1
mov dword [ebx + 0x1f4], 2
xor eax, eax
jmp 0x517168
test eax, eax
jne 0x51720d
push str.schannel:_SSL_TLS_handshake_complete_n
push edi
mov dword [ebx + 0x1f4], 4
call fcn.00504920
add esp, 8
cmp dword [ebp + 0xec], 2
jne 0x517238
cmp dword [ebp + 0x1ac], 0xffffffff
mov eax, 0x210
mov ecx, 0x220
cmovne eax, ecx
cmp dword [eax + ebp], 2
je 0x517238
mov eax, dword [edi + 0x5bc]
jmp 0x51723e
mov eax, dword [edi + 0x5b8]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x51736d
mov esi, dword [ebp]
lea eax, [esp + 0x10]
push eax
mov eax, dword [ebx + 0x1f8]
mov dword [esp + 0x14], 0
push 0x53
mov dword [esp + 0x20], esi
push dword [eax + 4]
mov eax, dword [0x60d088]
mov dword [esp + 0x38], 0x5a
mov eax, dword [eax + 0x2c]
call eax
test eax, eax
jne 0x51732b
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x51732b
test byte [ecx], 1
je 0x517345
mov eax, dword [ecx + 8]
mov dword [esp + 0x48], eax
test eax, eax
je 0x517345
mov esi, dword [ecx + 4]
lea eax, [esp + 0x64]
push 0xf0
push 0
push eax
call fcn.004c3e40
mov eax, dword [esp + 0x54]
add eax, esi
push eax
lea eax, [esp + 0x74]
push esi
push eax
call fcn.0052d200
add esp, 0x18
test eax, eax
jne 0x517341
mov eax, dword [esp + 0xf4]
test eax, eax
je 0x517317
mov ecx, dword [esp + 0xfc]
cmp ecx, eax
jbe 0x517317
mov esi, dword [esp + 0x18]
sub ecx, eax
push ecx
push eax
push dword [esp + 0x24]
push esi
call fcn.004fce40
add esp, 0x10
mov dword [esp + 0x2c], eax
test eax, eax
je 0x517341
push str.SSL:_public_key_does_not_match_pinned_public_key_
push esi
call fcn.00504840
add esp, 8
jmp 0x517341
mov esi, dword [esp + 0x18]
push str.SSL:_failed_retrieving_public_key_from_server_certificate
push esi
call fcn.00504840
add esp, 8
jmp 0x517341
push eax
push ebp
call fcn.005289b0
push eax
push str.schannel:_Failed_to_read_remote_certificate_context:__s
push esi
call fcn.00504840
add esp, 0x14
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x517350
push ecx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x51736d
push str.SSL:_public_key_does_not_match_pinned_public_key_
push edi
call fcn.00504840
add esp, 8
mov eax, esi
jmp 0x517168
cmp byte [ebp + 0x238], 0
je 0x5171a2
mov eax, dword [ebx + 0x1f8]
cmp byte [eax + 0x47], 0
je 0x5171a2
push dword [esp + 0x20]
push ebp
call fcn.0052bbb0
add esp, 8
jmp 0x517168
mov ecx, dword [ebx + 0x1f8]
mov eax, dword [ecx + 0x38]
test al, al
jns 0x5173e6
push esi
push ebp
call fcn.005289b0
mov edx, str.schannel:_next_InitializeSecurityContext_failed:__s
cmp esi, 0x80090322
mov ecx, str.schannel:_SNI_or_certificate_check_failed:__s
push eax
cmovne ecx, edx
push ecx
push edi
call fcn.00504840
add esp, 0x14
mov eax, 0x23
cmp esi, 0x80090325
mov ecx, 0x3c
cmove eax, ecx
jmp 0x517168
or eax, 0x80
push str.schannel:_a_client_certificate_has_been_requested_n
mov dword [ecx + 0x38], eax
push edi
mov dword [ebx + 0x1f4], 3
call fcn.00504920
add esp, 8
xor eax, eax
jmp 0x517168
mov eax, dword [ebx + 0x1f8]
push str.schannel:_received_incomplete_message__need_more_data_n
push edi
mov byte [eax + 0x34], 1
mov dword [ebx + 0x1f4], 2
call fcn.00504920
add esp, 8
xor eax, eax
jmp 0x517168
push str.schannel:_unable_to_allocate_memory
push edi
call fcn.00504840
add esp, 8
mov eax, 0x1b
jmp 0x517168