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

Disassembly:
sub esp, 0x70
mov eax, dword [0x5cc5b0]
xor eax, esp
mov dword [esp + 0x6c], eax
mov dword [esp + 0xc], ecx
imul ecx, ecx, 0x54
push ebx
push ebp
mov ebp, dword [esp + 0x7c]
mov edx, dword [ebp + 0x98]
or eax, 0xffffffff
push esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
lea esi, [ecx + ebp + 0x17c]
mov ecx, dword [ebp + 0xb4]
xor eax, eax
cmp dword [esi + 0x24], 3
push edi
mov edi, dword [ebp]
push ecx
setne al
push edx
push str.schannel:_SSL_TLS_connection_with__s_port__hu__step_2_3__n
push edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
call fcn.0040c580
xor ebx, ebx
add esp, 0x10
cmp dword [esi + 8], ebx
je 0x413373
cmp dword [esi + 0xc], ebx
je 0x413373
cmp dword [esi + 0x3c], ebx
jne 0x41306d
push 0x1000
mov dword [esi + 0x34], ebx
mov dword [esi + 0x2c], 0x1000
call dword [0x5c74d0]
add esp, 4
mov dword [esi + 0x3c], eax
cmp eax, ebx
jne 0x41306d
push str.schannel:_unable_to_allocate_memory
push edi
call fcn.0040c610
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00501f35
add esp, 0x70
ret
cmp dword [esi + 0x38], ebx
jne 0x413091
push 0x1000
mov dword [esi + 0x30], ebx
mov dword [esi + 0x28], 0x1000
call dword [0x5c74d0]
add esp, 4
mov dword [esi + 0x38], eax
cmp eax, ebx
je 0x413047
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x28]
sub ecx, eax
cmp ecx, 0x400
jae 0x4130f0
mov edx, dword [esi + 0x38]
lea edi, [eax + 0x400]
push edi
push edx
call dword [0x5c74d8]
add esp, 8
cmp eax, ebx
jne 0x4130e3
mov eax, dword [esp + 0x10]
push str.schannel:_unable_to_re_allocate_memory
push eax
call fcn.0040c610
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00501f35
add esp, 0x70
ret
mov dword [esi + 0x38], eax
mov dword [esi + 0x28], edi
mov edi, dword [esp + 0x10]
lea ecx, [ecx]
cmp dword [esp + 0x14], ebx
je 0x41313e
mov eax, dword [esi + 0x30]
mov edx, dword [esi + 0x28]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x38]
sub edx, eax
push edx
mov edx, dword [esp + 0x24]
add ecx, eax
mov eax, dword [ebp + edx*4 + 0x154]
push ecx
push eax
call fcn.0040c280
add esp, 0x10
cmp eax, 0x51
je 0x41338b
cmp eax, ebx
jne 0x4133bb
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x4133bb
add dword [esi + 0x30], eax
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x30]
push ecx
push edx
push str.schannel:_encrypted_data_buffer:_offset__zu_length__zu_n
push edi
call fcn.0040c580
mov eax, dword [esi + 0x30]
push eax
call fcn.0040fb80
mov ecx, dword [esi + 0x30]
push ecx
mov edi, eax
call dword [0x5c74d0]
mov ecx, 2
mov dword [esp + 0x44], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x74], ecx
add esp, 0x18
lea edx, [esp + 0x28]
lea ecx, [esp + 0x58]
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], 0x11
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], 3
cmp eax, ebx
je 0x4133cb
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x38]
push edx
push ecx
push eax
call fcn.00504a20
mov ecx, dword [ebp + 0x98]
add esp, 0xc
cmp ecx, ebx
je 0x413055
mov eax, dword [esi + 0xc]
lea edx, [eax + 8]
push edx
lea edx, [esi + 0x44]
push edx
lea edx, [esp + 0x48]
push edx
push ebx
push ebx
lea edx, [esp + 0x60]
push edx
mov edx, dword [esi + 0x40]
push ebx
push ebx
push edx
push ecx
mov ecx, dword [0x5d41d0]
mov edx, dword [ecx + 0x18]
push eax
mov eax, dword [esi + 8]
push eax
call edx
mov edi, eax
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x18], edi
call dword [0x5c74d4]
add esp, 4
mov dword [esp + 0x30], ebx
cmp edi, 0x80090318
je 0x4133f5
cmp edi, 0x90320
je 0x41334e
cmp edi, 0x90312
je 0x413267
cmp edi, ebx
jne 0x413459
mov dword [esp + 0x18], ebx
lea edi, [esp + 0x58]
nop
cmp dword [edi + 4], 2
jne 0x4132c1
mov eax, dword [edi]
cmp eax, ebx
jbe 0x4132c1
mov ecx, dword [esp + 0x10]
push eax
push str.schannel:_sending_next_handshake_data:_sending__lu_bytes..._n
push ecx
call fcn.0040c580
mov eax, dword [edi]
mov ecx, dword [edi + 8]
lea edx, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x2c]
push eax
mov eax, dword [ebp + edx*4 + 0x154]
push ecx
push eax
push ebp
call fcn.0040c980
add esp, 0x20
test eax, eax
mov eax, dword [esp + 0x20]
jne 0x41347c
cmp dword [edi], eax
jne 0x41347c
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x4132d4
mov ecx, dword [0x5d41d0]
mov edx, dword [ecx + 0x40]
push eax
call edx
mov eax, dword [esp + 0x18]
inc eax
add edi, 0xc
mov dword [esp + 0x18], eax
cmp eax, 3
jl 0x413270
cmp dword [esp + 0x38], 5
jne 0x4134a0
mov eax, dword [esp + 0x34]
cmp eax, ebx
jbe 0x4134a0
push eax
mov eax, dword [esp + 0x14]
push str.schannel:_encrypted_data_length:__lu_n
push eax
call fcn.0040c580
mov eax, dword [esi + 0x30]
mov edx, dword [esp + 0x40]
add esp, 0xc
cmp eax, edx
jbe 0x4134a3
mov ecx, dword [esi + 0x38]
sub eax, edx
push edx
add eax, ecx
push eax
push ecx
call fcn.00502230
mov ecx, dword [esp + 0x40]
add esp, 0xc
cmp dword [esp + 0x14], 0x90312
mov dword [esi + 0x30], ecx
jne 0x4134c9
mov dword [esp + 0x14], ebx
jmp 0x4130e9
mov eax, dword [esi + 0x40]
test al, al
jns 0x413423
push edi
push ebp
call fcn.00412020
push eax
mov eax, dword [esp + 0x1c]
push str.schannel:_next_InitializeSecurityContext_failed:__s
push eax
call fcn.0040c610
add esp, 0x14
pop edi
pop esi
pop ebp
mov eax, 0x23
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00501f35
add esp, 0x70
ret
cmp dword [esi + 0x24], 3
je 0x413398
mov dword [esi + 0x24], 2
push str.schannel:_failed_to_receive_handshake__need_more_data_n
push edi
call fcn.0040c580
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00501f35
add esp, 0x70
ret
push str.schannel:_failed_to_receive_handshake__SSL_TLS_connection_failed
push edi
call fcn.0040c610
add esp, 8
jmp 0x413373
mov edx, dword [esp + 0x10]
push str.schannel:_unable_to_allocate_memory
push edx
call fcn.0040c610
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00501f35
add esp, 0x70
ret
mov eax, dword [esp + 0x10]
push str.schannel:_received_incomplete_message__need_more_data_n
push eax
mov dword [esi + 0x24], 2
call fcn.0040c580
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00501f35
add esp, 0x70
ret
mov ecx, dword [esp + 0x10]
or eax, 0x80
push str.schannel:_a_client_certificate_has_been_requested_n
push ecx
mov dword [esi + 0x40], eax
mov dword [esi + 0x24], 3
call fcn.0040c580
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00501f35
add esp, 0x70
ret
cmp edi, 0x80090322
jne 0x413359
push edi
push ebp
call fcn.00412020
mov edx, dword [esp + 0x18]
push eax
push str.schannel:_SNI_or_certificate_check_failed:__s
push edx
jmp 0x41336b
mov ecx, dword [esp + 0x18]
lea ecx, [ecx + ecx*2]
mov edx, dword [esp + ecx*4 + 0x58]
push edx
push eax
mov eax, dword [esp + 0x18]
push str.schannel:_failed_to_send_next_handshake_data:_sent__zd_of__lu_bytes
push eax
call fcn.0040c610
add esp, 0x10
jmp 0x413373
mov dword [esi + 0x30], ebx
cmp dword [esp + 0x14], 0x90312
jne 0x4134c9
pop edi
mov dword [esi + 0x24], 2
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00501f35
add esp, 0x70
ret
cmp dword [esp + 0x14], ebx
jne 0x4134e8
mov ecx, dword [esp + 0x10]
push str.schannel:_SSL_TLS_handshake_complete_n
push ecx
mov dword [esi + 0x24], 4
call fcn.0040c580
add esp, 8
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00501f35
add esp, 0x70
ret