Function at 0x45fee0
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4f600c]
xor eax, ebp
mov dword [ebp - 4], eax
inc word [0x4fc4ce]
push ebx
mov ebx, ecx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x34], ebx
mov esi, dword [ebx + 4]
mov dword [ebp - 0x20], edi
movzx eax, byte [esi]
add eax, 0xfffffffe
cmp eax, 0x87
ja case.0x45ff1f.3
movzx eax, byte [eax + 0x460a3c]
jmp dword [eax*4 + 0x460a24]
cmp word [ebx + 0xa], 0x18
jb 0x460005
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov dword [ebp - 0x14], ecx
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x18], eax
and eax, 0xc0ff
mov dword [ebp - 0x10], ecx
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0xc], ecx
cmp eax, 0x80fe
je 0x45ff59
xor dh, dh
jmp 0x45ff61
mov dh, byte [edi + 0x206]
inc dh
mov eax, dword [0x4fc9cc]
mov byte [ebp - 8], dh
cmp byte [eax + 7], 0xff
jne 0x46012f
cmp byte [esi + 1], 0
jne 0x46012f
cmp byte [ebp - 0x18], 0xff
je 0x46012f
cmp byte [0x4fc9ec], 0xff
jne 0x46008a
xor dl, dl
nop word [eax + eax]
movsx ecx, dl
mov al, byte [ecx + edi + 0x1c8]
test al, al
je 0x45fff3
cmp al, 0x40
je 0x45fff3
mov ebx, dword [esi + 8]
lea eax, [ecx + 0x10]
lea eax, [eax + eax*2]
cmp ebx, dword [edi + eax*8]
mov ebx, dword [ebp - 0x34]
jne 0x45fff3
lea eax, [ecx + ecx*2]
mov ecx, dword [esi + 0xc]
cmp ecx, dword [edi + eax*8 + 0x184]
jne 0x45fff3
mov ecx, dword [esi + 0x10]
cmp ecx, dword [edi + eax*8 + 0x188]
jne 0x45fff3
mov ecx, dword [esi + 0x14]
cmp ecx, dword [edi + eax*8 + 0x18c]
jne 0x45fff3
cmp dh, byte [edi + eax*8 + 0x190]
je 0x460029
inc dl
cmp dl, 3
jl 0x45ffa0
movzx edx, word [ebx + 0xa]
cmp edx, 0x1a
jae 0x46003a
mov ecx, ebx
call fcn.0045a150
inc word [0x4fc4d6]
inc word [0x4fc4d2]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00467552
mov esp, ebp
pop ebp
ret
push 0x40
mov ecx, edi
call fcn.00459830
add esp, 4
jmp 0x460a0a
movzx eax, byte [esi + 0x19]
lea ecx, [eax*8 + 0x18]
mov eax, edx
cmp eax, ecx
jb 0x460003
lea ecx, [ebp - 0x18]
call fcn.00461230
test al, al
js 0x460a0a
test byte [esi + 4], 0x20
je 0x460a0a
movzx ecx, byte [edi + 0x200]
movsx eax, al
imul eax, eax, 0x2c
push ecx
lea ecx, [esi + 0x1a]
push ecx
add eax, 0x4fc558
push eax
call fcn.00492a90
add esp, 0xc
jmp 0x460a0a
lea ecx, [ebp - 0x18]
call fcn.00461230
mov dl, al
mov byte [ebp - 0x19], dl
test dl, dl
js 0x460a0a
test byte [esi + 4], 0x20
jne 0x4600b4
movsx eax, dl
imul edi, eax, 0x2c
cmp byte [edi + 0x4fc564], 1
jne 0x4600fb
movzx edi, word [ebx + 0xa]
cmp edi, 0x1a
jb 0x460003
movzx eax, byte [esi + 0x19]
lea ecx, [eax*8 + 0x18]
cmp edi, ecx
jb 0x460003
movsx eax, dl
imul edi, eax, 0x2c
mov eax, dword [ebp - 0x20]
movzx eax, byte [eax + 0x200]
push eax
lea eax, [esi + 0x1a]
push eax
lea eax, [edi + 0x4fc558]
push eax
call fcn.00492a90
mov dl, byte [ebp - 0x19]
add esp, 0xc
cmp dword [edi + 0x4fc560], 0
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x4fc554], eax
mov eax, dword [0x4f6af4]
mov byte [edi + 0x4fc564], 2
mov dword [edi + 0x4fc568], eax
je 0x460a0a
mov cl, dl
call fcn.00462070
jmp 0x460a0a
mov ecx, ebx
call fcn.0045a150
inc word [0x4fc4dc]
inc word [0x4fc4d2]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00467552
mov esp, ebp
pop ebp
ret
movzx ecx, word [ebx + 0xa]
cmp ecx, 0x18
jb 0x460003
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x14], edx
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], eax
and eax, 0xc0ff
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x10], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0xc], edx
cmp eax, 0x80fe
je 0x46019c
xor al, al
mov byte [ebp - 0x19], al
mov byte [ebp - 8], al
jmp 0x4601ab
mov dl, byte [edi + 0x206]
add dl, 1
mov byte [ebp - 0x19], dl
mov byte [ebp - 8], dl
mov eax, dword [0x4fc9cc]
cmp byte [eax + 7], 0xff
jne 0x46012f
cmp byte [esi + 1], 0
jne 0x46012f
cmp byte [ebp - 0x18], 0xff
je 0x46012f
cmp ecx, 0x1a
jb 0x4601ee
movzx eax, byte [esi + 0x19]
lea edx, [esi + 0x18]
xor esi, esi
lea ecx, [eax*8 + 0x18]
movzx eax, word [ebx + 0xa]
cmp eax, ecx
cmovae esi, edx
jmp 0x4601f0
xor esi, esi
mov dword [ebp - 0x20], esi
xor dl, dl
nop word [eax + eax]
movsx ecx, dl
mov al, byte [ecx + edi + 0x1c8]
test al, 0x10
jne 0x460236
test al, 8
je 0x46027a
cmp dword [0x4fc9d4], 0
jne 0x46027a
cmp dword [0x4fc9d8], 0
jne 0x46027a
cmp dword [0x4fc9dc], 0
jne 0x46027a
cmp dword [0x4fc9e0], 0
jne 0x46027a
mov ebx, dword [ebp - 0x38]
lea eax, [ecx + 0x10]
lea eax, [eax + eax*2]
cmp ebx, dword [edi + eax*8]
mov ebx, dword [ebp - 0x34]
jne 0x46027a
lea eax, [ecx + ecx*2]
mov ecx, dword [ebp - 0x30]
cmp ecx, dword [edi + eax*8 + 0x184]
jne 0x46027a
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [edi + eax*8 + 0x188]
jne 0x46027a
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [edi + eax*8 + 0x18c]
jne 0x46027a
mov cl, byte [ebp - 0x19]
cmp cl, byte [edi + eax*8 + 0x190]
je 0x46028b
add dl, 1
cmp dl, 3
jl 0x460200
jmp 0x460a0a
cmp dword [0x4fc9d4], 0
jne 0x460362
cmp dword [0x4fc9d8], 0
jne 0x460362
cmp dword [0x4fc9dc], 0
jne 0x460362
cmp dword [0x4fc9e0], 0
jne 0x460362
xor al, al
lea esi, [edi + 0x184]
xor ecx, ecx
mov byte [ebp - 0x1a], al
mov edx, 0xfffffe7c
mov dword [ebp - 0x20], ecx
sub edx, edi
mov ebx, edx
nop dword [eax + eax]
lea edx, [edi + 0x1c8]
add edx, ecx
mov dword [ebp - 0x28], edx
cmp byte [edx], 0
je 0x46034a
mov edx, dword [ebp - 0x38]
cmp edx, dword [esi - 4]
jne 0x46034a
mov edx, dword [ebp - 0x30]
cmp edx, dword [esi]
jne 0x46034a
mov edx, dword [ebp - 0x2c]
cmp edx, dword [esi + 4]
jne 0x46034a
mov edx, dword [ebp - 0x24]
cmp edx, dword [esi + 8]
jne 0x46034a
mov dl, byte [ebp - 0x19]
cmp dl, byte [esi + 0xc]
jne 0x46034a
lea edx, [ebx + 0x180]
mov ecx, edi
add edx, edi
push 0x22
add edx, esi
call fcn.00460f10
mov eax, dword [ebp - 0x28]
add esp, 4
test byte [eax], 8
je 0x460344
mov dl, byte [ebp - 0x1a]
mov ecx, edi
push 0x40
call fcn.00459830
add esp, 4
mov ecx, dword [ebp - 0x20]
mov al, byte [ebp - 0x1a]
add al, 1
inc ecx
add esi, 0x18
mov byte [ebp - 0x1a], al
mov dword [ebp - 0x20], ecx
cmp al, 3
jl 0x4602e0
mov ebx, dword [ebp - 0x34]
jmp 0x460a0a
test esi, esi
je 0x46012f
mov ecx, 0x4fc9d4
call fcn.00461230
test al, al
js 0x4603b1
movsx eax, al
imul esi, eax, 0x2c
cmp byte [esi + 0x4fc564], 1
jne 0x46044d
mov dword [esi + 0x4fc554], edi
movzx eax, byte [edi + 0x200]
push eax
mov eax, dword [ebp - 0x20]
add eax, 2
push eax
lea eax, [esi + 0x4fc558]
push eax
call fcn.00492a90
jmp 0x460439
call fcn.00461290
test al, al
jns 0x4603d9
mov ecx, ebx
call fcn.0045a150
inc word [0x4fc4d8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00467552
mov esp, ebp
pop ebp
ret
movsx eax, al
imul esi, eax, 0x2c
mov dword [esi + 0x4fc554], edi
movzx eax, byte [edi + 0x200]
push eax
mov eax, dword [ebp - 0x20]
add eax, 2
push eax
lea eax, [esi + 0x4fc558]
push eax
call fcn.00492a90
mov eax, dword [0x4fc9d4]
mov dword [esi + 0x4fc540], eax
mov eax, dword [0x4fc9d8]
mov dword [esi + 0x4fc544], eax
mov eax, dword [0x4fc9dc]
mov dword [esi + 0x4fc548], eax
mov eax, dword [0x4fc9e0]
mov dword [esi + 0x4fc54c], eax
movzx eax, byte [0x4fc9e4]
mov byte [esi + 0x4fc550], al
mov dword [esi + 0x4fc568], 5
add esp, 0xc
mov byte [esi + 0x4fc564], 4
push 0x60
lea edx, [ebp - 0x18]
mov ecx, edi
call fcn.00460f10
add esp, 4
jmp 0x460a0a
cmp word [ebx + 0xa], 0x10
jb 0x460005
mov eax, dword [0x4fc9d4]
and eax, 0xc0ff
cmp eax, 0x80fe
jne 0x460131
mov eax, dword [0x4fc9cc]
cmp byte [eax + 7], 0xff
jne 0x460131
cmp byte [esi + 1], 0
jne 0x460131
cmp byte [edi + 0x207], 3
jb 0x4604ae
mov ecx, edi
call fcn.004610e0
test al, al
jne 0x4604b5
mov byte [edi + 0x207], 0
mov edx, edi
mov ecx, 0x4fc9d4
call fcn.00461840
test al, al
jns 0x4604d7
mov ecx, 0x4fc9d4
call fcn.004618b0
test al, al
js 0x4603ba
movsx eax, al
lea ecx, [eax + eax*2]
mov ax, word [esi + 6]
shl ecx, 2
rol ax, 8
movzx eax, ax
mov dword [ebp - 0x24], ecx
mov dword [ecx + 0x4fc8e4], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x460502
bswap eax
mov dword [0x4f6af4], eax
mov al, byte [esi + 5]
mov byte [ecx + 0x4fc8e8], al
movzx esi, word [ebx + 8]
mov dword [ebp - 0x20], 0x10
cmp esi, 0x12
jb 0x460a0a
nop
mov eax, dword [ebp - 0x20]
inc eax
movzx ecx, ax
mov eax, ebx
nop dword [eax]
movzx edx, word [eax + 0xa]
cmp dx, cx
ja 0x46054d
mov eax, dword [eax]
sub ecx, edx
test eax, eax
jne 0x460530
inc word [0x4fc4d6]
jmp 0x460a03
test eax, eax
je 0x460541
cmp word [eax + 0xa], cx
jbe 0x460541
mov eax, dword [eax + 4]
movzx ecx, cx
movzx eax, byte [eax + ecx]
test eax, eax
jle 0x460541
mov dword [ebp - 0x28], eax
shl eax, 3
movzx ecx, ax
mov eax, dword [ebp - 0x20]
movzx edx, ax
sub esi, edx
cmp ecx, esi
jg 0x460541
movzx eax, word [ebx + 8]
cmp word [ebx + 0xa], ax
jne 0x46058b
mov esi, dword [ebx + 4]
add esi, edx
jmp 0x460602
cmp ecx, 0x20
jbe 0x4605ea
mov eax, dword [ebp - 0x20]
movzx ecx, ax
mov eax, ebx
nop dword [eax + eax]
movzx edx, word [eax + 0xa]
cmp dx, cx
ja 0x4605bd
mov eax, dword [eax]
sub ecx, edx
test eax, eax
jne 0x4605a0
inc word [0x4fc4d6]
jmp 0x460a03
test eax, eax
je 0x460541
cmp word [eax + 0xa], cx
jbe 0x460541
mov eax, dword [eax + 4]
movzx ecx, cx
movzx eax, byte [eax + ecx]
test eax, eax
js 0x460541
cmp al, 0x19
jne 0x460541
mov ecx, 0x20
push dword [ebp - 0x20]
mov esi, 0x4fc154
push ecx
mov edx, esi
mov ecx, ebx
call fcn.0045a530
add esp, 8
movzx ecx, ax
movzx eax, byte [esi]
dec eax
cmp eax, 0x17
ja case.0x460616.2
movzx eax, byte [eax + 0x460ad8]
jmp dword [eax*4 + 0x460ac4]
cmp cx, 8
jb 0x460541
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x4fc8e0]
test ecx, ecx
je case.0x460616.24
cmp byte [ecx + 0x24], 1
jne case.0x460616.24
movzx eax, byte [edi + 0x200]
push eax
lea eax, [esi + 2]
push eax
lea eax, [ecx + 0x18]
push eax
call fcn.00492a90
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov eax, dword [ecx + 0x4fc8e0]
mov byte [eax + 0x24], 2
mov ecx, dword [ecx + 0x4fc8e0]
mov eax, dword [0x4f6af4]
mov dword [ecx + 0x28], eax
jmp case.0x460616.24
cmp cx, 8
jb 0x460541
mov edx, dword [esi + 4]
mov eax, edx
bswap eax
cmp eax, 0x500
jb case.0x460616.24
mov ecx, edx
mov eax, edx
shr eax, 8
shr ecx, 0x18
xor ecx, eax
shr edx, 8
movzx eax, cl
xor eax, edx
mov word [edi + 0x1f8], ax
jmp case.0x460616.24
cmp cx, 0x20
jb 0x460541
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x18], ecx
and ecx, 0xc0ff
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0xc], eax
cmp ecx, 0x80fe
je 0x4606ec
mov byte [ebp - 8], 0
jmp 0x4606f7
mov al, byte [edi + 0x206]
add al, 1
mov byte [ebp - 8], al
cmp ecx, 0x80fe
je case.0x460616.24
cmp byte [esi + 3], 0
jge case.0x460616.24
cmp byte [esi + 2], 0x40
jne case.0x460616.24
mov esi, dword [esi + 4]
lea ecx, [ebp - 0x18]
mov edx, edi
bswap esi
call fcn.004619e0
test al, al
jns 0x460730
test esi, esi
je 0x46072c
mov edx, edi
lea ecx, [ebp - 0x18]
call fcn.00461a40
test al, al
js case.0x460616.24
movsx ecx, al
lea eax, [ecx*8]
sub eax, ecx
mov dword [eax*4 + 0x4fc938], esi
jmp case.0x460616.24
inc word [0x4fc4dc]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
movzx esi, word [ebx + 8]
lea eax, [eax + ecx*8]
mov ecx, esi
mov dword [ebp - 0x20], eax
movzx eax, ax
sub ecx, eax
cmp ecx, 2
jge 0x460520
jmp 0x460a0a
movzx edx, word [ebx + 0xa]
cmp edx, 0x28
jb 0x460005
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x18], ecx
and ecx, 0xc0ff
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x24]
mov dword [ebp - 0xc], eax
cmp ecx, 0x80fe
je 0x4607aa
mov byte [ebp - 8], 0
jmp 0x4607b5
mov al, byte [edi + 0x206]
inc al
mov byte [ebp - 8], al
mov eax, dword [0x4fc9d4]
and eax, 0xc0ff
cmp eax, 0x80fe
jne 0x46012f
mov eax, dword [0x4fc9cc]
cmp byte [eax + 7], 0xff
jne 0x46012f
cmp byte [esi + 1], 0
jne 0x46012f
cmp byte [ebp - 0x18], 0xff
je 0x46012f
xor edi, edi
cmp edx, 0x2a
jb 0x46080b
movzx eax, byte [esi + 0x29]
lea edx, [esi + 0x28]
lea ecx, [eax*8 + 0x28]
movzx eax, word [ebx + 0xa]
cmp eax, ecx
cmovae edi, edx
lea ecx, [ebp - 0x18]
call fcn.00461510
mov ch, al
test ch, ch
js 0x460a0a
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x10]
mov esi, dword [esi + 0x14]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], eax
mov eax, edx
and eax, 0xc0ff
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0xc], esi
cmp eax, 0x80fe
je 0x460853
xor cl, cl
jmp 0x46085e
mov eax, dword [ebp - 0x20]
mov cl, byte [eax + 0x206]
inc cl
movsx eax, ch
mov byte [ebp - 8], cl
mov byte [ebp - 0x19], cl
lea eax, [eax + eax*2]
shl eax, 4
mov dword [eax + 0x4fc714], edx
mov edx, dword [ebp - 0x24]
mov dword [eax + 0x4fc718], edx
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x4fc71c], edx
mov dword [eax + 0x4fc720], esi
mov byte [eax + 0x4fc724], cl
test edi, edi
je 0x460a0a
cmp byte [edi], 2
jne 0x460a0a
lea ecx, [ebp - 0x18]
call fcn.00461230
test al, al
jns 0x460929
call fcn.00461290
mov byte [ebp - 0x1a], al
test al, al
js 0x460a0a
movsx eax, al
imul esi, eax, 0x2c
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x4fc554], eax
movzx eax, byte [eax + 0x200]
push eax
lea eax, [edi + 2]
push eax
lea eax, [esi + 0x4fc558]
push eax
call fcn.00492a90
mov eax, dword [ebp - 0x28]
add esp, 0xc
mov dword [esi + 0x4fc540], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x4fc544], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x4fc548], eax
mov eax, dword [ebp - 0x30]
mov dword [esi + 0x4fc54c], eax
mov al, byte [ebp - 0x19]
mov byte [esi + 0x4fc550], al
mov al, byte [ebp - 0x1a]
mov byte [esi + 0x4fc564], 4
mov dword [esi + 0x4fc568], 5
movsx eax, al
imul esi, eax, 0x2c
cmp byte [esi + 0x4fc564], 1
jne 0x460a0a
mov eax, dword [ebp - 0x20]
movzx eax, byte [eax + 0x200]
push eax
lea eax, [edi + 2]
push eax
lea eax, [esi + 0x4fc558]
push eax
call fcn.00492a90
add esp, 0xc
mov byte [esi + 0x4fc564], 4
mov dword [esi + 0x4fc568], 5
jmp 0x460a0a
cmp word [ebx + 0xa], 0x30
jb 0x460005
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0xc], eax
mov eax, ecx
and eax, 0xc0ff
mov dword [ebp - 0x18], ecx
cmp eax, 0x80fe
je 0x4609bd
and ecx, 0x8fff
cmp ecx, 0x1ff
je 0x4609bd
cmp ecx, 0x2ff
je 0x4609bd
mov byte [ebp - 8], 0
jmp 0x4609c8
mov al, byte [edi + 0x206]
inc al
mov byte [ebp - 8], al
lea ecx, [ebp - 0x18]
call fcn.00461510
mov byte [ebp - 0x19], al
test al, al
js 0x460a0a
mov ecx, dword [esi + 4]
mov edx, 0xffff
bswap ecx
cmp ecx, edx
movzx eax, cx
cmovb edx, eax
movsx eax, byte [ebp - 0x19]
lea eax, [eax + eax*2]
shl eax, 4
mov word [eax + 0x4fc728], dx
jmp 0x460a0a
inc word [0x4fc4dc]
inc word [0x4fc4d2]
mov ecx, ebx
call fcn.0045a150
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00467552
mov esp, ebp
pop ebp
ret