Function at 0x464250
Capabilities:
Encrypt data using speck

Disassembly:
mov eax, dword [esp + 0x10]
sub esp, 0x4c
cmp eax, 0x1a
push ebx
push ebp
mov ebp, dword [esp + 0x5c]
push esi
push edi
jne 0x4642b7
mov edx, dword [ebp + 8]
mov ecx, dword [ebp]
mov eax, edx
shr eax, 3
mov ecx, dword [eax + ecx]
mov eax, ecx
shr eax, 8
mov esi, ecx
shl esi, 8
xor eax, esi
mov esi, dword [esp + 0x60]
and eax, 0xff00ff
shl ecx, 8
xor eax, ecx
rol eax, 0x10
mov ecx, edx
and ecx, 7
shl eax, cl
mov ecx, dword [0x102f96a4]
shr eax, 0x18
movsx ebx, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
add eax, edx
mov dword [ebp + 8], eax
mov eax, ebx
sar ebx, 2
jmp 0x46435b
cmp eax, 0x19
mov esi, dword [esp + 0x60]
jne 0x464301
movzx eax, byte [esi + 0x2d0b]
movzx ecx, byte [esi + 0x2d04]
add eax, ecx
cmp eax, 0x40
jge 0x4642da
add eax, 1
sar eax, 1
and eax, 0x1f
mov edx, dword [eax*4 + 0x1018bb80]
push 2
shl edx, 4
mov edi, dword [edx + 0x102ef284]
push 8
push ebp
call fcn.0044cb20
mov ebx, eax
add esp, 0xc
sar ebx, 2
jmp 0x46435b
movzx ecx, byte [eax + 0x1018b2b8]
movzx eax, byte [ecx + esi + 0x2cff]
movzx ecx, byte [ecx + esi + 0x2cf8]
add eax, ecx
cmp eax, 0x40
jge 0x464324
add eax, 1
sar eax, 1
and eax, 0x1f
mov edx, dword [eax*4 + 0x1018bb80]
push 2
shl edx, 4
mov edi, dword [edx + 0x102ef284]
push 8
push ebp
call fcn.0044cb20
mov ecx, dword [esp + 0x78]
movzx edx, byte [ecx + 0x1018b2b8]
mov ebx, eax
add esp, 0xc
sar ebx, 2
mov byte [edx + esi + 0x2d00], bl
test ebx, ebx
je 0x4648f6
cmp ebx, dword [esp + 0x78]
jbe 0x464395
mov eax, dword [esi + 0x20d4]
mov ecx, dword [esi + 0x20d0]
mov edx, dword [esi]
push ebx
push eax
push ecx
push 0x1018bc08
push 0x10
push edx
call 0x530a20
add esp, 0x18
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x4c
ret
mov edx, dword [ebp + 8]
mov ecx, dword [ebp]
and eax, 3
mov esi, eax
mov eax, edx
shr eax, 3
mov ecx, dword [eax + ecx]
mov eax, ecx
mov edi, ecx
shr eax, 8
shl ecx, 8
shl edi, 8
xor eax, edi
and eax, 0xff00ff
xor eax, ecx
mov ecx, edx
and ecx, 7
rol eax, 0x10
shl eax, cl
add edx, esi
mov dword [esp + 0x18], edx
mov dword [ebp + 8], edx
shr eax, 0x1d
mov ecx, eax
sar ecx, 1
and ecx, 2
mov edx, 1
sub edx, ecx
mov ecx, eax
and ecx, 2
mov edi, 1
sub edi, ecx
and eax, 1
add eax, eax
mov ecx, 1
sub ecx, eax
cmp esi, ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ecx
jge 0x464647
xor edx, edx
cmp esi, 3
setl dl
xor eax, eax
cmp ebx, 0xa
setg al
push 8
mov edi, edx
and eax, edi
mov dword [esp + 0x18], eax
mov eax, ebp
call fcn.00411460
mov edx, dword [esp + 0x18]
mov ecx, edx
shl ecx, 8
add ecx, eax
movsx eax, byte [ecx + ecx + 0x102f0fe0]
add ecx, ecx
movsx ecx, byte [ecx + 0x102f0fe1]
add ecx, dword [esp + 0x1c]
add esp, 4
cmp eax, 0x64
mov dword [ebp + 8], ecx
jl 0x464524
lea edi, [eax - 0x64]
cmp edi, 8
jne 0x46447e
mov esi, ebp
call fcn.004641e0
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov edi, eax
add edi, 8
cmp edi, 0xe
jge 0x464497
test edx, edx
je 0x464493
mov esi, ebp
call 0x51f0f0
lea eax, [eax + edi*2]
jmp 0x464502
mov eax, edi
jmp 0x464506
jne 0x4644ba
test edx, edx
je 0x4644a9
mov esi, ebp
call 0x51f0f0
add eax, 0x1c
jmp 0x464502
mov esi, 4
mov eax, ebp
call 0x51c040
add eax, 0xe
jmp 0x464502
lea esi, [edi - 3]
mov eax, ebp
call 0x51c040
add eax, 0x1e
cmp edi, 0x10
jl 0x464502
cmp edi, 0x1c
jle 0x4644f2
mov edx, dword [esp + 0x60]
mov eax, dword [edx]
push 0x1018bbf0
push 0x10
push eax
call 0x530a20
add esp, 0xc
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x4c
ret
mov edx, 1
mov ecx, esi
shl edx, cl
lea eax, [eax + edx - 0x1000]
mov esi, dword [esp + 0x10]
cmp esi, 3
jge 0x46450e
add eax, 2
mov ecx, eax
mov edi, 2
add eax, edi
and ecx, 1
neg ecx
sar eax, 1
xor eax, ecx
sub eax, ecx
jmp 0x464543
mov ecx, eax
sar ecx, 0x1f
neg edi
or ecx, 1
and ecx, edi
add eax, ecx
lea edx, [eax + 3]
mov ecx, 6
cmp ecx, edx
sbb edi, edi
neg edi
add edi, 1
mov dword [esp + esi*4 + 0x1c], eax
add esi, 1
cmp esi, ebx
mov dword [esp + 0x10], esi
jge 0x464643
mov edx, dword [ebp + 8]
mov ecx, dword [ebp]
mov eax, edx
shr eax, 3
mov ecx, dword [eax + ecx]
mov eax, ecx
mov esi, ecx
shr eax, 8
shl ecx, 8
shl esi, 8
xor eax, esi
and eax, 0xff00ff
xor eax, ecx
rol eax, 0x10
mov ecx, edx
and ecx, 7
shl eax, cl
mov ecx, edi
shl ecx, 8
shr eax, 0x18
add ecx, eax
movsx eax, byte [ecx + ecx + 0x102f0fe0]
add ecx, ecx
movsx ecx, byte [ecx + 0x102f0fe1]
add ecx, edx
cmp eax, 0x64
mov dword [ebp + 8], ecx
jl 0x464619
add eax, 0xffffff9c
cmp eax, 8
mov dword [esp + 0x14], eax
jne 0x4645c3
mov esi, ebp
call fcn.004641e0
add eax, 8
mov dword [esp + 0x14], eax
cmp eax, 0xf
jge 0x4645dd
mov esi, edi
mov eax, ebp
call 0x51c040
mov edx, dword [esp + 0x14]
mov ecx, edi
shl edx, cl
add eax, edx
jmp 0x464609
lea esi, [eax - 3]
mov eax, ebp
call 0x51c040
mov edx, 0xf
mov ecx, edi
shl edx, cl
add eax, edx
cmp dword [esp + 0x14], 0x10
jl 0x464609
mov edx, 1
mov ecx, esi
shl edx, cl
lea eax, [eax + edx - 0x1000]
mov ecx, eax
add eax, 2
and ecx, 1
neg ecx
sar eax, 1
xor eax, ecx
sub eax, ecx
mov edx, dword [esp + 0x10]
mov ecx, dword [edi*4 + 0x1018bb64]
mov dword [esp + edx*4 + 0x1c], eax
add eax, ecx
add ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
add edx, 1
add edi, eax
cmp edx, ebx
mov dword [esp + 0x10], edx
jl 0x464556
mov edx, dword [esp + 0x1c]
cmp ebx, dword [esp + 0x78]
jne 0x464654
xor esi, esi
jmp 0x4646fe
cmp dword [esp + 0x6c], 0x1a
mov edi, dword [ebp + 8]
jne 0x4646af
mov ecx, ebx
shl ecx, 4
mov eax, dword [ecx + 0x102ef2c4]
mov dword [esp + 0x18], eax
mov eax, dword [ebp]
mov ecx, edi
shr ecx, 3
mov ecx, dword [ecx + eax]
mov eax, ecx
mov esi, ecx
shr eax, 8
shl esi, 8
xor eax, esi
shl ecx, 8
and eax, 0xff00ff
xor eax, ecx
rol eax, 0x10
mov ecx, edi
and ecx, 7
shl eax, cl
mov ecx, dword [esp + 0x18]
shr eax, 0x1d
movsx esi, word [ecx + eax*4]
movsx ecx, word [ecx + eax*4 + 2]
add ecx, edi
mov dword [ebp + 8], ecx
jmp 0x4646fe
mov eax, ebx
shl eax, 4
mov ecx, dword [eax + 0x102f0ee4]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp]
mov eax, edi
shr eax, 3
mov ecx, dword [eax + ecx]
mov eax, ecx
shr eax, 8
mov esi, ecx
shl esi, 8
xor eax, esi
and eax, 0xff00ff
shl ecx, 8
xor eax, ecx
rol eax, 0x10
mov ecx, edi
and ecx, 7
shl eax, cl
mov ecx, dword [esp + 0x18]
shr eax, 0x17
movsx esi, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
add eax, edi
mov dword [ebp + 8], eax
cmp dword [esp + 0x6c], 0x18
mov ecx, dword [esp + 0x70]
lea eax, [esi + ebx - 1]
mov dword [esp + 0x14], eax
movzx eax, byte [eax + ecx]
mov dword [esp + 0x10], 1
jle 0x4647e6
cmp ebx, 1
mov ecx, dword [esp + 0x68]
mov word [ecx + eax*2], dx
jle 0x4648c3
test esi, esi
jg 0x46473a
xor eax, eax
jmp 0x4647a8
cmp esi, 7
jge 0x464795
mov edx, esi
shl edx, 4
mov eax, dword [edx + 0x102ef6f4]
mov edx, dword [ebp + 8]
mov dword [esp + 0x6c], eax
mov eax, dword [ebp]
mov ecx, edx
shr ecx, 3
mov ecx, dword [ecx + eax]
mov eax, ecx
mov edi, ecx
shr eax, 8
shl edi, 8
xor eax, edi
shl ecx, 8
and eax, 0xff00ff
xor eax, ecx
rol eax, 0x10
mov ecx, edx
and ecx, 7
shl eax, cl
mov ecx, dword [esp + 0x6c]
shr eax, 0x1d
movsx edi, word [ecx + eax*4]
movsx ecx, word [ecx + eax*4 + 2]
add ecx, edx
mov dword [ebp + 8], ecx
mov eax, edi
jmp 0x4647a8
mov edi, dword [0x102ef2c4]
push 2
push 6
push ebp
call fcn.0044cb20
add esp, 0xc
mov ecx, dword [esp + 0x70]
mov edi, dword [esp + 0x68]
sub esi, eax
or edx, 0xffffffff
sub edx, eax
mov eax, dword [esp + 0x14]
add eax, edx
movzx edx, byte [eax + ecx]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov cx, word [esp + eax*4 + 0x1c]
add eax, 1
cmp eax, ebx
mov word [edi + edx*2], cx
mov dword [esp + 0x10], eax
jl 0x464732
jmp 0x4648c3
mov ecx, dword [esp + 0x74]
mov ecx, dword [ecx + eax*4]
imul ecx, edx
mov edx, dword [esp + 0x68]
add ecx, 0x20
shr ecx, 6
cmp ebx, 1
mov word [edx + eax*2], cx
jle 0x4648c3
test esi, esi
jg 0x46480f
xor eax, eax
jmp 0x46487d
cmp esi, 7
jge 0x46486a
mov edx, dword [ebp + 8]
mov eax, esi
shl eax, 4
mov ecx, dword [eax + 0x102ef6f4]
mov dword [esp + 0x6c], ecx
mov ecx, dword [ebp]
mov eax, edx
shr eax, 3
mov ecx, dword [eax + ecx]
mov eax, ecx
shr eax, 8
mov edi, ecx
shl edi, 8
xor eax, edi
and eax, 0xff00ff
shl ecx, 8
xor eax, ecx
rol eax, 0x10
mov ecx, edx
and ecx, 7
shl eax, cl
mov ecx, dword [esp + 0x6c]
shr eax, 0x1d
movsx edi, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
add eax, edx
mov dword [ebp + 8], eax
mov eax, edi
jmp 0x46487d
mov edi, dword [0x102ef2c4]
push 2
push 6
push ebp
call fcn.0044cb20
add esp, 0xc
mov edx, dword [esp + 0x70]
or ecx, 0xffffffff
sub ecx, eax
mov edi, dword [esp + 0x68]
sub esi, eax
mov eax, dword [esp + 0x14]
add eax, ecx
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x14], eax
movzx eax, byte [eax + edx]
mov edx, dword [ecx + eax*4]
mov ecx, dword [esp + 0x10]
imul edx, dword [esp + ecx*4 + 0x1c]
add edx, 0x20
add ecx, 1
shr edx, 6
cmp ecx, ebx
mov word [edi + eax*2], dx
mov dword [esp + 0x10], ecx
jl 0x464807
test esi, esi
jge 0x4648f6
mov eax, dword [esp + 0x60]
mov ecx, dword [eax + 0x20d4]
mov edx, dword [eax + 0x20d0]
mov eax, dword [eax]
push ecx
push edx
push 0x1018bbc4
push 0x10
push eax
call 0x530a20
add esp, 0x14
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x4c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret