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

Disassembly:
sub esp, 0x274
mov eax, dword [0x50b140]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push ebp
mov ebp, dword [esp + 0x280]
mov ecx, 0x498
push esi
mov esi, dword [esp + 0x288]
mov ebx, esi
shl ebx, 4
mov eax, dword [ebp]
add ebx, ebp
cmp dword [ebp + 0x358], 2
push edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x10], eax
jne 0x4ae6e3
cmp dword [ebp + 0x424], 0xffffffff
mov eax, 0x488
cmovne eax, ecx
cmp dword [eax + ebp], 2
je 0x4ae6e3
mov eax, dword [ebp + 0x34c]
jmp 0x4ae6e9
mov eax, dword [ebp + 0x304]
mov ecx, dword [ebx + 0x470]
mov edi, dword [ebx + 0x46c]
mov dword [esp + 0x14], eax
cmp dword [ecx], 0
je 0x4aea95
cmp dword [ecx + 4], 0
je 0x4aea95
cmp dword [ecx + 0x30], 0
jne 0x4ae751
mov dword [ecx + 0x28], 0
mov eax, dword [ebx + 0x470]
mov dword [eax + 0x20], 0x1000
mov eax, dword [ebx + 0x470]
push dword [eax + 0x20]
call dword [0x50b0dc]
mov ecx, dword [ebx + 0x470]
add esp, 4
mov dword [ecx + 0x30], eax
mov ecx, dword [ebx + 0x470]
cmp dword [ecx + 0x30], 0
je 0x4aed92
cmp dword [ecx + 0x2c], 0
jne 0x4ae7a0
mov byte [ecx + 0x34], 0
mov eax, dword [ebx + 0x470]
mov dword [eax + 0x24], 0
mov eax, dword [ebx + 0x470]
mov dword [eax + 0x1c], 0x1000
mov eax, dword [ebx + 0x470]
push dword [eax + 0x1c]
call dword [0x50b0dc]
mov ecx, dword [ebx + 0x470]
add esp, 4
mov dword [ecx + 0x2c], eax
mov ecx, dword [ebx + 0x470]
cmp dword [ecx + 0x2c], 0
je 0x4aed92
mov eax, dword [ecx + 0x1c]
mov edx, dword [ecx + 0x24]
sub eax, edx
cmp eax, 0x400
jae 0x4ae800
lea esi, [edx + 0x400]
push esi
push dword [ecx + 0x2c]
call dword [0x50b0e4]
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x4ae7e4
mov eax, dword [esp + 0x10]
push str.schannel:_unable_to_re_allocate_memory
push eax
call fcn.00499ce0
add esp, 8
mov eax, 0x1b
jmp 0x4aea9a
mov eax, dword [ebx + 0x470]
mov dword [eax + 0x2c], ecx
mov eax, dword [ebx + 0x470]
mov dword [eax + 0x1c], esi
mov esi, dword [esp + 0x1c]
nop word [eax + eax]
cmp edi, 3
je 0x4ae860
mov ecx, dword [ebx + 0x470]
lea eax, [esp + 0x20]
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 + 0x420]
call fcn.00499f10
add esp, 0x10
cmp eax, 0x51
je 0x4aeab3
test eax, eax
jne 0x4aea83
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x4aea83
mov eax, dword [ebx + 0x470]
add dword [eax + 0x24], ecx
mov eax, dword [ebx + 0x470]
mov byte [eax + 0x34], 0
nop dword [eax]
mov eax, dword [ebx + 0x470]
push dword [eax + 0x24]
call fcn.0049c510
mov ecx, dword [ebx + 0x470]
mov esi, eax
push dword [ecx + 0x24]
call dword [0x50b0dc]
mov ecx, eax
mov dword [esp + 0x34], esi
lea eax, [esp + 0x34]
mov dword [esp + 0x38], 2
mov dword [esp + 0x60], eax
add esp, 8
mov dword [esp + 0x34], ecx
lea eax, [esp + 0x5c]
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 2
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 2
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0x11
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], 3
test ecx, ecx
je 0x4aed92
mov eax, dword [ebx + 0x470]
push dword [eax + 0x24]
push dword [eax + 0x2c]
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [esp + 0x20]
add esp, 0xc
test esi, esi
je 0x4ae7da
mov edx, dword [ebx + 0x470]
mov ecx, dword [edx + 4]
lea eax, [ecx + 8]
push eax
lea eax, [edx + 0x3c]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
push 0
lea eax, [esp + 0x64]
push eax
mov eax, dword [0x54ab08]
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 + 0x34]
mov esi, eax
mov dword [esp + 0x1c], esi
call dword [0x50b0e0]
add esp, 4
mov dword [esp + 0x34], 0
cmp esi, 0x80090318
je 0x4aed77
cmp esi, 0x90320
je 0x4aed27
cmp esi, 0x90312
je 0x4ae9c4
test esi, esi
jne 0x4aeaca
xor edi, edi
lea esi, [esp + 0x5c]
nop word [eax + eax]
cmp dword [esi + 4], 2
jne 0x4aea0d
mov eax, dword [esi]
test eax, eax
je 0x4aea0d
lea ecx, [esp + 0x24]
push ecx
push eax
mov eax, dword [esp + 0x24]
push dword [esi + 8]
push dword [ebp + eax*4 + 0x420]
push ebp
call fcn.0049a3e0
mov ecx, dword [esp + 0x38]
add esp, 0x14
test eax, eax
jne 0x4aeb3b
cmp dword [esi], ecx
jne 0x4aeb3b
mov eax, dword [esi + 8]
test eax, eax
je 0x4aea1f
push eax
mov eax, dword [0x54ab08]
mov eax, dword [eax + 0x40]
call eax
inc edi
add esi, 0xc
cmp edi, 3
jl 0x4ae9d0
cmp dword [esp + 0x3c], 5
jne 0x4aeb5a
mov edx, dword [esp + 0x38]
test edx, edx
je 0x4aeb5a
mov eax, dword [ebx + 0x470]
mov ecx, dword [eax + 0x24]
cmp ecx, edx
jbe 0x4aeb67
mov eax, dword [eax + 0x2c]
sub ecx, edx
push edx
add ecx, eax
push ecx
push eax
call sub.VCRUNTIME140.dll_memmove
mov ecx, dword [ebx + 0x470]
add esp, 0xc
mov eax, dword [esp + 0x38]
mov dword [ecx + 0x24], eax
mov eax, dword [esp + 0x18]
cmp eax, 0x90312
je 0x4ae860
jmp 0x4aeb76
mov eax, dword [esp + 0x10]
push str.schannel:_failed_to_receive_handshake__SSL_TLS_connection_failed
push eax
call fcn.00499ce0
add esp, 8
mov eax, 0x23
mov ecx, dword [esp + 0x280]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004cfc1f
add esp, 0x274
ret
cmp dword [ebx + 0x46c], 3
je 0x4aeac6
mov dword [ebx + 0x46c], 2
xor eax, eax
jmp 0x4aea9a
cmp esi, 0x80090300
je 0x4aeb0b
cmp esi, 0x80090322
jne 0x4aed34
push 0x100
lea eax, [esp + 0x84]
push eax
push esi
call fcn.00487000
push eax
mov eax, dword [esp + 0x20]
push str.schannel:_SNI_or_certificate_check_failed:__s
push eax
call fcn.00499ce0
add esp, 0x18
mov eax, 0x3c
jmp 0x4aea9a
push 0x100
lea eax, [esp + 0x84]
push eax
push esi
call fcn.00487000
push eax
mov eax, dword [esp + 0x20]
push str.schannel:_next_InitializeSecurityContext_failed:__s
push eax
call fcn.00499ce0
add esp, 0x18
mov eax, 0x1b
jmp 0x4aea9a
lea eax, [edi + edi*2]
push dword [esp + eax*4 + 0x5c]
mov eax, dword [esp + 0x14]
push ecx
push str.schannel:_failed_to_send_next_handshake_data:_sent__zd_of__lu_bytes
push eax
call fcn.00499ce0
add esp, 0x10
jmp 0x4aea95
mov eax, dword [ebx + 0x470]
mov dword [eax + 0x24], 0
mov eax, dword [esp + 0x18]
cmp eax, 0x90312
je 0x4aeabc
test eax, eax
jne 0x4aeb84
mov dword [ebx + 0x46c], 4
cmp dword [ebp + 0x358], 2
jne 0x4aebb3
cmp dword [ebp + 0x424], 0xffffffff
mov eax, 0x488
mov ecx, 0x498
cmovne eax, ecx
cmp dword [eax + ebp], 2
je 0x4aebb3
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x9d0]
jmp 0x4aebbd
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x9cc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4aecf8
mov edi, dword [ebp]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x20]
mov esi, 0x5a
add eax, 0x47
mov dword [esp + 0x18], 0
add eax, eax
push 0x53
mov eax, dword [ebp + eax*8]
push dword [eax + 4]
mov eax, dword [0x54ab08]
mov eax, dword [eax + 0x2c]
call eax
test eax, eax
jne 0x4aecab
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4aecab
test byte [ecx], 1
je 0x4aecd1
mov eax, dword [ecx + 8]
mov dword [esp + 0x28], eax
test eax, eax
je 0x4aecd1
mov esi, dword [ecx + 4]
lea eax, [esp + 0x80]
push 0xf0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x34]
add eax, esi
push eax
lea eax, [esp + 0x90]
push esi
push eax
call fcn.004c9680
add esp, 0x18
test eax, eax
jne 0x4aeca4
mov eax, dword [esp + 0x110]
test eax, eax
je 0x4aec96
mov ecx, dword [esp + 0x118]
cmp ecx, eax
jbe 0x4aec96
sub ecx, eax
push ecx
push eax
push dword [esp + 0x20]
push edi
call fcn.00493990
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4aeccd
push str.SSL:_public_key_does_not_match_pinned_public_key_
push edi
call fcn.00499ce0
add esp, 8
jmp 0x4aeccd
push str.SSL:_failed_retrieving_public_key_from_server_certificate
push edi
call fcn.00499ce0
add esp, 8
mov esi, 0x5a
jmp 0x4aeccd
push 0x100
lea ecx, [esp + 0x184]
push ecx
push eax
call fcn.00487000
push eax
push str.schannel:_Failed_to_read_remote_certificate_context:__s
push edi
call fcn.00499ce0
add esp, 0x18
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x4aecdc
push ecx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test esi, esi
je 0x4aecf8
push str.SSL:_public_key_does_not_match_pinned_public_key_
push dword [esp + 0x14]
call fcn.00499ce0
add esp, 8
mov eax, esi
jmp 0x4aea9a
cmp byte [ebp + 0x4d4], 0
je 0x4aeac6
mov eax, dword [ebx + 0x470]
cmp byte [eax + 0x47], 0
je 0x4aeac6
push dword [esp + 0x1c]
push ebp
call fcn.004c7420
add esp, 8
jmp 0x4aea9a
mov ecx, dword [ebx + 0x470]
mov eax, dword [ecx + 0x38]
test al, al
jns 0x4aed5e
push 0x100
lea eax, [esp + 0x84]
push eax
push esi
call fcn.00487000
push eax
push str.schannel:_next_InitializeSecurityContext_failed:__s
push dword [esp + 0x24]
call fcn.00499ce0
add esp, 0x18
jmp 0x4aea95
or eax, 0x80
mov dword [ecx + 0x38], eax
xor eax, eax
mov dword [ebx + 0x46c], 3
jmp 0x4aea9a
mov eax, dword [ebx + 0x470]
mov byte [eax + 0x34], 1
xor eax, eax
mov dword [ebx + 0x46c], 2
jmp 0x4aea9a
push str.schannel:_unable_to_allocate_memory
push dword [esp + 0x14]
call fcn.00499ce0
add esp, 8
mov eax, 0x1b
jmp 0x4aea9a