Function at 0x140399790
Capabilities:
Encode data using xor
Encrypt data using speck

Disassembly:
push rsi
push rdi
push rbx
mov eax, 0x5a062f0c
add eax, dword [0x140548430]
lea r8, [fcn.140399790]
add r8d, r8d
add r8d, 0x3ce0
test r8d, eax
nop word cs:[rax + rax]
xor eax, eax
test al, al
jne 0x1403997c0
test ecx, ecx
je 0x14039982e
test edx, edx
je 0x1403998be
movzx eax, byte [0x140546c04]
cmp al, 0x24
je 0x140399cc9
mov cl, 0x3a
mov edx, 0x5a062f0b
xor r8d, r8d
nop dword [rax + rax]
mov al, 0xad
lock cmpxchg byte [0x140546c04], cl
je 0x140399b3c
mov r9d, dword [0x14055f498]
lea r10d, [r9 - 1]
imul r10d, r9d
and r10d, 1
mov r9d, dword [0x140548430]
add r9d, edx
cmp r10d, r9d
test r8b, r8b
jne 0x140399820
cmp al, 0x24
jne 0x1403997f0
jmp 0x140399cc9
test edx, edx
je 0x140399abd
movzx eax, byte [0x1405471d0]
cmp al, 0xa7
je 0x140399c29
mov cl, 0x31
nop word [rax + rax]
mov eax, dword [0x14055f49c]
cmp eax, 0x57
jg 0x140399890
nop dword [rax + rax]
mov al, 0x15
lock cmpxchg byte [0x1405471d0], cl
sete dl
mov r8d, dword [0x14055f49c]
cmp r8d, 0x36
jge 0x140399890
test dl, dl
jne 0x140399b4b
cmp al, 0xa7
jne 0x140399850
jmp 0x140399c29
movzx edx, byte [0x140548434]
lea eax, [rdx + 0x6b]
mov r8d, edx
xor r8b, 0x87
and dl, 7
add dl, dl
add dl, r8b
lock cmpxchg byte [0x1405471d0], dl
mov eax, dword [0x14055f49c]
cmp eax, 0x3b
jge 0x140399890
jmp 0x140399860
xor eax, eax
mov ecx, dword [0x14055f49c]
cmp ecx, 0x24
jg 0x1403998d6
movzx ecx, byte [0x140546f50]
test al, al
je 0x1403998ea
movzx ecx, byte [0x140546f50]
mov ecx, dword [0x14055f49c]
cmp ecx, 0x16
jge 0x1403998c0
jmp 0x1403998cb
cmp cl, 0xa8
je 0x140399b80
mov cl, 0x6e
lea rdx, [fcn.140399790]
lea r8d, [rdx + rdx]
add r8d, 0x4860
mov r9d, r8d
not r9d
mov r10d, 0x5a062f0c
jmp 0x140399928
cmp al, 0xa8
je 0x140399b80
mov al, 0xd2
lock cmpxchg byte [0x140546f50], cl
je 0x1403999a0
nop word cs:[rax + rax]
test r9d, r8d
jne 0x14039995f
mov r11d, dword [0x14055f498]
mov esi, r11d
sub esi, dword [0x140548430]
imul esi, r11d
test sil, 1
je 0x140399920
mov r11d, dword [0x140548430]
add r11d, r10d
lea esi, [rdx + rdx]
add esi, 0x3ca0
mov edi, r11d
not edi
mov ebx, r11d
xor ebx, edi
and ebx, esi
xor ebx, edi
mov esi, ebx
not esi
xor ebx, r11d
and esi, edi
or esi, ebx
cmp esi, 0xffffffff
jne 0x140399940
jmp 0x140399945
mov eax, dword [0x14055f498]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
je 0x1403999c2
mov eax, dword [0x14055f498]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
jne 0x1403999a0
mov eax, dword [0x14055f49c]
cmp eax, 0x40
jg 0x1403999b1
xor r8d, r8d
mov r9d, 0xffffffff
mov r10d, 1
lea r11, [0x140546f40]
lea rsi, [0x14044f3d0]
xor edi, edi
nop dword [rax]
mov eax, dword [0x14055f498]
lea ecx, [rax + 1]
imul ecx, eax
test cl, 1
jne 0x140399a90
nop word cs:[rax + rax]
movzx eax, byte [r8 + r11]
movzx ecx, byte [r8 + rsi]
not cl
mov edx, ecx
or dl, al
not dl
and cl, al
or cl, dl
mov byte [r8 + r11], cl
mov ecx, dword [0x140548430]
mov edx, dword [0x14055f498]
mov eax, edx
sub eax, ecx
add eax, 0xa5f9d0f4
imul eax, edx
lea ebx, [rcx + 0x5a062f0d]
xor edx, edx
div ebx
lea eax, [rcx + 0x5a062f0b]
cmp edx, eax
jne 0x140399a90
lea eax, [r8 + 1]
mov edx, ecx
xor edx, 0x5a062f1b
and ecx, 0x5a062f1b
lea ecx, [rdx + rcx*2]
cmp eax, ecx
jge 0x140399b78
dec edi
add r9d, 3
add r10d, 0xfffffffe
inc r8
jmp 0x1403999f0
movzx eax, byte [r8 + r11]
movzx ecx, byte [r8 + rsi]
mov edx, eax
shl dl, cl
sub dl, al
sub al, dl
mul dl
sub dl, al
sub al, dl
mul dl
mov ecx, edx
xor cl, dl
not cl
and cl, al
xor cl, dl
mov byte [r8 + r11], cl
jmp 0x140399a10
movzx eax, byte [0x140546ba6]
cmp al, 0x63
je 0x140399c01
xor ecx, ecx
mov dl, 0xde
test cl, cl
jne 0x140399b03
nop word cs:[rax + rax]
mov al, 0xbe
lock cmpxchg byte [0x140546ba6], dl
sete r8b
mov r9d, dword [0x14055f498]
lea r10d, [r9 - 1]
imul r10d, r9d
test r10b, 1
je 0x140399b10
mov al, 0xbe
lock cmpxchg byte [0x140546ba6], dl
jmp 0x140399ae0
test r8b, r8b
jne 0x140399b99
movzx r8d, byte [0x140548434]
mov r9d, r8d
xor r9b, 0xb9
and r8b, 0x39
add r8b, r8b
add r8b, r9b
cmp al, r8b
jne 0x140399ad0
jmp 0x140399c01
xor eax, eax
test al, al
jne 0x140399c60
jmp 0x140399c32
xor eax, eax
lea rcx, [0x1405471c0]
lea rdx, [0x14044f640]
nop dword [rax + rax]
movzx r8d, byte [rax + rdx]
add byte [rax + rcx], r8b
lea r8d, [rax + 1]
cmp r8d, 0xf
jg 0x140399b89
inc rax
jmp 0x140399b60
mov al, 0xa8
xchg byte [0x140546f50], al
lea rax, [0x140546f40]
jmp 0x140399c08
mov eax, dword [0x14055f49c]
cmp eax, 0x51
jl 0x140399c0c
jmp 0x140399c1f
xor edx, edx
lea rax, [0x140546ba0]
lea rcx, [0x14044f050]
nop dword [rax]
movsxd rdx, edx
movzx r8d, byte [rdx + rcx]
xor byte [rdx + rax], r8b
mov r8d, edx
xor r8d, 1
and edx, 1
lea edx, [r8 + rdx*2]
cmp edx, 6
jl 0x140399bb0
xor eax, eax
nop word cs:[rax + rax]
test al, al
je 0x140399bf5
mov ecx, dword [0x14055f498]
lea edx, [rcx - 1]
imul edx, ecx
test dl, 1
jne 0x140399be0
test al, al
jne 0x140399be4
mov al, 0x63
xchg byte [0x140546ba6], al
lea rax, [0x140546ba0]
pop rbx
pop rdi
pop rsi
ret
mov al, 0xa7
xchg byte [0x1405471d0], al
mov eax, dword [0x14055f49c]
cmp eax, 0x1a
jle 0x140399c29
mov al, 0xa7
xchg byte [0x1405471d0], al
jmp 0x140399c0c
lea rax, [0x1405471c0]
jmp 0x140399c08
mov eax, dword [0x14055f498]
mov ecx, 0x5a062f0c
add ecx, dword [0x140548430]
mov edx, eax
not edx
not ecx
add ecx, edx
add ecx, 0xd5fd80f0
imul ecx, eax
test cl, 1
je 0x140399c6d
nop dword [rax]
mov eax, dword [0x14055f49c]
cmp eax, 0x21
jge 0x140399c60
jmp 0x140399c32
xor edx, edx
lea rax, [0x140546c00]
lea rcx, [0x14044f0b0]
nop dword [rax]
movsxd rdx, edx
movzx r8d, byte [rdx + rcx]
xor byte [rdx + rax], r8b
mov r8d, edx
xor r8d, 1
add edx, edx
and edx, 2
mov r9d, r8d
xor r9d, edx
and edx, r8d
lea edx, [r9 + rdx*2]
cmp edx, 4
jl 0x140399c80
mov eax, dword [0x14055f49c]
mov eax, dword [0x14055f498]
lea ecx, [rax - 1]
imul ecx, eax
test cl, 1
jne 0x140399cb0
mov al, 0x24
xchg byte [0x140546c04], al
mov eax, dword [0x14055f49c]
nop
mov eax, dword [0x14055f49c]
cmp eax, 0x32
jg 0x140399cd0
lea rax, [0x140546c00]
jmp 0x140399c08