Function at 0x477262
Capabilities:
Encrypt data using speck

Disassembly:
mov dword [ebp - 0xc], 1
test al, 0x40
je 0x477231
or dword [ebp - 0xc], 0x4000000
or dword [ebp - 8], 0x10000
cmp dword [ebp - 0x28], 2
jne 0x477231
or dword [ebp - 0x10], 4
test ax, 0x1000
je 0x47723a
or dword [ebp - 0xc], edi
test al, 0x20
je 0x477250
or dword [ebp - 0xc], 0x8000000
jmp 0x47725b
test al, 0x10
je 0x47725b
or dword [ebp - 0xc], 0x10000000
call 0x4ef208
cmp eax, 0xffffffff
invalid
mov dword [esi], eax
jne 0x477281
call 0x4e33d1
mov dword [eax], ebx
or dword [esi], 0xffffffff
call 0x4e33c8
mov dword [eax], 0x18
jmp 0x47730f
mov eax, dword [ebp + 8]
mov edi, dword [0x483360]
push ebx
push dword [ebp - 0xc]
mov dword [eax], 1
push dword [ebp - 0x14]
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x10]
push dword [ebp - 8]
push dword [ebp + 0xc]
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
jne 0x47731b
mov ecx, dword [ebp - 8]
mov eax, 0xc0000000
and ecx, eax
cmp ecx, eax
jne 0x4772e7
test byte [ebp + 0x10], 1
je 0x4772e7
and dword [ebp - 8], 0x7fffffff
push ebx
push dword [ebp - 0xc]
lea eax, [ebp - 0x34]
push dword [ebp - 0x14]
push eax
push dword [ebp - 0x10]
push dword [ebp - 8]
push dword [ebp + 0xc]
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
jne 0x47731b
mov esi, dword [esi]
mov eax, esi
and esi, 0x1f
imul esi, esi, 0x38
pop ecx
call 0x4e3466
mov eax, dword [eax]
jmp 0x4777a8
push dword [ebp - 0x1c]
call dword [0x48317c]
cmp eax, ebx
jne 0x47736c
mov esi, dword [esi]
mov eax, esi
and esi, 0x1f
imul esi, esi, 0x38
sar eax, 5
mov eax, dword [eax*4 + 0x4acb80]
lea eax, [eax + esi + 4]
and byte [eax], 0xfe
call dword [0x483234]
mov esi, eax
push esi
call 0x4e34c9
pop ecx
push dword [ebp - 0x1c]
call dword [0x48322c]
cmp esi, ebx
jne 0x47730f
call 0x4e34b6
mov dword [eax], 0xd
jmp 0x47730f
cmp eax, 2
jne 0x477377
or byte [ebp - 1], 0x40
jmp 0x477380
cmp eax, 3
jne 0x477380
or byte [ebp - 1], 8
push dword [ebp - 0x1c]
push dword [esi]
call 0x4ef101
mov eax, dword [esi]
mov edx, eax
and eax, 0x1f
imul eax, eax, 0x38
sar edx, 5
mov edx, dword [edx*4 + 0x4acb80]
pop ecx
pop ecx
mov cl, byte [ebp - 1]
or cl, 1
mov byte [edx + eax + 4], cl
mov eax, dword [esi]
mov edx, eax
and eax, 0x1f
imul eax, eax, 0x38
sar edx, 5
mov edx, dword [edx*4 + 0x4acb80]
lea eax, [edx + eax + 0x24]
and byte [eax], 0x80
mov byte [ebp - 3], cl
and byte [ebp - 3], 0x48
mov byte [ebp - 1], cl
jne 0x477455
test cl, 0x80
je 0x477525
test byte [ebp + 0x10], 2
je 0x477455
push 2
or edi, 0xffffffff
push edi
push dword [esi]
call 0x4f178b
add esp, 0xc
cmp eax, edi
mov dword [ebp - 0x18], eax
jne 0x477414
call fcn.0046c169
cmp dword [eax], 0x83
je 0x477455
push dword [esi]
call 0x4e7216
jmp 0x47730e
push 1
lea eax, [ebp - 4]
push eax
push dword [esi]
mov byte [ebp - 4], bl
call 0x4f1100
add esp, 0xc
test eax, eax
jne 0x477445
cmp byte [ebp - 4], 0x1a
jne 0x477445
mov eax, dword [ebp - 0x18]
cdq
push edx
push eax
push dword [esi]
call 0x4f0f66
add esp, 0xc
cmp eax, edi
je 0x477408
push ebx
push ebx
push dword [esi]
call 0x4f17e8
add esp, 0xc
cmp eax, edi
je 0x477408
test byte [ebp - 1], 0x80
je 0x477525
mov ecx, 0x74000
test dword [ebp + 0x10], ecx
mov edi, 0x4000
jne 0x47747d
mov eax, dword [ebp - 0x24]
and eax, ecx
jne 0x47747a
or dword [ebp + 0x10], edi
jmp 0x47747d
or dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
and eax, ecx
cmp eax, edi
je 0x4774ca
cmp eax, 0x10000
je 0x4774b6
cmp eax, 0x14000
je 0x4774b6
cmp eax, 0x20000
je 0x4774c4
cmp eax, 0x24000
je 0x4774c4
cmp eax, 0x40000
je 0x4774b0
cmp eax, 0x44000
jne 0x4774cd
mov byte [ebp - 2], 1
jmp 0x4774cd
mov ecx, dword [ebp + 0x10]
mov eax, 0x301
and ecx, eax
cmp ecx, eax
jne 0x4774cd
mov byte [ebp - 2], 2
jmp 0x4774cd
mov byte [ebp - 2], bl
test dword [ebp + 0x10], 0x70000
je 0x477525
test byte [ebp - 1], 0x40
mov dword [ebp - 0x18], ebx
jne 0x477525
mov eax, dword [ebp - 8]
mov ecx, 0xc0000000
and eax, ecx
cmp eax, 0x40000000
je 0x47767f
cmp eax, 0x80000000
je 0x477646
cmp eax, ecx
jne 0x477525
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jbe 0x477525
cmp eax, 2
jbe 0x477727
cmp eax, 4
jbe 0x477618
cmp eax, 5
je 0x477727
mov eax, dword [esi]
mov ecx, eax
and eax, 0x1f
imul eax, eax, 0x38
sar ecx, 5
mov ecx, dword [ecx*4 + 0x4acb80]
lea eax, [ecx + eax + 0x24]
mov cl, byte [eax]
xor cl, byte [ebp - 2]
and cl, 0x7f
xor byte [eax], cl
mov eax, dword [esi]
mov ecx, eax
and eax, 0x1f
imul eax, eax, 0x38
sar ecx, 5
mov ecx, dword [ecx*4 + 0x4acb80]
lea eax, [ecx + eax + 0x24]
mov ecx, dword [ebp + 0x10]
mov dl, byte [eax]
shr ecx, 0x10
shl cl, 7
and dl, 0x7f
or cl, dl
cmp byte [ebp - 3], bl
mov byte [eax], cl
jne 0x477597
test byte [ebp + 0x10], 8
je 0x477597
mov eax, dword [esi]
mov ecx, eax
and eax, 0x1f
imul eax, eax, 0x38
sar ecx, 5
mov ecx, dword [ecx*4 + 0x4acb80]
lea eax, [ecx + eax + 4]
or byte [eax], 0x20
mov edi, dword [ebp - 8]
mov eax, 0xc0000000
mov ecx, edi
and ecx, eax
cmp ecx, eax
jne 0x4777a6
test byte [ebp + 0x10], 1
je 0x4777a6
push dword [ebp - 0x1c]
call dword [0x48322c]
push ebx
push dword [ebp - 0xc]
lea eax, [ebp - 0x34]
push 3
push eax
push dword [ebp - 0x10]
and edi, 0x7fffffff
push edi
push dword [ebp + 0xc]
call dword [0x483360]
cmp eax, 0xffffffff
jne 0x47778f
call dword [0x483234]
push eax
call 0x4e3768
mov eax, dword [esi]
mov ecx, eax
and eax, 0x1f
imul eax, eax, 0x38
sar ecx, 5
mov ecx, dword [ecx*4 + 0x4acb80]
lea eax, [ecx + eax + 4]
and byte [eax], 0xfe
push dword [esi]
call 0x4ef406
pop ecx
jmp 0x47730e
push 2
push ebx
push ebx
push dword [esi]
call 0x4eda89
add esp, 0x10
or eax, edx
je 0x477727
push ebx
push ebx
push ebx
push dword [esi]
call 0x4eda9e
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x477408
push 3
lea eax, [ebp - 0x18]
push eax
push dword [esi]
call fcn.00479ce0
add esp, 0xc
cmp eax, 0xffffffff
dec dword [edi]
invalid
invalid
std
invalid
invalid
cmp eax, 2
je 0x4776cb
cmp eax, 3
jne 0x477719
cmp dword [ebp - 0x18], 0xc7325f
jne 0x4776cb
mov byte [ebp - 2], 1
jmp 0x477525
mov eax, dword [ebp - 0x14]
cmp eax, ebx
invalid
invalid