Function at 0x597ec0
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov eax, dword [0x80dc74]
mov dword [esp], eax
call fcn.007c74c0
test eax, eax
jne 0x5981b3
mov eax, dword [0x80dc64]
mov esi, 0x7000002b
test eax, eax
je 0x59818a
mov cl, 0xe
mov edx, 0x82
movzx ecx, cl
cmp ecx, 0xe
jne 0x597f11
mov cl, byte [0x80dc68]
and cl, 1
je 0x5981d5
xor dl, 0xf1
jmp 0x597f26
mov cl, byte [0x80dc68]
and cl, 1
je 0x5981d5
xor dl, 0x87
add dl, 0x6e
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
movzx edx, dl
cmp edx, 0x10
jne 0x597f7f
test esi, esi
setne dl
imul esi, esi
and esi, 3
cmp esi, 2
sete bl
or bl, dl
movzx edx, bl
shl edx, 5
lea esi, [esp + 0x10]
mov dword [esp + 0xc], esi
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.0066bfd0
test eax, eax
jne 0x597ffd
mov ecx, eax
or ecx, 2
mov edx, eax
xor edx, 2
add edx, ecx
jne 0x597fb5
jmp 0x597ffd
test esi, esi
setne dl
mov edi, esi
or edi, 2
xor esi, 2
add esi, edi
setne bl
and bl, dl
movzx edx, bl
shl edx, 5
lea esi, [esp + 0x10]
mov dword [esp + 0xc], esi
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.0066bfd0
test eax, eax
jne 0x597ffd
mov edx, 0xa
add dl, 0x17
mov eax, dword [esp + 0x2c]
mov ecx, 0xc8
movzx edx, dl
cmp edx, 0x1a
je 0x598058
cmp edx, 0x6e
jne 0x59807f
mov ecx, 0xfa
add ecx, 4
mov dl, cl
add dl, 0x1c
movzx ebx, dl
sub ebx, ecx
xor bl, 0x3c
mov ecx, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 3
jmp 0x598073
xor ecx, ecx
mov edx, eax
not edx
and edx, 1
mov edi, 0x7000002b
jmp 0x598040
mov esi, ecx
or esi, 2
mov ebp, ecx
xor ebp, 2
add ebp, esi
setne bh
movzx esi, bh
add ecx, esi
mov esi, eax
add esi, edx
mov esi, 0x7000000a
cmovne esi, edi
cmp eax, 2
mov ebp, 0x7000000a
cmove esi, ebp
test bl, bl
cmovne esi, edi
mov ebp, 3
sub ebp, ecx
xor ebp, ecx
setne bh
movzx ebp, bh
cmp ecx, ebp
jb 0x598010
jmp 0x59818a
mov ebx, 0xc8
xor ebx, 0xa0
add ebx, ecx
add bl, 0xf0
mov ecx, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete cl
movzx ecx, cl
cmp eax, ecx
je 0x5980b7
jmp 0x598096
add cl, 0x58
mov edx, eax
and edx, 1
inc edx
xor edx, eax
sete dl
movzx edx, dl
cmp eax, edx
mov bl, cl
je 0x5980b7
mov ecx, dword [esp + 0x10]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 8], 0
call fcn.0066d050
mov esi, 0x7000002b
test eax, eax
jne 0x598100
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebp
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0066cff0
mov ecx, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sete cl
movzx ecx, cl
mov esi, 0x7000002b
cmp eax, ecx
jne 0x598100
xor esi, esi
cmp dword [edi], ebp
je 0x598100
mov esi, 0x7000002b
movzx eax, bl
cmp eax, 0xd
je 0x59817e
xor edi, edi
cmp eax, 0x36
je 0x59813d
mov ebx, 3
jmp 0x59816e
mov eax, edi
not eax
and eax, 1
add eax, edi
setne al
movzx eax, al
add edi, eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call fcn.0066d030
mov eax, edi
and eax, 1
xor eax, edi
cmp eax, 0xffffffff
setne al
movzx eax, al
cmp edi, eax
jb 0x598120
jmp 0x59818a
inc edi
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call fcn.0066d030
dec ebx
mov eax, edi
xor eax, ebx
setne al
movzx eax, al
cmp edi, eax
jb 0x598160
jmp 0x59818a
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call fcn.0066d030
mov eax, dword [0x80dc74]
mov dword [esp], eax
call fcn.007c74e0
mov ecx, eax
and ecx, 1
inc ecx
xor ecx, eax
sete cl
movzx ecx, cl
cmp eax, ecx
jne 0x5981c4
mov eax, esi
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp], str.Failed_to_lock_fridge_mutex_n
call fcn.00441610
call fcn.0044c0d0
mov dword [esp], str.Failed_to_unlock_fridge_mutex_n
call fcn.00441610
call fcn.0044c0d0
mov dword [esp], str.Fridge_write_outside_a_transaction_n
call fcn.00441610
call fcn.0044c0e0
int3