Function at 0x459370
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x68
mov ebx, dword [esp + 0x7c]
mov byte [esp + 0x43], 0x75
mov dword [esp + 0x64], 0
mov ebp, dword [ebx]
mov eax, dword [ebx + 8]
mov ecx, eax
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sbb ecx, ecx
and ecx, 1
cmp eax, ecx
jne 0x459441
mov byte [esp + 0x37], 0x30
xor ecx, ecx
mov eax, 0x95
add eax, 0xffffff86
jmp 0x4593f0
mov edx, ecx
not edx
and edx, 1
add edx, ecx
setne dl
movzx edx, dl
add ecx, edx
movzx edx, byte [ebp]
shl edx, 0x18
movzx esi, byte [ebp + 1]
shl esi, 0x10
or esi, edx
movzx edx, byte [ebp + 2]
shl edx, 8
or edx, esi
movzx edi, byte [ebp + 3]
or edi, edx
mov edx, ecx
imul edx, edx
and edx, 3
cmp edx, 2
sbb edx, edx
and edx, 1
cmp ecx, edx
jb 0x4593c0
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x3c], ecx
cmp eax, 0x10
jne 0x459a8a
mov ecx, 3
sub ecx, eax
mov dword [esp + 0x24], 0
xor ecx, eax
jne case.0x459508.0
jmp 0x459a8a
mov byte [esp + 0x37], 0x30
mov edx, 8
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x24], 0
cmp edx, 2
je case.0x459508.0
xor edx, edx
test dl, dl
jne case.0x459508.0
mov ecx, 0x1a
movzx eax, byte [esp + 0x43]
cmp eax, 0x54
je case.0x4599d1.1
mov eax, 0x3a
add eax, 0xffffffdd
jmp 0x4594c0
mov cl, al
add cl, 0x5e
mov byte [esp + 0x43], cl
mov ecx, edx
or ecx, 2
mov edi, edx
xor edi, 2
add edi, ecx
setne cl
movzx ecx, cl
add edx, ecx
mov edi, dword [ebp]
mov ecx, 3
sub ecx, edx
xor ecx, edx
setne cl
movzx ecx, cl
cmp edx, ecx
jb 0x4594a0
jmp 0x45994d
mov eax, 0x10
mov dword [esp + 0x24], 0
mov esi, dword [esp + 0x90]
cmp esi, 0x1a
ja case.default.0x459508
mov byte [esp + 0x37], 0x79
mov ecx, 9
mov edx, 0xb
mov dword [esp + 0x20], 7
jmp dword [esi*4 + 0x7d7e04]
mov byte [esp + 0x37], 0x79
cmp esi, 0x32
je case.0x459508.0
cmp eax, 4
jne 0x459531
mov ecx, eax
not ecx
and ecx, 1
mov dword [esp + 0x24], 0
add ecx, eax
jne case.0x459508.0
mov dword [esp + 0x24], 1
mov eax, dword [esp + 0x80]
lea ecx, [esp + 0x60]
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0x64]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0064bea0
mov ecx, eax
and ecx, 1
inc ecx
xor ecx, eax
sete cl
movzx ecx, cl
cmp eax, ecx
jne 0x4595d8
mov al, 0x4c
movzx eax, al
cmp eax, 0x4c
jne 0x45968a
movsd xmm0, qword [ebx + 0x10]
movsd qword [esp + 0x58], xmm0
movsd xmm0, qword [ebx]
movsd xmm1, qword [ebx + 8]
movsd qword [esp + 0x50], xmm1
movsd qword [esp + 0x48], xmm0
mov eax, dword [esp + 0x60]
mov dword [esp + 0x30], eax
lea ecx, [eax + 0x18]
cmp ecx, edi
jbe 0x4596df
mov eax, ecx
imul eax, eax
and eax, 3
cmp eax, 2
jae 0x4596df
mov dword [esp + 0x44], ecx
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], eax
jmp 0x459753
mov dword [esp + 0x3c], 0x2bb
cmp dword [esp + 0x94], 0
je 0x459977
mov esi, ebx
xor ebx, ebx
mov eax, 0xe8
add eax, 0xffffff25
mov dword [esp + 0x44], eax
jmp 0x45964a
mov eax, ebx
and eax, 1
xor eax, ebx
cmp eax, 0xffffffff
setne al
movzx eax, al
add ebx, eax
mov dword [esp], esi
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 3
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call fcn.0040a050
mov eax, ebx
imul eax, eax
and eax, 3
cmp eax, 2
sbb eax, eax
and eax, 1
cmp ebx, eax
jb 0x459610
mov dword [esp + 0x3c], 0x2bb
mov ebx, esi
mov edx, dword [esp + 0x44]
cmp edx, 0xb
jne 0x459977
mov eax, edx
or eax, 2
xor edx, 2
add edx, eax
jne case.0x459508.0
jmp 0x459977
movsd xmm0, qword [ebx + 0x10]
movsd qword [esp + 0x58], xmm0
movsd xmm0, qword [ebx]
movsd xmm1, qword [ebx + 8]
movsd qword [esp + 0x50], xmm1
movsd qword [esp + 0x48], xmm0
mov eax, dword [esp + 0x60]
mov dword [esp + 0x30], eax
lea ecx, [eax + 0x18]
cmp ecx, edi
jbe 0x4596df
mov eax, ecx
imul eax, eax
and eax, 3
cmp eax, 2
jae 0x4596df
mov dword [esp + 0x44], ecx
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], 0x1c
jmp case.0x4599d1.8
mov dword [esp + 0x44], ecx
mov eax, ebx
mov dword [esp + 0x2c], 0
mov ecx, 0x86
add ecx, 0xffffff7d
mov dword [esp + 0x20], ecx
xor ecx, ecx
jmp 0x459716
mov edx, ecx
or edx, 2
mov ebx, ecx
xor ebx, 2
add ebx, edx
setne dl
movzx edx, dl
add ecx, edx
mov esi, dword [eax]
mov edx, ecx
imul edx, edx
and edx, 3
test ecx, ecx
je 0x459700
cmp edx, 3
je 0x459700
mov dword [esp + 0x38], esi
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x28], ecx
mov ebx, eax
mov esi, dword [esp + 0x20]
mov ecx, esi
imul ecx, ecx
and ecx, 3
cmp ecx, 2
sbb ecx, ecx
and ecx, 1
cmp esi, ecx
je case.0x459508.0
jmp 0x459787
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.004939e0
mov esi, eax
mov dword [esp + 0x38], esi
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [esp + 8], 0x18
call fcn.007c51d0
mov eax, dword [esp + 0x60]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], 0x1b
mov eax, dword [esp + 0x64]
mov esi, dword [esp + 0x38]
lea ecx, [esi + 0x18]
mov edx, dword [esp + 0x30]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.007c51d0
mov dword [ebx], esi
mov eax, dword [esp + 0x44]
mov dword [ebx + 4], eax
mov eax, dword [ebx + 8]
cmp eax, 1
jne case.0x4599d1.12
mov ecx, 3
sub ecx, eax
xor ecx, eax
je case.0x4599d1.12
mov cl, 0x5c
mov esi, 7
mov eax, 0xa
movzx ecx, cl
cmp ecx, 0xe
je case.0x4599d1.4
cmp eax, 0xa
je 0x4597f9
xor eax, eax
test al, al
je 0x459977
mov ecx, dword [esp + 0x44]
mov eax, ecx
shr eax, 0x18
mov edx, dword [esp + 0x38]
jmp 0x4599fc
mov edx, eax
and edx, 1
xor edx, eax
cmp edx, 0xffffffff
setne dl
movzx edx, dl
add eax, edx
mov edx, dword [esp + 0x44]
mov dword [esi], edx
mov edx, 3
sub edx, eax
xor edx, eax
setne dl
movzx edx, dl
cmp eax, edx
jb 0x459810
cmp ecx, 9
je case.0x459508.0
mov esi, dword [esp + 0x84]
mov eax, dword [esp + 0x64]
mov dword [esp], eax
call fcn.00689a80
lea eax, [ebx + 0x46d]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], pe_nt_image_headers32
call fcn.004959f0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.005a9e50
mov dword [esp + 0x3c], eax
movsd xmm0, qword [esp + 0x58]
movsd qword [ebx + 0x10], xmm0
movsd xmm0, qword [esp + 0x48]
movsd xmm1, qword [esp + 0x50]
movsd qword [ebx + 8], xmm1
movsd qword [ebx], xmm0
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call fcn.004936c0
mov ecx, dword [esp + 0x94]
mov eax, ecx
imul eax, eax
and eax, 3
cmp eax, 3
sete al
movzx eax, al
cmp ecx, eax
je 0x459977
mov al, 0x59
movzx eax, al
cmp eax, 0x3a
jne 0x459932
mov dword [esp + 0x20], 0x15
mov ecx, dword [esp + 0x3c]
mov eax, ecx
imul eax, eax
and eax, 3
cmp eax, 2
sete al
movzx eax, al
cmp ecx, eax
je 0x459967
mov ecx, dword [esp + 0x20]
cmp ecx, 7
je case.0x459508.0
mov eax, ecx
and eax, 1
inc eax
xor eax, ecx
jne 0x459983
jmp case.0x459508.0
mov eax, 9
mov edx, dword [esp + 0x3c]
mov ecx, edx
and ecx, 1
inc ecx
xor ecx, edx
sete cl
movzx ecx, cl
cmp edx, ecx
jne 0x459983
cmp eax, 9
jne 0x459a8a
mov ecx, eax
and ecx, 1
xor ecx, eax
not ecx
test ecx, ecx
je 0x459a8a
mov dword [esp], ebx
call fcn.00409fd0
mov dword [esp + 0x3c], 0
mov eax, dword [esp + 0x3c]
add esp, 0x68
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp], ebx
call fcn.0040a2e0
mov eax, 0x1a
jmp 0x4597ea
mov ecx, 0xa
mov byte [esp + 0x37], 0x30
mov eax, dword [esp + 0x90]
cmp eax, 0x1a
ja case.default.0x4599d1
mov esi, 1
mov edx, 2
mov dword [esp + 0x1c], 0xf
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x24], 0
jmp dword [eax*4 + 0x7d7e70]
mov ecx, 3
sub ecx, esi
xor ecx, esi
setne cl
movzx ecx, cl
cmp esi, ecx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x38]
je case.0x459508.0
mov eax, ecx
shr eax, 0x18
mov byte [edx], al
mov eax, ecx
shr eax, 0x10
mov byte [edx + 1], al
mov byte [edx + 2], ch
mov byte [edx + 3], cl
jmp 0x459844
cmp dword [esp + 0x20], 0x10
je case.0x459508.0
xor eax, eax
test al, al
jne case.0x459508.0
xor eax, eax
mov ecx, 0x33
add ecx, 0xffffffe5
mov esi, dword [esp + 0x38]
jmp 0x459828
mov eax, dword [esp + 0x1c]
cmp eax, 0xf
je case.0x459508.0
imul eax, eax
and eax, 3
cmp eax, 2
jne 0x459753
jmp case.0x459508.0
mov edx, eax
mov eax, 4
cmp edx, 0x32
je case.0x459508.1
cmp ecx, 0xa
je 0x459531
imul ecx, ecx
and ecx, 3
cmp ecx, 2
je 0x459531
mov byte [esp + 0x43], 0x54
mov edi, dword [ebp]
movzx eax, byte [esp + 0x37]
cmp eax, 0x79
je 0x459995
jmp 0x4594d8