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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x541a34]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
push edi
push 0x528b8c
push 0x4ea
push str.....library_ssl_tls.c
mov esi, ecx
mov dword [esp + 0x28], 0
push 2
push esi
call fcn.00416cf0
add esp, 0x14
cmp dword [esi + 0x30], 0
je 0x40654c
mov eax, dword [esi + 0x44]
test eax, eax
je 0x40654c
add eax, 0x50
je 0x405e60
mov eax, dword [eax]
test eax, eax
je 0x405e60
mov eax, dword [eax + 4]
jmp 0x405e62
xor eax, eax
push dword [esi + 0xc8]
lea ebx, [esi + 0xc8]
mov dword [esp + 0x10], eax
push dword [esi + 0xc0]
lea edi, [esi + 0xc0]
mov edx, 4
push str.before_encrypt:_output_payload
push 0x4f5
push str.....library_ssl_tls.c
mov ecx, esi
call fcn.00416e10
mov eax, dword [esp + 0x20]
add esp, 0x14
cmp eax, 7
je 0x405ebe
cmp eax, 2
jne 0x405f73
mov eax, dword [esi + 0x30]
cmp dword [eax + 0x80], 0
jne 0x406030
cmp dword [esi + 0x14], 1
jl 0x406540
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0xb0]
add ecx, 0x38
push 8
call fcn.00410b90
mov ecx, dword [esi + 0x44]
add esp, 4
mov edx, dword [esi + 0xb4]
add ecx, 0x38
push 3
call fcn.00410b90
mov ecx, dword [esi + 0x44]
add esp, 4
mov edx, dword [esi + 0xb8]
add ecx, 0x38
push 2
call fcn.00410b90
mov ecx, dword [esi + 0x44]
add esp, 4
mov edx, dword [edi]
add ecx, 0x38
push dword [ebx]
call fcn.00410b90
mov edx, dword [edi]
add esp, 4
mov ecx, dword [esi + 0x44]
add edx, dword [ebx]
add ecx, 0x38
call fcn.00410bc0
mov ecx, dword [esi + 0x44]
add ecx, 0x38
call fcn.00410c60
mov eax, dword [esi + 0x44]
mov edx, 4
mov ecx, esi
push dword [eax + 0x14]
mov eax, dword [edi]
add eax, dword [ebx]
push eax
push str.computed_mac
push 0x522
push str.....library_ssl_tls.c
call fcn.00416e10
mov eax, dword [esi + 0x44]
add esp, 0x14
mov dword [esp + 0x1c], 1
mov eax, dword [eax + 0x14]
add dword [ebx], eax
mov eax, dword [esp + 0xc]
cmp eax, 7
jne 0x406015
push 0
push dword [ebx]
mov dword [esp + 0x14], 0
push str.before_encrypt:_msglen___d__including__d_bytes_of_padding
push 0x534
push str.....library_ssl_tls.c
push 3
push esi
call fcn.00416cf0
mov eax, dword [edi]
lea edx, [esp + 0x28]
mov ecx, dword [esi + 0x44]
add esp, 0x1c
push edx
push eax
push dword [ebx]
lea edx, [ecx + 0x18]
push eax
push dword [ecx + 0xc]
add ecx, 0x50
call fcn.00417ef0
mov edi, eax
add esp, 0x14
test edi, edi
je 0x405ffa
push edi
push str.mbedtls_cipher_crypt
push 0x53c
push str.....library_ssl_tls.c
mov edx, 1
mov ecx, esi
call fcn.00416d80
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004d1fac
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
cmp eax, dword [esp + 0xc]
je 0x406527
push str.should_never_happen
push 0x542
jmp 0x406556
cmp eax, 6
je 0x406326
cmp eax, 8
je 0x406326
cmp eax, 2
jne 0x406317
mov eax, dword [esi + 0x44]
xor edx, edx
mov dword [esp + 0x14], 0
mov ecx, dword [eax + 0xc]
mov eax, dword [ebx]
mov dword [esp + 0x10], eax
inc eax
div ecx
mov eax, ecx
sub eax, edx
xor edx, edx
cmp eax, ecx
cmove eax, edx
mov dword [esp + 0xc], eax
inc eax
mov dword [esp + 0x18], eax
cmp eax, 0x10
jb 0x4060e2
mov eax, dword [edi]
add eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x20], eax
lea ebx, [eax + ecx]
mov dword [esp + 0x10], ebx
lea ebx, [esi + 0xc8]
cmp eax, edi
ja 0x40608b
cmp dword [esp + 0x10], edi
jae 0x4060e2
cmp eax, ebx
ja 0x406095
cmp dword [esp + 0x10], ebx
jae 0x4060e2
lea eax, [ecx + 1]
and eax, 0xf
sub ecx, eax
nop dword [eax]
add edx, 0x10
cmp edx, ecx
jbe 0x4060a0
movzx eax, byte [esp + 0xc]
add ecx, 0x10
mov edi, dword [esp + 0x20]
and ecx, 0xfffffff0
mov ebx, ecx
imul eax, eax, 0x1010101
shr ecx, 2
mov dword [esp + 0x10], edx
rep stosd dword es:[edi], eax
mov ecx, ebx
lea ebx, [esi + 0xc8]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0xc]
lea edi, [esi + 0xc0]
cmp edx, ecx
ja 0x4060fc
mov ecx, dword [edi]
mov eax, dword [ebx]
add ecx, edx
mov ebx, dword [esp + 0xc]
inc edx
mov byte [ecx + eax], bl
mov ecx, ebx
lea ebx, [esi + 0xc8]
cmp edx, ecx
jbe 0x4060e2
mov eax, dword [ebx]
inc eax
add eax, ecx
cmp dword [esi + 0x14], 2
mov dword [esp + 0x20], eax
mov dword [ebx], eax
mov eax, dword [edi]
mov dword [esp + 0x10], eax
jl 0x40615e
mov eax, dword [esi + 0x44]
mov ecx, dword [esi]
push dword [eax + 0xc]
add eax, 0x18
push eax
push dword [ecx + 0x1c]
mov eax, dword [ecx + 0x18]
call eax
add esp, 0xc
test eax, eax
jne 0x40656b
mov eax, dword [esi + 0x44]
push dword [eax + 0xc]
add eax, 0x18
push eax
push dword [esi + 0xbc]
call fcn.004d5f40
mov eax, dword [edi]
add esp, 0xc
mov edi, dword [ebx]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x44]
mov eax, dword [eax + 0xc]
add eax, edi
mov dword [ebx], eax
jmp 0x406162
mov edi, dword [esp + 0x20]
push dword [esp + 0x18]
mov eax, dword [esi + 0x44]
push dword [eax + 0xc]
push dword [ebx]
push str.before_encrypt:_msglen___d__including__d_bytes_of_IV_and__d_bytes_of_padding
push 0x5c9
push str.....library_ssl_tls.c
push 3
push esi
call fcn.00416cf0
mov ecx, dword [esi + 0x44]
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x34]
push eax
push edi
push eax
push dword [ecx + 0xc]
lea edx, [ecx + 0x18]
add ecx, 0x50
call fcn.00417ef0
add esp, 0x34
mov dword [esp + 0x18], eax
test eax, eax
je 0x4061e2
push eax
push str.mbedtls_cipher_crypt
push 0x5d1
push str.....library_ssl_tls.c
mov edx, 1
mov ecx, esi
call fcn.00416d80
mov eax, dword [esp + 0x28]
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004d1fac
mov esp, ebp
pop ebp
ret
cmp edi, dword [esp + 0x14]
je 0x4061f7
push str.should_never_happen
push 0x5d7
jmp 0x406556
cmp dword [esi + 0x14], 2
jge 0x406213
mov ecx, dword [esi + 0x44]
push dword [ecx + 0xc]
lea eax, [ecx + 0x78]
push eax
lea eax, [ecx + 0x18]
push eax
call fcn.004d5f40
add esp, 0xc
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x40652b
push str.using_encrypt_then_mac
push 0x5f4
push str.....library_ssl_tls.c
push 3
push esi
call fcn.00416cf0
mov ecx, dword [esi + 0xb0]
add esp, 0x14
mov edx, 4
mov eax, dword [ecx]
mov dword [esp + 0x24], eax
mov eax, dword [ecx + 4]
mov ecx, dword [esi + 0xb4]
mov dword [esp + 0x28], eax
push 0xd
mov ax, word [ecx]
mov word [esp + 0x30], ax
movzx eax, byte [ecx + 2]
mov ecx, esi
mov byte [esp + 0x32], al
movzx eax, byte [esi + 0xc9]
mov byte [esp + 0x33], al
movzx eax, byte [ebx]
mov byte [esp + 0x34], al
lea eax, [esp + 0x28]
push eax
push str.MACd_meta_data
push 0x5fb
push str.....library_ssl_tls.c
call fcn.00416e10
mov ecx, dword [esi + 0x44]
lea edx, [esp + 0x38]
add esp, 0x14
add ecx, 0x38
push 0xd
call fcn.00410b90
mov ecx, dword [esi + 0x44]
add esp, 4
mov edx, dword [esi + 0xbc]
add ecx, 0x38
push dword [ebx]
call fcn.00410b90
mov edx, dword [esi + 0xbc]
add esp, 4
mov ecx, dword [esi + 0x44]
add edx, dword [ebx]
add ecx, 0x38
call fcn.00410bc0
mov ecx, dword [esi + 0x44]
add ecx, 0x38
call fcn.00410c60
mov eax, dword [esi + 0x44]
mov eax, dword [eax + 0x14]
add dword [ebx], eax
push str.__encrypt_buf
push 0x618
push str.....library_ssl_tls.c
push 2
push esi
call fcn.00416cf0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004d1fac
mov esp, ebp
pop ebp
ret
push str.should_never_happen
push 0x60d
jmp 0x406556
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0xb0]
mov edx, dword [esi + 0x14]
mov eax, dword [eax]
test byte [eax + 0x24], 2
sete al
lea eax, [eax*8 + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ecx]
mov dword [esp + 0x24], eax
mov eax, dword [ecx + 4]
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x28], eax
movzx eax, byte [esi + 0xc4]
mov byte [esp + 0x2c], al
lea eax, [esp + 0x2d]
push eax
mov eax, dword [esi]
mov eax, dword [eax + 0xcc]
shr eax, 1
and eax, 1
push eax
call fcn.0040c390
movzx eax, byte [esi + 0xc9]
mov edx, 4
mov byte [esp + 0x37], al
mov ecx, esi
movzx eax, byte [ebx]
push 0xd
mov byte [esp + 0x3c], al
lea eax, [esp + 0x30]
push eax
push str.additional_data_used_for_AEAD
push 0x55b
push str.....library_ssl_tls.c
call fcn.00416e10
mov edx, dword [esi + 0x44]
add esp, 0x1c
mov ecx, dword [edx + 0x10]
mov eax, dword [edx + 0xc]
sub eax, ecx
mov dword [esp + 0x14], ecx
cmp eax, 8
je 0x4063d3
push str.should_never_happen
push 0x563
jmp 0x406556
mov ecx, dword [esi + 0xb0]
mov ebx, dword [esp + 0x14]
mov eax, dword [ecx]
mov dword [ebx + edx + 0x18], eax
mov eax, dword [ecx + 4]
mov ecx, ebx
mov dword [ecx + edx + 0x1c], eax
mov ecx, dword [esi + 0xb0]
mov edx, dword [esi + 0xbc]
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov edx, 4
mov eax, dword [esi + 0x44]
mov ecx, dword [eax + 0xc]
sub ecx, dword [eax + 0x10]
push ecx
push dword [esi + 0xbc]
mov ecx, esi
push str.IV_used
push 0x56c
push str.....library_ssl_tls.c
call fcn.00416e10
mov eax, dword [esi + 0x44]
add esp, 0x14
mov edx, dword [esi + 0xc8]
mov edi, dword [edi]
mov dword [esp + 0x14], edx
mov ecx, dword [eax + 0xc]
sub ecx, dword [eax + 0x10]
push 0
add ecx, edx
push ecx
push str.before_encrypt:_msglen___d__including__d_bytes_of_padding
push 0x578
push str.....library_ssl_tls.c
push 3
push esi
mov dword [esi + 0xc8], ecx
call fcn.00416cf0
mov edx, dword [esp + 0x30]
add esp, 0x1c
mov eax, dword [esp + 0x18]
movzx eax, al
mov dword [esp + 0x20], eax
push eax
lea eax, [edx + edi]
push eax
lea eax, [esp + 0x20]
push eax
push edi
push edx
lea ecx, [edx + edi]
mov dword [esp + 0x24], ecx
lea eax, [esp + 0x38]
mov ecx, dword [esi + 0x44]
push edi
push ecx
push eax
push dword [ecx + 0xc]
lea edx, [ecx + 0x18]
add ecx, 0x50
call fcn.00417fa0
mov edi, eax
add esp, 0x24
test edi, edi
je 0x4064e0
push edi
push str.mbedtls_cipher_auth_encrypt
push 0x585
push str.....library_ssl_tls.c
mov edx, 1
mov ecx, esi
call fcn.00416d80
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.004d1fac
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x18], eax
je 0x4064f6
push str.should_never_happen
push 0x58b
jmp 0x406556
mov eax, dword [esp + 0x20]
mov edx, 4
add dword [esi + 0xc8], eax
mov ecx, esi
inc dword [esp + 0x1c]
push eax
push dword [esp + 0x14]
push str.after_encrypt:_tag
push 0x592
push str.....library_ssl_tls.c
call fcn.00416e10
add esp, 0x14
mov eax, dword [esp + 0x1c]
cmp eax, 1
je 0x4062e9
push str.should_never_happen
push 0x614
jmp 0x406556
push str.should_never_happen
push 0x51c
jmp 0x406556
push str.should_never_happen
push 0x4ee
push str.....library_ssl_tls.c
push 1
push esi
call fcn.00416cf0
mov eax, 0xffff9400
add esp, 0x14
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004d1fac
mov esp, ebp
pop ebp
ret