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

Disassembly:
sub esp, 0x1f0
mov eax, dword [0x5c4680]
xor eax, esp
mov dword [esp + 0x1ec], eax
push ebx
mov ebx, dword [esp + 0x1fc]
push ebp
push esi
mov esi, dword [esp + 0x200]
push edi
push esi
mov dword [esp + 0x48], esi
mov ebp, dword [esi + 8]
mov edi, dword [ebp + 0x1c]
call fcn.004d0520
push ebx
push esi
mov dword [esp + 0x4c], eax
call fcn.004d0500
push 1
push 2
push 0
push 1
push 5
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], 0
call fcn.00511540
add esp, 0x20
test al, al
je 0x502db1
push str.schannel:_Windows_version_is_old_and_may_not_be_able_to_connect_to_some_servers_due_to_lack_of_SNI__algorithms__etc.
push ebx
call fcn.004d7450
add esp, 8
cmp dword [ebp + 0x18], 0
je 0x502deb
push str.wine_get_version
push 0x59039c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x502deb
push 3
push 2
push eax
push 3
push 6
call fcn.00511540
add esp, 0x14
test al, al
je 0x502deb
mov al, 1
jmp 0x502ded
xor al, al
mov byte [edi + 0x47], al
mov eax, dword [esp + 0x40]
cmp dword [eax + 4], 0
jne 0x502e04
cmp dword [eax + 0x24], 0
jne 0x502e04
xor al, al
jmp 0x502e20
push 3
push 2
push 0
push 1
push 6
call fcn.00511540
add esp, 0x14
test al, al
je 0x503155
mov al, 1
mov byte [edi + 0x48], al
mov eax, dword [esp + 0x18]
mov dword [edi], 0
cmp byte [eax + 0x3c], 0
je 0x502e69
push ebx
call fcn.004d0fb0
push 0
lea eax, [esp + 0x18]
push eax
push ebx
push esi
call fcn.004d0b60
add esp, 0x14
test al, al
jne 0x502e5b
mov eax, dword [esp + 0x10]
mov dword [edi], eax
mov eax, dword [esp + 0x10]
inc dword [eax + 0x18]
push ebx
call fcn.004d0fe0
add esp, 4
cmp dword [edi], 0
jne 0x502ea3
push ebx
push esi
call fcn.00501b10
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x503168
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x502e89
mov eax, dword [ebp + 8]
push eax
call fcn.004d3490
mov ecx, dword [edi]
add esp, 4
mov dword [ecx + 0x10], eax
mov eax, dword [edi]
cmp dword [eax + 0x10], 0
je 0x5030d7
cmp byte [ebp + 0x14], 0
je 0x502eb7
push str.schannel:_using_IP_address__SNI_is_not_supported_by_OS.
push ebx
call fcn.004d7450
add esp, 8
cmp byte [edi + 0x47], 0
je 0x502f82
mov dword [esp + 0x80], 2
lea eax, [esp + 0x54]
push dword [ebp + 0x18]
push eax
call fcn.004cfab0
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x502ef9
push str.Error_setting_ALPN
push ebx
call fcn.004d7380
mov eax, 0x23
jmp 0x503165
mov esi, dword [esp + 0x78]
lea eax, [esp + 0x54]
push esi
push eax
lea eax, [esp + 0x8e]
push eax
call fcn.00533470
add esi, 0xa
lea eax, [esi - 0xa]
push eax
call fcn.004d1700
mov word [esp + 0x94], ax
movzx eax, ax
add eax, 6
mov dword [esp + 0x2c], esi
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x8c]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x64]
mov dword [esp + 0x30], 0x12
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 1
push dword [ebp + 0x18]
push eax
call fcn.004cfb50
lea eax, [esp + 0x6c]
push eax
push str.ALPN:_curl_offers__s
push ebx
call fcn.004d7450
add esp, 0x24
jmp 0x502fb2
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], 1
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 1
mov dword [edi + 0x38], 0x811c
cmp byte [eax + 0x67], 0
jne 0x502ffa
mov dword [edi + 0x38], 0x819c
push 0x10
push 1
call dword [0x5c41f0]
mov edx, eax
add esp, 8
mov dword [edi + 4], edx
test edx, edx
jne 0x503025
push str.schannel:_unable_to_allocate_memory
push ebx
call fcn.004d7380
mov eax, 0x1b
jmp 0x503165
mov ecx, dword [edi]
lea eax, [edx + 8]
push eax
lea eax, [edi + 0x3c]
push eax
lea eax, [esp + 0x50]
push eax
push edx
xor edx, edx
lea eax, [esp + 0x44]
cmp byte [edi + 0x47], dl
push 0
cmove eax, edx
push eax
mov eax, dword [0x5cc010]
push edx
push edx
push dword [edi + 0x38]
mov eax, dword [eax + 0x18]
push dword [ecx + 0x10]
push edx
push ecx
call eax
mov esi, eax
cmp esi, 0x90312
je 0x5030e1
push dword [edi + 4]
call dword [0x5c41e4]
add esp, 4
mov dword [edi + 4], 0
lea eax, [esp + 0xfc]
push 0x100
push eax
push esi
call fcn.004d3830
push eax
cmp esi, 0x80090300
je 0x5030c9
cmp esi, 0x80090322
je 0x5030b1
push str.schannel:_initial_InitializeSecurityContext_failed:__s
push ebx
call fcn.004d7380
add esp, 0x18
mov eax, 0x23
jmp 0x503168
push str.schannel:_SNI_or_certificate_check_failed:__s
push ebx
call fcn.004d7380
add esp, 0x18
mov eax, 0x3c
jmp 0x503168
push str.schannel:_initial_InitializeSecurityContext_failed:__s
push ebx
call fcn.004d7380
add esp, 0x18
mov eax, 0x1b
jmp 0x503168
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x2c]
mov eax, dword [esp + 0x4c]
push dword [esp + 0x38]
push ebx
push dword [eax + 4]
call fcn.004fd600
mov ecx, dword [0x5cc010]
add esp, 0x14
mov esi, eax
push dword [esp + 0x30]
mov ecx, dword [ecx + 0x40]
call ecx
cmp dword [esp + 0x14], 0
mov eax, dword [esp + 0x28]
jne 0x50313e
cmp eax, esi
jne 0x50313e
mov dword [edi + 0x40], 0
xor eax, eax
mov word [edi + 0x44], 0
mov byte [edi + 0x46], 0
mov byte [edi + 0x34], 0
mov dword [ebp + 4], 1
jmp 0x503168
push eax
push esi
push str.schannel:_failed_to_send_initial_handshake_data:_sent__zd_of__lu_bytes
push ebx
call fcn.004d7380
add esp, 0x10
mov eax, 0x23
jmp 0x503168
push str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
push ebx
call fcn.004d7380
mov eax, 0x4d
add esp, 8
mov ecx, dword [esp + 0x1fc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005313f0
add esp, 0x1f0
ret