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

Disassembly:
sub esp, 0x270
mov eax, dword [0x580400]
xor eax, esp
mov dword [esp + 0x26c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x280]
push esi
mov esi, dword [esp + 0x280]
push edi
push esi
mov dword [esp + 0x1c], esi
mov edi, dword [esi + 8]
mov dword [esp + 0x14], edi
mov ebx, dword [edi + 0x1c]
call fcn.004eb980
add esp, 4
mov dword [esp + 0x24], eax
cmp dword [ebx], 0
mov eax, dword [edi + 4]
mov dword [esp + 0x14], eax
je 0x509326
cmp dword [ebx + 4], 0
je 0x509326
cmp dword [ebx + 0x30], 0
jne 0x509068
push 0x1000
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x20], 0x1000
call dword [section..data]
add esp, 4
mov dword [ebx + 0x30], eax
test eax, eax
je 0x5095e7
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
jne 0x509097
push 0x1000
mov byte [ebx + 0x34], cl
mov dword [ebx + 0x24], ecx
mov dword [ebx + 0x1c], 0x1000
call dword [section..data]
mov ecx, eax
add esp, 4
mov dword [ebx + 0x2c], ecx
test ecx, ecx
je 0x5095e7
mov eax, dword [ebx + 0x1c]
mov edi, dword [ebx + 0x24]
sub eax, edi
cmp eax, 0x400
jae 0x5090e0
add edi, 0x400
push edi
push ecx
call dword [0x580008]
add esp, 8
test eax, eax
jne 0x5090d3
push str.schannel:_unable_to_re_allocate_memory
push ebp
call fcn.004f2c40
add esp, 8
mov eax, 0x1b
jmp 0x50932b
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x1c], edi
nop dword [eax]
cmp dword [esp + 0x14], 3
je 0x509130
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebx + 0x1c]
sub eax, dword [ebx + 0x24]
push eax
mov eax, dword [ebx + 0x2c]
add eax, dword [ebx + 0x24]
push eax
push ebp
push dword [esi + 4]
call fcn.004f2280
mov ecx, dword [esp + 0x30]
add esp, 0x14
cmp ecx, 0x51
je 0x509344
test ecx, ecx
jne 0x509318
test eax, eax
je 0x509318
add dword [ebx + 0x24], eax
mov byte [ebx + 0x34], cl
nop dword [eax]
push dword [ebx + 0x24]
call fcn.004e05a0
push dword [ebx + 0x24]
mov esi, eax
call dword [section..data]
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], esi
mov dword [esp + 0x5c], ecx
add esp, 8
mov dword [esp + 0x2c], 2
lea ecx, [esp + 0x58]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 2
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 2
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0x11
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], 3
test eax, eax
je 0x5095e7
push dword [ebx + 0x24]
push dword [ebx + 0x2c]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [ebx + 4]
add esp, 0xc
mov ecx, dword [ebx]
lea eax, [edx + 8]
push eax
lea eax, [ebx + 0x3c]
push eax
lea eax, [esp + 0x48]
push eax
push 0
push 0
lea eax, [esp + 0x60]
push eax
mov eax, dword [0x581004]
push 0
push 0
push dword [ebx + 0x38]
mov eax, dword [eax + 0x18]
push dword [ecx + 0x10]
push edx
push ecx
call eax
push dword [esp + 0x30]
mov esi, eax
mov dword [esp + 0x18], esi
call dword [0x580004]
add esp, 4
mov dword [esp + 0x30], 0
cmp esi, 0x80090318
je 0x5095d1
cmp esi, 0x90320
je 0x509525
cmp esi, 0x90312
je 0x509271
test esi, esi
jne 0x509530
xor edi, edi
lea esi, [esp + 0x58]
cmp dword [esi + 4], 2
jne 0x5092b1
mov eax, dword [esi]
test eax, eax
je 0x5092b1
lea ecx, [esp + 0x1c]
push ecx
push eax
push dword [esi + 8]
mov eax, dword [esp + 0x24]
push ebp
push dword [eax + 4]
call fcn.004f22b0
add esp, 0x14
mov ecx, eax
cmp dword [esp + 0x1c], 0
jne 0x509359
cmp dword [esi], ecx
jne 0x509359
mov eax, dword [esi + 8]
test eax, eax
je 0x5092c3
push eax
mov eax, dword [0x581004]
mov eax, dword [eax + 0x40]
call eax
inc edi
add esi, 0xc
cmp edi, 3
jl 0x509277
cmp dword [esp + 0x38], 5
jne 0x509371
mov edx, dword [esp + 0x34]
test edx, edx
je 0x509371
mov ecx, dword [ebx + 0x24]
cmp ecx, edx
jbe 0x509378
mov eax, dword [ebx + 0x2c]
sub ecx, edx
push edx
add ecx, eax
push ecx
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [esp + 0x40]
add esp, 0xc
mov dword [ebx + 0x24], eax
mov eax, dword [esp + 0x14]
cmp eax, 0x90312
je 0x509130
jmp 0x509387
push str.schannel:_failed_to_receive_handshake__SSL_TLS_connection_failed
push ebp
call fcn.004f2c40
add esp, 8
mov eax, 0x23
mov ecx, dword [esp + 0x27c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005335a0
add esp, 0x270
ret
mov eax, dword [esp + 0x10]
cmp dword [eax + 4], 3
je 0x509355
mov dword [eax + 4], 2
xor eax, eax
jmp 0x50932b
lea eax, [edi + edi*2]
push dword [esp + eax*4 + 0x58]
push ecx
push str.schannel:_failed_to_send_next_handshake_data:_sent__zd_of__lu_bytes
push ebp
call fcn.004f2c40
add esp, 0x10
jmp 0x509326
mov dword [ebx + 0x24], 0
mov eax, dword [esp + 0x14]
cmp eax, 0x90312
je 0x5095d5
test eax, eax
jne 0x509396
mov eax, dword [esp + 0x10]
mov dword [eax + 4], 4
mov esi, dword [esp + 0x18]
push esi
call fcn.004eb9a0
add esp, 4
test al, al
je 0x5093af
mov eax, dword [ebp + 0x550]
jmp 0x5093b5
mov eax, dword [ebp + 0x54c]
mov dword [esp + 0x14], eax
test eax, eax
je 0x5094e9
mov eax, dword [esi + 8]
lea ecx, [esp + 0x10]
push ecx
push 0x53
mov edi, 0x5a
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x18], 0
push dword [eax + 4]
mov eax, dword [0x581004]
mov eax, dword [eax + 0x2c]
call eax
test eax, eax
jne 0x509499
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x509499
test byte [ecx], 1
je 0x5094bf
mov eax, dword [ecx + 8]
mov dword [esp + 0x20], eax
test eax, eax
je 0x5094bf
mov esi, dword [ecx + 4]
lea eax, [esp + 0x7c]
push 0xf0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x2c]
add eax, esi
push eax
lea eax, [esp + 0x8c]
push esi
push eax
call fcn.0052dad0
add esp, 0x18
test eax, eax
jne 0x50947f
mov eax, dword [esp + 0x10c]
test eax, eax
je 0x509485
mov ecx, dword [esp + 0x114]
cmp ecx, eax
jbe 0x509485
sub ecx, eax
push ecx
push eax
push dword [esp + 0x1c]
push ebp
call fcn.004eb240
mov edi, eax
add esp, 0x10
test edi, edi
je 0x50947f
push str.SSL:_public_key_does_not_match_pinned_public_key
push ebp
call fcn.004f2c40
add esp, 8
mov esi, dword [esp + 0x18]
jmp 0x5094bb
push str.SSL:_failed_retrieving_public_key_from_server_certificate
push ebp
call fcn.004f2c40
mov esi, dword [esp + 0x20]
add esp, 8
jmp 0x5094bb
push 0x100
lea ecx, [esp + 0x180]
push ecx
push eax
call fcn.004dc3e0
push eax
push str.schannel:_Failed_to_read_remote_certificate_context:__s
push ebp
call fcn.004f2c40
add esp, 0x18
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x5094ca
push ecx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov dword [esp + 0x1c], edi
test edi, edi
je 0x5094e9
push str.SSL:_public_key_does_not_match_pinned_public_key
push ebp
call fcn.004f2c40
mov eax, dword [esp + 0x24]
add esp, 8
jmp 0x50932b
mov eax, dword [esp + 0x24]
cmp byte [eax + 0x39], 0
je 0x50950c
cmp byte [ebx + 0x48], 0
je 0x509355
push ebp
push esi
call fcn.0052b600
add esp, 8
jmp 0x50932b
cmp byte [eax + 0x3a], 0
je 0x509355
push ebp
push esi
call fcn.0052b9d0
add esp, 8
jmp 0x50932b
mov eax, dword [ebx + 0x38]
test al, al
jns 0x5095b7
push 0x100
lea eax, [esp + 0x80]
push eax
push esi
call fcn.004dc3e0
push eax
cmp esi, 0x80090300
je 0x50959f
cmp esi, 0x80090322
je 0x509587
cmp esi, 0x80090325
je 0x50956f
push str.schannel:_next_InitializeSecurityContext_failed:__s
push ebp
call fcn.004f2c40
add esp, 0x18
jmp 0x509326
push str.schannel:__s
push ebp
call fcn.004f2c40
add esp, 0x18
mov eax, 0x3c
jmp 0x50932b
push str.schannel:_SNI_or_certificate_check_failed:__s
push ebp
call fcn.004f2c40
add esp, 0x18
mov eax, 0x3c
jmp 0x50932b
push str.schannel:_next_InitializeSecurityContext_failed:__s
push ebp
call fcn.004f2c40
add esp, 0x18
mov eax, 0x1b
jmp 0x50932b
or eax, 0x80
mov dword [ebx + 0x38], eax
mov eax, dword [esp + 0x10]
mov dword [eax + 4], 3
xor eax, eax
jmp 0x50932b
mov byte [ebx + 0x34], 1
mov eax, dword [esp + 0x10]
mov dword [eax + 4], 2
xor eax, eax
jmp 0x50932b
push str.schannel:_unable_to_allocate_memory
push ebp
call fcn.004f2c40
add esp, 8
mov eax, 0x1b
jmp 0x50932b