Function at 0x100142c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, edx
mov dword [ebp - 0xb0], ecx
mov al, byte [eax]
push edi
mov dword [ebp - 0xa0], esi
test byte [esi + 0x28], 4
mov ecx, dword [esi + 0x10]
mov dl, byte [ecx]
je 0x100142f8
and al, 0x1f
jmp 0x100142fa
and al, 0xf
xor al, dl
mov bl, 0
mov byte [ecx], al
mov eax, dword [esi + 0x10]
mov bh, byte [eax]
and bh, 3
add bh, 1
je 0x1001437d
nop dword [eax]
movzx ecx, word [esi + 0x1e]
mov eax, dword [ebp + 8]
add ecx, dword [esi + 0x10]
movzx edx, bl
inc bl
mov al, byte [edx + eax + 1]
xor byte [ecx + edx], al
cmp bl, bh
jb 0x10014310
movzx eax, word [esi + 0x1e]
xorps xmm0, xmm0
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x9c], eax
add eax, edx
movzx edi, bh
xor dl, dl
movlpd qword [ebp - 0x94], xmm0
mov esi, eax
mov dword [ebp - 0xa4], edi
movzx ecx, dl
mov eax, edi
sub eax, ecx
inc dl
mov al, byte [eax + esi - 1]
mov byte [ebp + ecx - 0x94], al
cmp dl, bh
jb 0x10014351
mov esi, dword [ebp - 0xa0]
mov edx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0x9c]
jmp 0x1001438f
movzx eax, word [esi + 0x1e]
xorps xmm0, xmm0
movlpd qword [ebp - 0x94], xmm0
movzx edx, bh
movzx ecx, bh
lea edi, [esi + 0x1e]
add eax, ecx
mov word [edi], ax
mov ax, word [esi + 0x20]
sub ax, cx
movzx ecx, ax
mov word [esi + 0x20], ax
mov eax, dword [esi + 0x24]
mov dword [ebp - 0xb4], ecx
cmp eax, 3
ja case.0x100143b6.1
jmp dword [eax*4 + 0x10014670]
xor eax, eax
jmp 0x100143cd
mov eax, 1
jmp 0x100143cd
mov eax, 2
mov ebx, dword [ebp - 0xb0]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebx + eax*4 + 0x868]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xa8], ecx
lea ecx, [edx*8]
mov dword [ebp - 0x98], eax
or edx, 0xffffffff
or eax, 0xffffffff
call fcn.1004a2c0
mov ecx, dword [ebp - 0xa8]
mov edi, eax
neg eax
mov dword [ebp - 0x9c], eax
mov eax, edx
adc eax, 0
and edx, dword [ebp - 0x98]
or edx, dword [ebp - 0x90]
and edi, ecx
or edi, dword [ebp - 0x94]
neg eax
mov dword [ebp - 0xac], eax
cmp edx, dword [ebp - 0x98]
ja 0x10014485
jb 0x10014443
cmp edi, ecx
jae 0x10014485
mov esi, dword [ebp - 0x9c]
sub ecx, edi
sbb dword [ebp - 0x98], edx
sub esi, ecx
mov dword [ebp - 0xa8], esi
sbb eax, dword [ebp - 0x98]
mov esi, dword [ebp - 0xa0]
cmp eax, dword [ebp - 0x98]
ja 0x100144e1
jb 0x10014477
cmp dword [ebp - 0xa8], ecx
jae 0x100144e1
add edi, dword [ebp - 0x9c]
adc edx, dword [ebp - 0xac]
jmp 0x100144e1
mov ebx, dword [ebp - 0x9c]
mov dword [ebp - 0xa0], edi
sub dword [ebp - 0xa0], ecx
mov ecx, edx
sbb ecx, dword [ebp - 0x98]
sub ebx, dword [ebp - 0xa0]
mov dword [ebp - 0xa8], ebx
mov ebx, dword [ebp - 0xb0]
sbb eax, ecx
cmp eax, ecx
ja 0x100144e1
jb 0x100144c7
mov eax, dword [ebp - 0xa8]
cmp eax, dword [ebp - 0xa0]
ja 0x100144e1
mov eax, dword [ebp - 0xac]
cmp edx, eax
jb 0x100144e1
mov ecx, dword [ebp - 0x9c]
ja 0x100144dd
cmp edi, ecx
jb 0x100144e1
sub edi, ecx
sbb edx, eax
mov cl, byte [esi + 0x28]
mov al, cl
mov dword [esi + 8], edi
or al, 0x20
mov dword [esi + 0xc], edx
mov byte [esi + 0x28], al
cmp edx, 0x3fffffff
jb 0x10014524
ja 0x10014500
cmp edi, 0xffffffff
jbe 0x10014524
push str.Packet_number_too_big
mov edx, esi
mov ecx, ebx
call fcn.1000c440
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
test cl, 0x40
je 0x10014557
cmp word [ebp - 0xb4], 0x10
jae 0x10014557
push str.Payload_length_less_than_encryption_tag
mov edx, esi
mov ecx, ebx
call fcn.1000c440
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
test cl, 4
je 0x1001465c
cmp dword [ebp - 0xa4], 2
jne 0x1001465c
mov eax, dword [esi + 0x10]
mov ecx, dword [ebx + 0x870]
mov al, byte [eax]
shr al, 2
xor al, byte [ecx + 0x190]
test al, 1
je 0x1001465c
cmp edx, dword [ecx + 0x184]
ja 0x100145eb
jb 0x1001459b
cmp edi, dword [ecx + 0x180]
jae 0x100145eb
test byte [0x10059abc], 1
je 0x100145d1
push str.Using_old_key_to_decrypt
push 0xffffffffffffffff
lea eax, [ebp - 0x8c]
push 0x80
push eax
call fcn.100015f0
lea eax, [ebp - 0x8c]
mov edx, 0x1004c9b0
push eax
push ebx
call fcn.10001280
add esp, 0x18
mov dword [esi + 0x24], 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
test byte [0x10059abc], 1
je 0x10014623
push edx
push edi
push str.Possible_peer_initiated_key_update__packet__llu_
push 0xffffffffffffffff
lea eax, [ebp - 0x8c]
push 0x80
push eax
call fcn.100015f0
lea eax, [ebp - 0x8c]
mov edx, 0x1004c9b0
push eax
push ebx
call fcn.10001280
add esp, 0x20
mov ecx, ebx
call fcn.10029d20
test eax, eax
jns 0x10014655
push str.Generate_new_packet_keys
mov edx, esi
mov ecx, ebx
lfence
call fcn.1000c440
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100483f7
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x24], 5
mov ecx, dword [ebp - 8]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100483f7
mov esp, ebp
pop ebp
ret