Function at 0x551210
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x78
mov eax, 0x14e18a28
cmp dword [esp + 0x8c], 0x20
jne 0x551305
mov edx, dword [esp + 0x98]
test edx, edx
mov ebp, 0x700002bb
je 0x551529
mov dword [esp + 0x48], ecx
xor ecx, ecx
test cl, cl
jne 0x551529
mov ecx, dword [esp + 0x9c]
add al, 0xfa
mov esi, dword [ecx + 0xc]
shl esi, 0x18
or esi, dword [ecx + 8]
mov dword [esp + 0x24], esi
movzx eax, al
cmp eax, 0x20
je 0x55144f
mov ecx, 0xa
mov ebp, 0x700002bb
cmp eax, 0x22
jne 0x5514a6
mov dword [esp + 0x5c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov byte [esp + 0x47], al
mov byte [esp + 0x56], al
mov byte [esp + 0x57], al
mov byte [esp + 0x23], al
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x50], eax
mov byte [esp + 0x4f], bl
cmp ecx, 0xa
jne 0x551529
mov eax, ecx
not eax
and eax, 1
add eax, ecx
je 0x551529
mov ecx, 0x17
mov esi, dword [edx]
mov ebp, 0x700002bb
test esi, esi
jne 0x551982
mov eax, 3
sub eax, esi
xor eax, esi
jne 0x551529
jmp 0x551982
mov esi, dword [esp + 0x90]
mov edi, 0x64b396a1
and eax, 0x8fade376
and edi, 0x8fade376
lea eax, [edi + eax - 0x9430437]
movsd xmm0, qword [0x7dc5e0]
movsd qword [esp + 0x6c], xmm0
movsd xmm0, qword [0x7dc5d8]
movsd qword [esp + 0x64], xmm0
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], edx
mov ecx, dword [esi + 0xc]
shl ecx, 0x18
or ecx, dword [esi + 8]
mov dword [esp + 0x74], ecx
mov ecx, dword [esi + 4]
cmp ecx, 6
je 0x5513ea
cmp ecx, 0x23
je 0x55139f
cmp ecx, 0x32
jne 0x5513d1
lea edi, [esp + 0x64]
mov dword [esp + 0x64], 3
mov dword [esp + 0x70], 0
mov dword [esp], edi
mov dword [esp + 4], 0
call fcn.00595480
inc dword [esp + 0x64]
mov dword [esp + 0x74], 3
jmp 0x551433
lea edi, [esp + 0x64]
mov dword [esp + 0x64], 3
mov dword [esp + 0x70], 0
mov dword [esp], edi
mov dword [esp + 4], 0
call fcn.00595480
inc dword [esp + 0x64]
mov dword [esp + 0x74], 1
jmp 0x551433
mov ecx, 0xffffffff
lea edi, [esp + 0x64]
jmp 0x5513e5
mov eax, 0x12
add ecx, 1
jb 0x5513e0
cmp eax, 9
jne 0x551433
mov ebp, 0xffffffff
lea ebx, [esp + 0x64]
jmp 0x55142e
mov dword [esp + 0x64], 3
mov dword [esp + 0x70], 0
mov dword [esp], ebx
mov dword [esp + 4], 0
call fcn.00595480
inc dword [esp + 0x64]
mov dword [esp + 0x74], 2
mov edi, ebx
add ebp, 1
jb 0x551400
mov eax, dword [esp + 0x94]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00594590
jmp 0x55152b
mov esi, dword [edx]
mov ebp, 0x700002bb
test esi, esi
jne 0x5514f0
mov eax, 3
sub eax, esi
xor eax, esi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
mov byte [esp + 0x23], al
mov byte [esp + 0x47], al
mov dword [esp + 0x60], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x38], eax
jne 0x551529
jmp 0x551995
mov ebx, 0x10
mov dword [esp + 0x5c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
mov byte [esp + 0x2b], al
mov byte [esp + 0x57], al
mov byte [esp + 0x4f], al
mov byte [esp + 0x56], al
mov byte [esp + 0x47], al
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x58], eax
jmp 0x5516c4
mov dword [esp + 0x5c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
mov byte [esp + 0x23], al
mov byte [esp + 0x47], al
mov dword [esp + 0x60], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x38], eax
jmp 0x551995
mov eax, ebp
add esp, 0x78
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 8
mov edx, dword [esp + 0x98]
mov esi, dword [edx]
mov ebp, 0x700002bb
test esi, esi
jne 0x55156f
mov ecx, 0x10
mov edx, esi
or edx, 2
mov edi, esi
xor edi, 2
add edi, edx
mov edi, dword [esp + 0x14]
mov bh, byte [esp + 0x2b]
mov bl, byte [esp + 0x4f]
jne 0x55178b
jmp 0x55157b
mov bh, byte [esp + 0x2b]
mov bl, byte [esp + 0x4f]
mov edi, dword [esp + 0x14]
cmp eax, 8
je 0x551995
xor eax, eax
test al, al
jne 0x551995
mov ebp, 0x7000002b
cmp dword [esp + 0x48], 0
je 0x551529
mov byte [esp + 0x4f], bl
mov eax, 0x13
mov byte [esp + 0x57], 0x77
mov byte [esp + 0x23], 0x6b
jmp 0x551847
mov byte [esp + 0x57], 0x16
mov byte [esp + 0x56], 0x52
mov eax, dword [esi + 0xc]
mov dword [esp + 0x50], eax
mov ecx, dword [eax]
cmp ecx, edx
jne 0x5515e7
mov eax, 0x1d
imul ecx, ecx
and ecx, 3
cmp ecx, 2
jb 0x5515f3
mov esi, dword [esi + 4]
test esi, esi
jne 0x5515c0
jmp 0x551d17
mov byte [esp + 0x2b], bh
jmp 0x551ac6
mov eax, 1
mov byte [esp + 0x56], 0x15
mov edx, dword [esp + 0x50]
test edx, edx
mov bh, byte [esp + 0x2b]
mov bl, byte [esp + 0x4f]
je 0x551a47
mov ecx, edx
imul ecx, ecx
and ecx, 3
cmp ecx, 3
mov dword [esp + 0x58], edx
je 0x551a47
mov dword [esp + 0x14], edi
mov byte [esp + 0x4f], bl
mov byte [esp + 0x2b], bh
mov byte [esp + 0x47], 0x4d
mov eax, dword [esp + 0x58]
lea eax, [eax + 8]
mov dword [esp + 0x60], eax
xor edi, edi
mov eax, dword [esp + 0x9c]
cmp dword [eax], 2
je 0x5516a5
mov eax, 9
mov cl, 1
test cl, cl
je 0x5516a5
mov edi, dword [esp + 0x14]
jmp 0x551a93
mov ebx, 3
mov eax, edi
and eax, 1
xor eax, edi
cmp eax, 0xffffffff
setne al
movzx eax, al
add edi, eax
mov ecx, dword [esp + 0x58]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], 0
call fcn.007c51a0
mov eax, edi
not eax
and eax, 1
add eax, edi
setne al
movzx eax, al
cmp edi, eax
jb 0x551670
mov edi, dword [esp + 0x1c]
mov dl, byte [esp + 0x23]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], edi
mov byte [esp + 0x23], dl
cmp ebx, 3
jne 0x551533
mov eax, 3
sub eax, ebx
xor eax, ebx
je 0x551533
mov bl, byte [esp + 0x4f]
mov edi, dword [esp + 0x14]
jmp 0x551aae
mov dword [esp + 0x14], edi
mov eax, 7
mov ebp, 0x7000002b
mov edi, dword [esp + 0x48]
test edi, edi
jne 0x55173b
mov byte [esp + 0x57], 0x16
mov byte [esp + 0x23], 0x6b
mov ecx, 0xe
mov edx, edi
and edx, 1
xor edx, edi
not edx
test edx, edx
mov edx, dword [esp + 0x98]
mov edi, dword [esp + 0x14]
jne 0x5512c1
jmp 0x551ca5
mov byte [esp + 0x57], 0x16
mov byte [esp + 0x23], 0x6b
mov edi, dword [esp + 0x14]
jmp 0x551ca5
mov dword [esp + 4], 0x1c
mov dword [esp], 1
call fcn.00493840
test eax, eax
mov ebp, 0x70000003
je 0x551529
mov ecx, eax
and ecx, 1
inc ecx
xor ecx, eax
je 0x551529
mov dword [esp + 0x5c], eax
mov ecx, 0x12
mov byte [esp + 0x23], 0x6b
cmp ecx, 0x10
je 0x551529
mov byte [esp + 0x4f], bl
mov eax, ecx
and eax, 1
inc eax
xor eax, ecx
je 0x551529
mov byte [esp + 0x2b], bh
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 0x24]
mov dword [ebx], eax
mov eax, dword [esp + 0x9c]
mov ecx, eax
mov eax, dword [ecx + 0x14]
add eax, dword [ecx + 0x10]
mov dword [ebx + 8], eax
mov dword [esp], eax
mov dword [esp + 4], 1
call fcn.00493840
mov ecx, ebx
mov dword [ecx + 4], eax
test eax, eax
je 0x55182b
xor eax, eax
test al, al
jne 0x55182b
mov al, 0x51
mov edx, dword [esp + 0x9c]
lea ebx, [edx + 0x10]
mov dword [esp + 0x34], ebx
lea edx, [edx + 0x14]
mov dword [esp + 0x30], edx
movzx eax, al
cmp eax, 0x51
mov edx, dword [esp + 0x98]
lea eax, [ecx + 0xc]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], edx
mov ebx, ecx
call fcn.007c5200
mov dword [esp + 0x2c], ebx
mov bh, byte [esp + 0x2b]
jmp 0x551bd7
mov dl, 0x70
mov ecx, 0x1a
mov eax, 0xe
movzx edx, dl
cmp edx, 0x70
mov bh, byte [esp + 0x2b]
jne 0x551b26
cmp eax, 0xe
mov bl, byte [esp + 0x4f]
jne 0x551cb6
xor esi, esi
jmp 0x551882
mov eax, esi
not eax
and eax, 1
add eax, esi
setne al
movzx eax, al
add esi, eax
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call fcn.004936c0
mov ebp, 0x70000003
test esi, esi
je 0x551860
jmp 0x551529
mov byte [esp + 0x47], 0x4d
mov bh, 0x7a
mov eax, dword [esp + 0x9c]
lea ecx, [eax + 0x10]
mov dword [esp + 0x40], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x38], ecx
mov edi, dword [eax + 0x14]
lea eax, [eax + 0x14]
mov dword [esp + 0x3c], eax
lea eax, [edi + ecx]
mov ecx, dword [esp + 0x60]
cmp eax, dword [ecx]
jbe 0x5518d0
mov byte [esp + 0x4f], bl
mov ecx, 3
sub ecx, eax
xor ecx, eax
jne 0x5518d9
jmp 0x551b15
mov byte [esp + 0x4f], bl
jmp 0x551b15
mov ecx, dword [esp + 0x58]
mov ecx, dword [ecx + 4]
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.00492a60
test eax, eax
mov ebp, 0x70000003
mov bl, byte [esp + 0x4f]
je 0x551529
mov ecx, eax
and ecx, 1
inc ecx
xor ecx, eax
je 0x551529
mov dword [esp + 0x1c], eax
mov byte [esp + 0x2b], bh
mov ecx, 0x15
mov eax, dword [esp + 0x58]
lea eax, [eax + 4]
mov dword [esp + 0x18], eax
cmp ecx, 5
jne 0x551937
imul ecx, ecx
and ecx, 3
cmp ecx, 2
jb 0x55188b
mov byte [esp + 0x4f], bl
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
mov edi, dword [esp + 0x3c]
mov eax, dword [edi]
mov ebx, dword [esp + 0x40]
add eax, dword [ebx]
mov ecx, dword [esp + 0x60]
mov ecx, dword [ecx]
sub eax, ecx
add ecx, dword [esp + 0x1c]
mov dword [esp + 8], eax
mov dword [esp], ecx
mov dword [esp + 4], 0
call fcn.007c51a0
mov ecx, 0xe
mov eax, dword [ebx]
mov dword [esp + 0x38], eax
mov edi, dword [edi]
mov bh, byte [esp + 0x2b]
cmp ecx, 0xe
je 0x551b15
xor eax, eax
test al, al
jne 0x551b15
mov edx, dword [esp + 0x24]
mov bl, 0x1b
jmp 0x5515c0
mov ecx, 0xc
mov bh, 0x51
mov edi, eax
not edi
and edi, 1
add edi, eax
setne bl
movzx edi, bl
add eax, edi
mov edi, dword [esp + 0x60]
mov dword [edi], edx
mov edi, eax
and edi, 1
xor edi, eax
cmp edi, 0xffffffff
setne bl
movzx edi, bl
cmp eax, edi
jb 0x5519a0
mov eax, dword [esp + 0x40]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x2c], eax
mov bl, byte [esp + 0x4f]
mov edi, dword [esp + 0x14]
jmp 0x551a22
mov eax, 0x10
mov byte [esp + 0x56], 0x52
mov ebx, dword [esp + 0x50]
test ebx, ebx
jne 0x551a3f
mov ecx, 0x15
mov edx, 3
sub edx, ebx
xor edx, ebx
mov dword [esp + 0x58], ebx
mov bh, byte [esp + 0x2b]
mov bl, byte [esp + 0x4f]
je 0x551a47
cmp ecx, 0xc
jne 0x551d17
mov eax, 3
sub eax, ecx
xor eax, ecx
jne 0x551bdb
jmp 0x551d17
mov bh, byte [esp + 0x2b]
mov bl, byte [esp + 0x4f]
mov ecx, eax
or ecx, 2
mov edx, eax
xor edx, 2
add edx, ecx
setne cl
movzx ecx, cl
cmp eax, ecx
mov eax, dword [esp + 0x50]
mov dword [esp + 0x58], eax
jne 0x55162f
jmp 0x551d17
movzx ecx, byte [esp + 0x56]
cmp ecx, 0x3f
je 0x551c86
mov byte [esp + 0x4f], bl
mov ebx, 4
mov eax, 2
cmp ecx, 0x52
jne 0x551c67
cmp eax, 2
je 0x5515fc
mov ecx, eax
and ecx, 1
inc ecx
xor ecx, eax
je 0x5515fc
mov bl, byte [esp + 0x4f]
mov ecx, 5
mov eax, 0xf
movzx edx, byte [esp + 0x47]
cmp edx, 0x50
je 0x551923
cmp eax, 0xf
jne 0x551a6e
mov byte [esp + 0x47], 0x50
mov bh, 0x7a
mov eax, dword [esp + 0x9c]
lea ecx, [eax + 0x10]
mov dword [esp + 0x40], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x38], ecx
mov edi, dword [eax + 0x14]
lea eax, [eax + 0x14]
mov dword [esp + 0x3c], eax
lea eax, [edi + ecx]
mov ecx, dword [esp + 0x60]
cmp eax, dword [ecx]
ja 0x551d2f
mov byte [esp + 0x4f], bl
mov ecx, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 3
je 0x5518d9
mov ecx, 0xc
movzx eax, bh
cmp eax, 0x51
jne 0x551c17
mov eax, 3
xor ebx, ebx
cmp ecx, 0xc
jne 0x551b6d
sub eax, ecx
xor eax, ecx
je 0x551b6d
mov eax, dword [esp + 0x38]
lea eax, [edi + eax]
jmp 0x551ba9
mov eax, 3
sub eax, ebx
xor eax, ebx
setne al
movzx eax, al
add ebx, eax
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
call fcn.004936c0
mov eax, 3
sub eax, ebx
xor eax, ebx
setne al
movzx eax, al
mov ebp, 0x70000003
cmp ebx, eax
jb 0x551b50
jmp 0x551529
mov dl, 0x7a
mov ecx, ebx
not ecx
and ecx, 1
add ecx, ebx
setne cl
movzx ecx, cl
add ebx, ecx
mov ecx, dword [esp + 0x60]
mov dword [ecx], eax
mov ecx, ebx
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sbb ecx, ecx
and ecx, 1
cmp ebx, ecx
jb 0x551b90
mov eax, dword [esp + 0x40]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x2c], eax
mov bh, dl
mov bl, byte [esp + 0x4f]
movzx eax, bl
cmp eax, 0x1b
jne 0x551c29
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov ecx, dword [esp + 0x9c]
mov ecx, dword [ecx + 0x18]
mov edx, dword [esp + 0x2c]
mov edx, dword [edx + 4]
mov esi, dword [esp + 0x34]
add edx, dword [esi]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call fcn.007c51d0
xor ebp, ebp
jmp 0x551529
xor eax, eax
mov ecx, dword [esp + 0x38]
lea edx, [edi + ecx]
mov dword [esp + 0x14], edi
jmp 0x5519be
mov byte [esp + 0x2b], bh
mov ebx, 0x11
mov byte [esp + 0x4f], 0x1b
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov ecx, dword [esp + 0x9c]
mov ecx, dword [ecx + 0x18]
mov edx, dword [esp + 0x2c]
mov edx, dword [edx + 4]
mov ebp, dword [esp + 0x34]
add edx, dword [ebp]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call fcn.007c51d0
xor ebp, ebp
cmp ebx, 4
jne 0x551529
mov eax, ebx
and eax, 1
xor eax, ebx
not eax
test eax, eax
jne 0x5519f4
jmp 0x551529
mov ecx, 0xa
mov eax, 0xc
mov byte [esp + 0x56], 0x3f
mov edx, dword [esp + 0x50]
test edx, edx
mov dword [esp + 0x58], edx
mov bh, byte [esp + 0x2b]
jne 0x551ccb
cmp eax, 7
jne 0x551d17
mov ecx, eax
or ecx, 2
xor eax, 2
add eax, ecx
je 0x551d17
mov ecx, 5
mov al, byte [esp + 0x23]
movzx eax, al
cmp eax, 0x6b
jne 0x55174e
cmp ecx, 5
je 0x551cda
xor eax, eax
test al, al
je 0x55162f
mov dword [esp + 4], 0x1c
mov dword [esp], 1
call fcn.00493840
test eax, eax
mov ebp, 0x70000003
je 0x551529
xor ecx, ecx
test cl, cl
jne 0x551529
mov byte [esp + 0x4f], bl
mov dword [esp + 0x5c], eax
mov byte [esp + 0x23], 0x21
jmp 0x5517a6
mov eax, 0x16
movzx ecx, byte [esp + 0x57]
cmp ecx, 0x16
jne 0x5516f5
jmp 0x55157b
mov byte [esp + 0x4f], bl
jmp 0x5518d9