Function at 0x57fd70
Capabilities:
Encrypt data using speck

Disassembly:
sub esp, 0x18
push esi
mov esi, ecx
mov al, byte [esi + 0x1aeb]
test al, al
jne 0x580620
mov al, byte [esi + 0x1aea]
test al, al
jne 0x580620
mov al, byte [esi + 0xb8]
test al, al
mov byte [esp + 0xc], 0
mov byte [esp + 8], 0
mov byte [esp + 0x10], 0
mov byte [esp + 0x14], 0
jne 0x57fddb
mov ecx, dword [esi + 0x1af8]
test ecx, ecx
je 0x57fddb
mov eax, dword [esi + 0x1afc]
test eax, eax
je 0x57fddb
cmp ecx, dword [esi + 0xbc]
jne 0x57fdd4
cmp eax, dword [esi + 0xc0]
je 0x57fddb
mov byte [esi + 0xb8], 1
mov al, byte [esi + 0x54]
push ebx
push edi
mov byte [0x8ce005], al
xor bl, bl
jmp 0x57fdf0
movsx ecx, byte [esi + 0x15d]
imul ecx, ecx, 0xe2
movsx eax, bl
lea edi, [eax + eax*8]
shl edi, 1
lea eax, [ecx + edi]
mov cl, byte [eax + 0x8ce012]
test cl, cl
je 0x57fed5
cmp cl, 1
je 0x57fed5
push 0
push 1
lea edx, [eax + str.FES_PLA]
push edx
mov ecx, 0xc1b340
call fcn.006a0050
push eax
call fcn.0071a0e0
fstp st(0)
movsx eax, byte [esi + 0x15d]
fild dword [esi + 0xc0]
imul eax, eax, 0xe2
fstp dword [esp + 0x2c]
movsx ecx, word [eax + edi + 0x8ce020]
mov dword [esp + 0x18], ecx
add esp, 8
mov ecx, esi
fild dword [esp + 0x10]
fstp dword [esp]
call fcn.00573410
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 5
jp 0x57febb
movsx edx, byte [esi + 0x15d]
fild dword [esi + 0xc0]
imul edx, edx, 0xe2
fstp dword [esp + 0xc]
movsx eax, word [edx + edi + 0x8ce020]
add eax, 0x1a
mov dword [esp + 0x20], eax
push ecx
mov ecx, esi
fild dword [esp + 0x24]
fstp dword [esp]
call fcn.00573410
fcomp dword [esp + 0xc]
fnstsw ax
test ah, 0x41
je 0x57fee5
mov al, byte [esi + 0xb8]
test al, al
je 0x57fed5
movsx eax, byte [0x8ce005]
mov dword [esi + 0x1b04], eax
mov dword [esi + 0x54], eax
inc bl
cmp bl, 0xc
jl 0x57fdf0
jmp case.0x57ff72.27
test byte [0xba82bc], 1
jne 0x57ff08
mov eax, dword [0xba82bc]
movsx ecx, byte [esi + 0x15d]
or eax, 1
mov dword [0xba82bc], eax
mov dword [0xba82b8], ecx
mov dl, byte [esi + 0x1b04]
mov ecx, dword [esi + 0x1af8]
test ecx, ecx
movsx eax, bl
mov byte [0x8ce004], dl
mov dword [esi + 0x1b04], eax
je 0x57ff4b
mov edx, dword [esi + 0x1afc]
test edx, edx
je 0x57ff4b
cmp ecx, dword [esi + 0xbc]
jne 0x57ff41
cmp edx, dword [esi + 0xc0]
je 0x57ff4b
mov dword [esi + 0x54], eax
mov byte [esi + 0xb8], 1
movsx ecx, byte [esi + 0x15d]
imul ecx, ecx, 0xe2
lea edx, [eax + eax*8]
movzx eax, byte [ecx + edx*2 + 0x8ce012]
add eax, 0xffffffe5
cmp eax, 0x23
ja case.0x57ff72.30
movzx eax, byte [eax + 0x580630]
jmp dword [eax*4 + 0x580628]
mov dword [esi + 0x1b00], 2
mov al, byte [esi + 0xb8]
test al, al
je 0x57ffd2
movsx ecx, byte [0x8ce005]
mov eax, dword [esi + 0x54]
cmp ecx, eax
je 0x57ffd2
movsx edx, byte [esi + 0x15d]
imul edx, edx, 0xe2
lea ecx, [eax + eax*8]
cmp byte [edx + ecx*2 + 0x8ce012], 1
jne 0x57ffbf
inc eax
mov dword [esi + 0x54], eax
inc dword [esi + 0x1b04]
push 0x3f800000
push 0
push 3
mov ecx, 0xb6bc90
call fcn.00506ea0
mov eax, dword [esi + 0xc0]
mov edx, dword [esi + 0xbc]
mov ecx, dword [esi + 0xe4]
mov dword [esi + 0x1afc], eax
mov eax, dword [esi + 0xe0]
test eax, eax
mov dword [esi + 0x1af8], edx
mov dword [esi + 0xbc], eax
mov dword [esi + 0xc0], ecx
jge 0x580010
mov dword [esi + 0xbc], 0
mov eax, dword [0xc17044]
cmp dword [esi + 0xbc], eax
jle 0x580023
mov dword [esi + 0xbc], eax
test ecx, ecx
jge 0x580031
mov dword [esi + 0xc0], 0
mov eax, dword [0xc17048]
cmp dword [esi + 0xc0], eax
jle 0x580044
mov dword [esi + 0xc0], eax
cmp byte [esi + 0x15d], 0x26
mov byte [esp + 0xc], 0
jne 0x580076
mov al, byte [esi + 0x1aea]
test al, al
jne 0x5803cf
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x14]
push edx
mov ecx, esi
call fcn.0057ef50
jmp 0x5803cf
mov ecx, esi
call fcn.00573e70
cmp al, 1
jbe 0x5800bb
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.005773d0
mov ecx, esi
call fcn.005738b0
test al, al
je 0x5800a4
mov byte [esp + 0x1c], 1
jmp 0x5800b4
mov ecx, esi
call fcn.00573840
test al, al
je 0x5800bb
mov byte [esp + 0x18], 1
mov byte [esi + 0xb8], 0
mov eax, dword [esi + 0x54]
test eax, eax
jne 0x58011e
cmp byte [esi + 0x15d], 0x29
jne 0x58011e
push 0
call fcn.0053fb70
add esp, 4
cmp word [0xb733cc], 0
jne 0x5800e9
cmp word [0xb7315c], 0
jne 0x5800fd
cmp word [0xb733ea], 0
jne 0x580104
cmp word [0xb7317a], 0
je 0x580104
mov al, byte [esi + 0x30]
test al, al
jl 0x58016f
push 0
call fcn.0053fb70
add esp, 4
cmp word [eax + 0x20], 0
jne 0x58017b
cmp word [eax + 0x50], 0
je 0x58017b
jmp 0x58016f
push 0
call fcn.0053fb70
add esp, 4
cmp word [0xb733cc], 0
je 0x58013c
cmp word [0xb7315c], 0
je 0x580150
cmp word [0xb733ea], 0
je 0x580157
cmp word [0xb7317a], 0
jne 0x580157
mov al, byte [esi + 0x30]
test al, al
jl 0x58016f
push 0
call fcn.0053fb70
add esp, 4
cmp word [eax + 0x20], 0
je 0x58017b
cmp word [eax + 0x50], 0
jne 0x58017b
mov byte [esi + 0xb8], 0
mov byte [esp + 0x10], 1
push 0
call fcn.0053fb70
mov al, byte [0xb73418]
add esp, 4
test al, al
jne 0x5801dd
mov al, byte [0xb7342c]
test al, al
je 0x5801dd
mov eax, dword [esi + 0x1b00]
sub eax, 2
jne 0x5801dd
cmp byte [esi + 0x15d], 5
jne 0x5801ce
fild dword [esi + 0xc0]
push 0x43c20000
mov ecx, esi
fstp dword [esp + 0x24]
call fcn.00573410
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 5
jp 0x5801dd
jmp 0x5801d8
mov al, byte [esi + 0xb8]
test al, al
je 0x5801dd
mov byte [esp + 0x10], 1
mov bl, byte [0xb73418]
push 0
call fcn.0053fb70
add esp, 4
test bl, bl
je case.default.0x580206
mov eax, dword [esi + 0x1b00]
add eax, 0xfffffffa
cmp eax, 9
ja case.default.0x580206
movzx edx, byte [eax + 0x58065c]
jmp dword [edx*4 + 0x580654]
push 1
jmp 0x580213
push 0xffffffffffffffff
mov ecx, esi
call fcn.00573440
push 0
call fcn.0053fb70
mov al, byte [0xb73418]
add esp, 4
test al, al
je 0x58023a
mov al, byte [0xb7342c]
test al, al
je 0x5802ff
push 0
call fcn.0053fb70
add esp, 4
cmp word [0xb733ba], 0
je 0x58025c
cmp word [0xb7314a], 0
je 0x5802ff
push 0
call fcn.0053fb70
add esp, 4
cmp word [0xb733bc], 0
je 0x58027e
cmp word [0xb7314c], 0
je 0x5802ff
push 0
call fcn.0053fb70
add esp, 4
cmp word [eax + 0x14], 0
je 0x580296
cmp word [eax + 0x44], 0
je 0x5802ff
push 0
call fcn.0053fb70
add esp, 4
mov ecx, eax
call fcn.004410e0
test al, al
jne 0x5802ff
push 0
call fcn.0053fb70
add esp, 4
mov ecx, eax
call fcn.005409b0
test al, al
jne 0x5802ff
push 0
call fcn.0053fb70
add esp, 4
mov ecx, eax
call fcn.005409e0
test al, al
jne 0x5802ff
push 0
call fcn.0053fb70
add esp, 4
mov ecx, eax
call fcn.0057c400
test al, al
jne 0x5802ff
push 0
call fcn.0053fb70
add esp, 4
mov ecx, eax
call fcn.0057c420
test al, al
je case.0x580329.30
movsx ecx, byte [esi + 0x15d]
mov eax, dword [esi + 0x54]
imul ecx, ecx, 0xe2
lea edx, [eax + eax*8]
movzx eax, byte [ecx + edx*2 + 0x8ce012]
add eax, 0xffffffe5
cmp eax, 0x23
ja case.0x580329.30
movzx eax, byte [eax + 0x580674]
jmp dword [eax*4 + 0x580668]
push 0x3f800000
push 0
push 5
jmp 0x580344
push 0x3f800000
push 0
push 1
mov ecx, 0xb6bc90
call fcn.00506ea0
push 0
call fcn.0053fb70
add esp, 4
cmp word [eax + 0x1e], 0
je 0x580366
cmp word [eax + 0x4e], 0
je 0x580384
push 0
call fcn.0053fb70
add esp, 4
cmp word [0xb733a8], 0
je 0x5803b2
cmp word [0xb73138], 0
jne 0x5803b2
mov al, byte [esi + 0x15d]
cmp al, 0x22
je 0x5803b2
cmp al, 0x29
je 0x5803b2
cmp al, 0x10
je 0x5803b2
cmp al, 0x16
je 0x5803b2
cmp al, 0x12
je 0x5803b2
cmp al, 0xe
je 0x5803b2
cmp al, 0x2b
je 0x5803b2
mov byte [esi + 0xb8], 0
mov byte [esp + 0x14], 1
mov al, byte [esp + 0x1c]
test al, al
jne 0x5803ca
mov al, byte [esp + 0x18]
test al, al
jne 0x5803ca
mov al, byte [esp + 0x10]
test al, al
je 0x5803cf
mov byte [esp + 0x14], 0
push 0
call fcn.0053fb70
add esp, 4
cmp word [0xb733ba], 0
jne 0x5804bd
push 0
call fcn.0053fb70
push 0
call fcn.0053fb70
add esp, 8
mov ecx, eax
call fcn.0053fc90
test ax, ax
jl 0x5804bd
push 0
call fcn.0053fb70
add esp, 4
cmp word [eax + 0x14], 0
jne 0x5804bd
push 0
call fcn.0053fb70
add esp, 4
cmp word [0xb733bc], 0
jne 0x580463
push 0
call fcn.0053fb70
push 0
call fcn.0053fb70
add esp, 8
mov ecx, eax
call fcn.0053fc90
test ax, ax
jg 0x580463
push 0
call fcn.0053fb70
add esp, 4
cmp word [eax + 0x16], 0
je 0x580510
mov ecx, dword [0xb7cb7c]
mov edi, dword [0xba82b4]
mov edx, ecx
sub edx, edi
cmp edx, 0xc8
jbe 0x580510
movsx edx, byte [esi + 0x15d]
mov eax, dword [esi + 0x54]
imul edx, edx, 0xe2
lea eax, [eax + eax*8]
movzx eax, byte [edx + eax*2 + 0x8ce012]
add eax, 0xffffffeb
cmp eax, 0x29
ja case.0x5804a9.22
movzx edx, byte [eax + 0x5806a0]
jmp dword [edx*4 + 0x580698]
mov byte [esp + 0xc], 1
mov dword [0xba82b4], ecx
jmp 0x580510
mov ecx, dword [0xb7cb7c]
mov edi, dword [0xba82b0]
mov eax, ecx
sub eax, edi
cmp eax, 0xc8
jbe 0x580510
movsx edx, byte [esi + 0x15d]
mov eax, dword [esi + 0x54]
imul edx, edx, 0xe2
lea eax, [eax + eax*8]
movzx eax, byte [edx + eax*2 + 0x8ce012]
add eax, 0xffffffeb
cmp eax, 0x29
ja case.0x5804fe.22
movzx edx, byte [eax + 0x5806d4]
jmp dword [edx*4 + 0x5806cc]
mov byte [esp + 0xc], 0xff
mov dword [0xba82b0], ecx
push 0
call fcn.0053fb70
mov al, byte [0xb7341b]
add esp, 4
test al, al
pop edi
pop ebx
je 0x58053e
mov al, byte [0xb7342f]
test al, al
jne 0x58053e
cmp byte [esi + 0x15d], 5
je 0x580568
mov byte [esp + 4], 1
jmp 0x580568
push 0
call fcn.0053fb70
mov al, byte [0xb7341c]
add esp, 4
test al, al
je 0x580568
mov al, byte [0xb73430]
test al, al
jne 0x580568
cmp byte [esi + 0x15d], 5
je 0x580568
mov byte [esp + 4], 0xff
mov ecx, esi
call fcn.00573990
test al, al
je 0x580581
mov byte [esi + 0xb8], 0
mov byte [esp + 4], 1
jmp 0x5805a2
mov ecx, esi
call fcn.00573920
test al, al
je 0x58059a
mov byte [esi + 0xb8], 0
mov byte [esp + 4], 0xff
jmp 0x5805a2
mov al, byte [esp + 4]
test al, al
je case.0x5805e6.2
mov al, byte [esi + 0x15d]
cmp al, 3
je 0x5805c0
cmp al, 0x1a
je 0x5805c0
cmp al, 4
je 0x5805c0
cmp al, 0x1b
je 0x5805c0
cmp al, 0x24
je 0x5805c0
cmp al, 0x27
jne case.0x5805e6.2
movsx ecx, al
mov eax, dword [esi + 0x54]
imul ecx, ecx, 0xe2
lea edx, [eax + eax*8]
movzx eax, byte [ecx + edx*2 + 0x8ce012]
add eax, 0xfffffffe
cmp eax, 0x3c
ja case.0x5805e6.3
movzx eax, byte [eax + 0x580708]
jmp dword [eax*4 + 0x580700]
push 0x3f800000
push 0
push 1
mov ecx, 0xb6bc90
call fcn.00506ea0
mov ecx, dword [esp + 4]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push ecx
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push edx
mov ecx, esi
call fcn.0057b480
pop esi
add esp, 0x18
ret