Function at 0x1401b7e40
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x2c0]
mov eax, 0x3c0
call fcn.1402807a0
sub rsp, rax
mov rax, qword [0x1403b9868]
xor rax, rsp
mov qword [rbp + 0x290], rax
mov rax, qword [rbp + 0x320]
mov rsi, qword [rbp + 0x330]
mov r14d, 0x28
mov qword [rsp + 0x58], rax
mov rax, qword [rbp + 0x338]
mov qword [rsp + 0x60], r9
mov r15, r8
mov qword [rbp - 0x68], r8
mov qword [rbp - 0x70], rdx
mov qword [rbp - 0x78], rax
mov r12, rcx
mov qword [rbp - 0x60], rcx
mov edi, 0x40
mov dword [rsp + 0x50], r14d
mov dword [rsp + 0x24], 8
mov bl, 1
cmp rsi, 0x100000
jb 0x1401b7ee1
lea r8, str.data_plus_mac_plus_padding_size___1024__1024
lea rcx, [0x140380268]
mov edx, 0x1c7
call fcn.1401c21f0
mov rcx, r12
mov qword [rsp + 0x3b8], r13
call fcn.1401e3230
mov rcx, rax
call fcn.1401c1720
mov ecx, eax
cmp eax, 0x2a1
jg 0x1401b7ff5
je 0x1401b7fb7
cmp eax, 4
je 0x1401b7f7c
cmp eax, edi
je 0x1401b7f4e
cmp eax, 0x2a0
jne 0x1401b8001
lea rcx, [rbp - 0x20]
call fcn.1401ec570
test eax, eax
jle 0x1401b876e
mov r13d, 0x20
lea rcx, [0x1401b8c50]
lea rax, [0x1401ec5e0]
lea r10d, [r13 - 0x18]
jmp 0x1401b808a
lea rcx, [rbp - 0x20]
call fcn.1401ec040
test eax, eax
jle 0x1401b876e
mov r13d, shutdown
lea rcx, [0x1401b8bc0]
lea rax, [0x1401ec090]
lea r10d, [r13 - 0xc]
jmp 0x1401b808a
lea rcx, [rbp - 0x20]
call fcn.1401ccae0
test eax, eax
jle 0x1401b876e
mov r13d, reloc.WS2_32.dll_recv
mov r14d, 0x30
lea rcx, [0x1401b8b40]
lea rax, [0x1401ccb30]
xor bl, bl
lea r10d, [r13 - 8]
mov dword [rsp + 0x50], r14d
jmp 0x1401b808a
lea rcx, [rbp - 0x20]
call fcn.1401ec730
test eax, eax
jle 0x1401b876e
lea rax, [0x1401b8d30]
mov r13d, 0x30
mov r10d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x48], rax
lea rax, [0x1401ecde0]
lea edi, [r13 + 0x50]
mov dword [rsp + 0x24], r10d
jmp 0x1401b808f
sub ecx, 0x2a2
je 0x1401b8058
dec ecx
je 0x1401b802d
lea r8, [0x1403801f4]
lea rcx, [0x140380278]
mov edx, 0x209
call fcn.1401c21f0
test r15, r15
je 0x1401b876e
xor r14d, r14d
mov qword [r15], r14
jmp 0x1401b876e
lea rcx, [rbp - 0x20]
call fcn.1401ec1e0
test eax, eax
jle 0x1401b876e
mov r13d, 0x1c
lea rcx, [0x1401b8c50]
lea rax, [0x1401ec5e0]
lea r10d, [r13 - 0x14]
jmp 0x1401b808a
lea rcx, [rbp - 0x20]
call fcn.1401ecd50
test eax, eax
jle 0x1401b876e
mov r10d, reloc.WS2_32.dll_recv
mov r13d, edi
lea rcx, [0x1401b8d30]
lea rax, [0x1401ecde0]
mov edi, 0x80
mov dword [rsp + 0x24], r10d
mov qword [rsp + 0x48], rcx
movzx r11d, byte [rbp + 0x348]
mov r15d, reloc.WS2_32.dll_listen
mov dword [rsp + 0x2c], r13d
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x20], r15d
test r11b, r11b
je 0x1401b80c4
mov r15d, dword [rbp + 0x340]
add r15d, 0xb
add r15d, r14d
mov dword [rsp + 0x20], r15d
mov r12d, dword [rbp + 0x328]
test r11b, r11b
mov eax, 2
mov r9d, 6
cmovne r9d, eax
xor edx, edx
mov eax, esi
sub eax, r13d
sub r12d, r13d
xor r14d, r14d
dec eax
add r12d, r15d
mov ecx, r14d
add eax, r15d
mov dword [rsp + 0x40], r9d
mov dword [rsp + 0x38], r14d
add eax, r10d
mov esi, r14d
add eax, edi
div edi
xor edx, edx
mov r8d, eax
mov eax, r12d
div edi
mov dword [rsp + 0x7c], eax
mov dword [rsp + 0x54], edx
xor edx, edx
lea eax, [r12 + r10]
div edi
test r11b, r11b
setne cl
mov dword [rbp - 0x7c], eax
add ecx, r9d
cmp r8d, ecx
jbe 0x1401b8141
mov esi, r8d
sub esi, r9d
mov dword [rsp + 0x38], esi
imul esi, edi
lea r12d, [r12*8]
test r11b, r11b
jne 0x1401b8240
lea rcx, [rbp + 0x110]
mov r8d, edi
xor edx, edx
lea r12d, [r12 + rdi*8]
call fcn.140283160
mov eax, dword [rbp + 0x340]
cmp eax, 0x80
jbe 0x1401b8192
lea r8, str.mac_secret_length___sizeof_hmac_pad_
lea rcx, str.._ssl_s3_cbc.c
mov edx, 0x271
call fcn.1401c21f0
mov eax, dword [rbp + 0x340]
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp + 0x110]
mov r8d, eax
call fcn.140282ac0
mov edx, r14d
test edi, edi
je 0x1401b822c
cmp edi, 0x20
jb 0x1401b8209
movdqa xmm1, xmmword [str.6666666666666666jjjjjjjjjjjjjjjj]
mov eax, edi
mov r8d, edi
and eax, 0x1f
sub r8d, eax
nop dword [rax + rax]
mov eax, edx
movdqu xmm0, xmmword [rbp + rax + 0x110]
pxor xmm0, xmm1
movdqu xmmword [rbp + rax + 0x110], xmm0
lea eax, [rdx + 0x10]
add edx, 0x20
movdqu xmm0, xmmword [rbp + rax + 0x110]
pxor xmm0, xmm1
movdqu xmmword [rbp + rax + 0x110], xmm0
cmp edx, r8d
jb 0x1401b81d0
cmp edx, edi
jae 0x1401b822c
mov eax, edx
lea rcx, [rbp + 0x110]
add rcx, rax
mov eax, edi
sub eax, edx
mov edx, eax
nop
xor byte [rcx], 0x36
lea rcx, [rcx + 1]
dec rdx
jne 0x1401b8220
lea rdx, [rbp + 0x110]
lea rcx, [rbp - 0x20]
call qword [rsp + 0x30]
mov r10d, dword [rsp + 0x24]
xor edx, edx
lea rcx, [rbp + 0xc0]
test bl, bl
je 0x1401b8295
lea eax, [r10 - 4]
mov r8d, eax
mov ebx, eax
call fcn.140283160
mov r8d, dword [rsp + 0x24]
mov eax, r12d
shr eax, 0x18
mov edx, r12d
mov byte [rbp + rbx + 0xc0], al
lea eax, [r8 - 3]
shr edx, 0x10
mov byte [rbp + rax + 0xc0], dl
lea eax, [r8 - 2]
mov edx, r12d
shr edx, 8
mov byte [rbp + rax + 0xc0], dl
lea eax, [r8 - 1]
jmp 0x1401b82d9
mov r8d, r10d
call fcn.140283160
mov r8d, dword [rsp + 0x24]
mov edx, r12d
shr edx, 0x18
lea eax, [r8 - 5]
mov byte [rbp + rax + 0xc0], dl
lea eax, [r8 - 6]
mov edx, r12d
shr edx, 0x10
mov byte [rbp + rax + 0xc0], dl
lea eax, [r8 - 7]
mov edx, r12d
shr edx, 8
mov byte [rbp + rax + 0xc0], dl
lea eax, [r8 - 8]
mov byte [rbp + rax + 0xc0], r12b
test esi, esi
je 0x1401b841f
cmp byte [rbp + 0x348], r14b
je 0x1401b839d
cmp r15d, edi
jbe 0x1401b876e
mov rdx, qword [rsp + 0x60]
lea rcx, [rbp - 0x20]
mov ebx, r15d
sub ebx, edi
call qword [rsp + 0x30]
mov edx, edi
add rdx, qword [rsp + 0x60]
lea rcx, [rbp + 0x190]
mov r12d, ebx
mov r8d, ebx
mov qword [rsp + 0x70], r12
call fcn.140282ac0
mov rdx, qword [rsp + 0x58]
mov r8d, edi
lea rcx, [rbp + 0x190]
sub r8d, ebx
add rcx, r12
call fcn.140282ac0
lea rdx, [rbp + 0x190]
lea rcx, [rbp - 0x20]
call qword [rsp + 0x30]
xor edx, edx
mov eax, esi
div edi
dec eax
cmp eax, 1
jbe 0x1401b841f
mov r14, qword [rsp + 0x70]
mov r15, qword [rsp + 0x30]
mov r13, qword [rsp + 0x58]
mov ebx, edi
lea r12d, [rax - 1]
nop
mov edx, ebx
lea rcx, [rbp - 0x20]
sub rdx, r14
add rdx, r13
call r15
add ebx, edi
dec r12
jne 0x1401b8380
mov r13d, dword [rsp + 0x2c]
jmp 0x1401b8417
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
lea r8d, [rdi - 0xd]
mov eax, dword [rcx + 8]
movsd xmm0, qword [rcx]
movsd qword [rbp + 0x190], xmm0
mov dword [rbp + 0x198], eax
movzx eax, byte [rcx + 0xc]
lea rcx, [rbp + 0x19d]
mov byte [rbp + 0x19c], al
call fcn.140282ac0
lea rdx, [rbp + 0x190]
lea rcx, [rbp - 0x20]
call qword [rsp + 0x30]
xor edx, edx
mov eax, esi
div edi
cmp eax, 1
jbe 0x1401b841f
mov r14, qword [rsp + 0x30]
mov r15, qword [rsp + 0x58]
mov ebx, edi
lea r12d, [rax - 1]
mov eax, ebx
lea rdx, [r15 - 0xd]
lea rcx, [rbp - 0x20]
add rdx, rax
call r14
add ebx, edi
dec r12
jne 0x1401b8400
mov r15d, dword [rsp + 0x20]
xor r14d, r14d
mov ecx, dword [rsp + 0x38]
xor eax, eax
mov qword [rbp + 0xd0], rax
mov qword [rbp + 0xd8], rax
mov qword [rbp + 0xe0], rax
mov qword [rbp + 0xe8], rax
mov qword [rbp + 0xf0], rax
mov qword [rbp + 0xf8], rax
mov qword [rbp + 0x100], rax
mov qword [rbp + 0x108], rax
mov eax, dword [rsp + 0x40]
add eax, ecx
mov dword [rsp + 0x70], eax
cmp ecx, eax
ja 0x1401b86d6
movaps xmmword [rsp + 0x3a0], xmm6
nop word [rax + rax]
mov eax, ecx
mov r8d, r14d
xor eax, dword [rsp + 0x7c]
lea r12d, [rax - 1]
not eax
shr eax, 0x1f
shr r12d, 0x1f
and r12b, al
mov eax, ecx
xor eax, dword [rbp - 0x7c]
neg r12b
lea ebx, [rax - 1]
not eax
shr ebx, 0x1f
shr eax, 0x1f
and bl, al
neg bl
movsx eax, bl
movd xmm6, eax
punpcklbw xmm6, xmm6
punpcklwd xmm6, xmm6
pshufd xmm6, xmm6, 0
test edi, edi
je 0x1401b8602
mov edx, dword [rsp + 0x54]
movzx ecx, r12b
lea r11, [rbp + 0x210]
lea eax, [rdx + 1]
mov r13d, edx
mov r9d, edx
shr eax, 0x1f
shr r13d, 0x1f
mov dword [rsp + 0x40], ecx
mov dword [rsp + 0x6c], eax
movzx eax, bl
not al
or al, r12b
mov byte [rsp + 0x28], al
mov eax, edi
sub eax, dword [rsp + 0x24]
movzx r14d, byte [rsp + 0x28]
neg r9d
mov dword [rsp + 0x78], eax
mov dword [rbp - 0x80], r9d
xor r10b, r10b
mov eax, esi
cmp esi, r15d
jae 0x1401b8527
mov rcx, qword [rsp + 0x60]
jmp 0x1401b8540
mov ecx, r15d
add rcx, qword [rbp + 0x330]
cmp rax, rcx
jae 0x1401b8545
mov rcx, qword [rsp + 0x58]
mov eax, esi
sub eax, r15d
movzx r10d, byte [rax + rcx]
lea ecx, [r9 + r8]
mov edx, r8d
inc esi
shr ecx, 0x1f
shr edx, 0x1f
xor cl, r13b
movzx eax, dl
xor al, r13b
or cl, al
xor cl, dl
dec cl
movzx eax, cl
mov ecx, r8d
and eax, dword [rsp + 0x40]
mov dword [rsp + 0x3c], eax
not eax
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x20]
mov eax, dword [rsp + 0x3c]
and al, 0x80
and r9b, r10b
mov r10d, dword [rsp + 0x54]
or r9b, al
lea eax, [r10 + 1]
sub ecx, eax
mov eax, dword [rsp + 0x6c]
shr ecx, 0x1f
xor cl, al
xor al, dl
or cl, al
xor cl, dl
dec cl
and cl, r12b
not cl
and cl, r14b
and r9b, cl
cmp r8d, dword [rsp + 0x78]
jb 0x1401b85e4
movzx eax, bl
mov dword [rsp + 0x3c], eax
not eax
mov dword [rsp + 0x20], eax
mov ecx, dword [rsp + 0x3c]
mov eax, r8d
sub eax, edi
add eax, dword [rsp + 0x24]
movzx edx, byte [rbp + rax + 0xc0]
mov eax, dword [rsp + 0x20]
and r9b, al
and dl, cl
or r9b, dl
mov byte [r11], r9b
mov r9d, dword [rbp - 0x80]
inc r8d
inc r11
cmp r8d, edi
jb 0x1401b8516
mov r13d, dword [rsp + 0x2c]
xor r14d, r14d
lea rdx, [rbp + 0x210]
lea rcx, [rbp - 0x20]
call qword [rsp + 0x30]
lea rdx, [rbp + 0x210]
lea rcx, [rbp - 0x20]
call qword [rsp + 0x48]
mov edx, r14d
test r13d, r13d
je 0x1401b86ba
cmp r13d, 0x20
jb 0x1401b8693
mov eax, r13d
mov r8d, r13d
and eax, 0x1f
sub r8d, eax
nop
mov eax, edx
movdqu xmm0, xmmword [rbp + rax + 0xd0]
movdqu xmm1, xmmword [rbp + rax + 0x210]
pand xmm1, xmm6
por xmm1, xmm0
movdqu xmmword [rbp + rax + 0xd0], xmm1
lea eax, [rdx + 0x10]
add edx, 0x20
movdqu xmm0, xmmword [rbp + rax + 0xd0]
movdqu xmm1, xmmword [rbp + rax + 0x210]
pand xmm1, xmm6
por xmm1, xmm0
movdqu xmmword [rbp + rax + 0xd0], xmm1
cmp edx, r8d
jb 0x1401b8640
cmp edx, r13d
jae 0x1401b86ba
mov r8d, r13d
mov eax, edx
sub r8d, edx
movzx ecx, byte [rbp + rax + 0x210]
lea rax, [rax + 1]
and cl, bl
or byte [rbp + rax + 0xcf], cl
dec r8
jne 0x1401b86a0
mov ecx, dword [rsp + 0x38]
inc ecx
mov dword [rsp + 0x38], ecx
cmp ecx, dword [rsp + 0x70]
jbe 0x1401b8480
movaps xmm6, xmmword [rsp + 0x3a0]
lea rcx, [rbp - 0x58]
call fcn.1401d9190
mov rdx, qword [rbp - 0x60]
lea rcx, [rbp - 0x58]
mov rdx, qword [rdx]
xor r8d, r8d
call fcn.1401d8bd0
test eax, eax
jle 0x1401b8765
cmp byte [rbp + 0x348], 0
je 0x1401b8799
mov ebx, dword [rsp + 0x50]
lea rcx, [rbp + 0x110]
mov edx, 0x5c
mov r8d, ebx
call fcn.140283160
mov r8d, dword [rbp + 0x340]
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x58]
call fcn.1401d8e30
test eax, eax
jle 0x1401b8765
lea rdx, [rbp + 0x110]
lea rcx, [rbp - 0x58]
mov r8d, ebx
call fcn.1401d8e30
test eax, eax
jle 0x1401b8765
lea rdx, [rbp + 0xd0]
lea rcx, [rbp - 0x58]
mov r8d, r13d
call fcn.1401d8e30
test eax, eax
jg 0x1401b8855
lea rcx, [rbp - 0x58]
call fcn.1401d8e50
xor eax, eax
mov r13, qword [rsp + 0x3b8]
mov rcx, qword [rbp + 0x290]
xor rcx, rsp
call fcn.1402806f0
add rsp, 0x3c0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
test edi, edi
je 0x1401b881f
cmp edi, 0x20
jb 0x1401b87fc
movdqa xmm1, xmmword [0x1402d0660]
mov eax, edi
mov edx, edi
and eax, 0x1f
sub edx, eax
nop word [rax + rax]
mov eax, r14d
movdqu xmm0, xmmword [rbp + rax + 0x110]
pxor xmm0, xmm1
movdqu xmmword [rbp + rax + 0x110], xmm0
lea eax, [r14 + 0x10]
add r14d, 0x20
movdqu xmm0, xmmword [rbp + rax + 0x110]
pxor xmm0, xmm1
movdqu xmmword [rbp + rax + 0x110], xmm0
cmp r14d, edx
jb 0x1401b87c0
cmp r14d, edi
jae 0x1401b881f
lea rcx, [rbp + 0x110]
mov eax, r14d
mov edx, edi
add rcx, rax
sub edx, r14d
xor byte [rcx], 0x6a
lea rcx, [rcx + 1]
dec rdx
jne 0x1401b8813
lea rdx, [rbp + 0x110]
lea rcx, [rbp - 0x58]
mov r8d, edi
call fcn.1401d8e30
test eax, eax
jle 0x1401b8765
lea rdx, [rbp + 0xd0]
lea rcx, [rbp - 0x58]
mov r8d, r13d
call fcn.1401d8e30
test eax, eax
jle 0x1401b8765
mov rdx, qword [rbp - 0x70]
lea r8, [rsp + 0x68]
lea rcx, [rbp - 0x58]
call fcn.1401d8ab0
mov rcx, qword [rbp - 0x68]
test rcx, rcx
je 0x1401b8877
mov eax, dword [rsp + 0x68]
mov qword [rcx], rax
lea rcx, [rbp - 0x58]
call fcn.1401d8e50
mov eax, 1
jmp 0x1401b8770