Function at 0x125489c
Capabilities:
Encrypt data using speck

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
xor ebx, ebx
test byte [ebp + 0x14], 0x80
push edi
mov dword [ebp - 0x20], ebx
mov byte [ebp - 2], bl
mov dword [ebp - 0x38], 0xc
mov dword [ebp - 0x34], ebx
je 0x12548c5
mov dword [ebp - 0x30], ebx
mov byte [ebp - 1], 0x10
jmp 0x12548cf
mov dword [ebp - 0x30], 1
mov byte [ebp - 1], bl
lea eax, [ebp - 0x20]
push eax
call fcn.01258c6d
pop ecx
test eax, eax
jne 0x1254fe2
mov ecx, dword [ebp + 0x14]
mov eax, 0x8000
test eax, ecx
jne 0x12548fe
test ecx, 0x74000
jne 0x12548fa
cmp dword [ebp - 0x20], eax
je 0x12548fe
or byte [ebp - 1], 0x80
mov eax, ecx
and eax, 3
mov edx, 0xc0000000
sub eax, ebx
je 0x1254954
dec eax
je 0x1254939
dec eax
je 0x1254935
call fcn.0124d746
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
or dword [eax], 0xffffffff
call fcn.0124d77a
push 0x16
pop ebx
mov dword [eax], ebx
call fcn.0124d70b
mov eax, ebx
jmp 0x1254ac6
mov edi, edx
jmp 0x1254959
test cl, 8
je 0x125494d
test ecx, 0x70000
je 0x125494d
mov edi, edx
mov dword [ebp - 8], edx
jmp 0x125495c
mov edi, 0x40000000
jmp 0x1254959
mov edi, 0x80000000
mov dword [ebp - 8], edi
mov eax, dword [ebp + 0x18]
push esi
push 0x10
pop esi
push 2
pop edx
mov dword [ebp - 0x28], edx
sub eax, esi
je 0x12549a3
sub eax, esi
je 0x125499a
sub eax, esi
je 0x1254995
sub eax, esi
je 0x125498c
sub eax, 0x40
jne 0x12549f3
cmp edi, 0x80000000
sete al
mov dword [ebp - 0xc], eax
jmp 0x12549a6
mov dword [ebp - 0xc], 3
jmp 0x12549a6
mov dword [ebp - 0xc], edx
jmp 0x12549a6
mov dword [ebp - 0xc], 1
jmp 0x12549a6
mov dword [ebp - 0xc], ebx
mov eax, ecx
and eax, 0x700
mov esi, 0x400
cmp eax, esi
jg 0x12549de
je 0x12549d9
test eax, eax
je 0x12549d9
cmp eax, 0x100
je 0x12549d5
cmp eax, 0x200
je 0x1254a14
cmp eax, 0x300
jne 0x12549f3
mov esi, edx
jmp 0x1254a1b
push 4
jmp 0x12549db
push 3
pop esi
jmp 0x1254a1b
cmp eax, 0x500
je 0x1254a18
cmp eax, 0x600
je 0x1254a14
cmp eax, 0x700
je 0x1254a18
call fcn.0124d746
mov dword [eax], ebx
mov eax, dword [ebp + 0xc]
or dword [eax], 0xffffffff
call fcn.0124d77a
push 0x16
pop ebx
mov dword [eax], ebx
call fcn.0124d70b
jmp 0x1254fdb
push 5
jmp 0x12549db
xor esi, esi
inc esi
mov edx, pe_nt_image_headers32
mov eax, ebx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x10], eax
test ecx, 0x100
je 0x1254a46
mov eax, dword [0xe6b250]
not eax
and eax, dword [ebp + 0x1c]
test al, al
mov eax, ebx
js 0x1254a46
xor edx, edx
inc edx
mov dword [ebp - 0x18], edx
test cl, 0x40
je 0x1254a60
or edi, 0x10000
or dword [ebp - 0xc], 4
mov eax, 0x4000000
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
test ecx, 0x1000
je 0x1254a71
or edx, 0x100
mov dword [ebp - 0x18], edx
test ecx, 0x2000
je 0x1254a81
or eax, 0x2000000
mov dword [ebp - 0x10], eax
test cl, 0x20
je 0x1254a8d
or eax, 0x8000000
jmp 0x1254a97
test cl, 0x10
je 0x1254a9a
or eax, 0x10000000
mov dword [ebp - 0x10], eax
call fcn.012555cb
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x1254aca
call fcn.0124d746
mov dword [eax], ebx
or dword [edi], 0xffffffff
call fcn.0124d77a
mov dword [eax], 0x18
call fcn.0124d77a
mov eax, dword [eax]
pop esi
pop edi
pop ebx
leave
ret
push dword [ebp - 0x10]
mov eax, dword [ebp + 8]
push dword [ebp - 0x18]
mov dword [eax], 1
push esi
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp + 0x10]
call fcn.01254744
add esp, 0x1c
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x1254b6a
mov ecx, dword [ebp - 8]
mov edx, 0xc0000000
mov eax, ecx
and eax, edx
cmp eax, edx
jne 0x1254b38
test byte [ebp + 0x14], 1
je 0x1254b38
push dword [ebp - 0x10]
lea eax, [ebp - 0x38]
push dword [ebp - 0x18]
and ecx, 0x7fffffff
push esi
push eax
push dword [ebp - 0xc]
mov dword [ebp - 8], ecx
push ecx
push dword [ebp + 0x10]
call fcn.01254744
add esp, 0x1c
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x1254b6a
mov ecx, dword [edi]
mov eax, ecx
sar eax, 5
and ecx, 0x1f
mov eax, dword [eax*4 + 0xe6b8c0]
shl ecx, 6
and byte [eax + ecx + 4], 0xfe
call fcn.01342557
mov al, byte [0x8bfce850]
invalid
pop ecx
call fcn.0124d77a
mov ebx, dword [eax]
jmp 0x1254fdb
push eax
push ecx
call fcn.015f1207
test eax, eax
jne 0x1254bb7
mov ecx, dword [edi]
mov eax, ecx
sar eax, 5
and ecx, 0x1f
mov eax, dword [eax*4 + 0xe6b8c0]
shl ecx, 6
and byte [eax + ecx + 4], 0xfe
call fcn.014a9e69
cmp eax, 0xe856f08b
mov ebp, 0x59ffff8b
push dword [ebp - 0x1c]
push eax
call fcn.013488a3
test esi, esi
jne 0x1254b5e
call fcn.0124d77a
mov dword [eax], 0xd
jmp 0x1254b5e
cmp eax, 2
jne 0x1254bc2
or byte [ebp - 1], 0x40
jmp 0x1254bcb
cmp eax, 3
jne 0x1254bcb
or byte [ebp - 1], 8
push dword [ebp - 0x1c]
push dword [edi]
call fcn.0125585d
mov dl, byte [ebp - 1]
pop ecx
pop ecx
mov ecx, dword [edi]
mov eax, ecx
sar eax, 5
and ecx, 0x1f
mov eax, dword [eax*4 + 0xe6b8c0]
shl ecx, 6
or dl, 1
mov byte [eax + ecx + 4], dl
mov ecx, dword [edi]
mov eax, ecx
sar eax, 5
and ecx, 0x1f
mov eax, dword [eax*4 + 0xe6b8c0]
shl ecx, 6
mov byte [ebp - 1], dl
and byte [eax + ecx + 0x24], 0x80
mov ecx, dword [ebp + 0x14]
mov al, dl
and al, 0x48
mov byte [ebp - 3], al
jne 0x1254cb7
test dl, dl
jns 0x1254edb
test cl, 2
je 0x1254cb7
push 2
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [edi]
call fcn.012521a1
mov ecx, eax
and ecx, edx
add esp, 0x10
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], edx
cmp ecx, 0xffffffff
jne 0x1254c6a
call fcn.0124d746
cmp dword [eax], 0x83
je 0x1254cb1
push dword [edi]
call fcn.0124fa11
jmp 0x1254b5d
push 1
lea eax, [ebp - 0x24]
push eax
push dword [edi]
mov dword [ebp - 0x24], ebx
call fcn.0124f1b8
add esp, 0xc
test eax, eax
jne 0x1254c9d
cmp word [ebp - 0x24], 0x1a
jne 0x1254c9d
push dword [ebp - 0x14]
push dword [ebp - 0x2c]
push dword [edi]
call fcn.01258ab9
add esp, 0xc
cmp eax, 0xffffffff
je 0x1254c5e
push ebx
push ebx
push ebx
push dword [edi]
call fcn.012521a1
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x1254c5e
mov dl, byte [ebp - 1]
mov ecx, dword [ebp + 0x14]
test dl, dl
jns 0x1254edb
test ecx, 0x74000
jne 0x1254cde
mov eax, dword [ebp - 0x20]
and eax, 0x74000
jne 0x1254cd9
or ecx, 0x4000
jmp 0x1254cdb
or ecx, eax
mov dword [ebp + 0x14], ecx
mov eax, ecx
and eax, 0x74000
cmp eax, 0x4000
je 0x1254d30
cmp eax, 0x10000
je 0x1254d1c
cmp eax, 0x14000
je 0x1254d1c
cmp eax, 0x20000
je 0x1254d2a
cmp eax, 0x24000
je 0x1254d2a
cmp eax, 0x40000
je 0x1254d16
cmp eax, 0x44000
jne 0x1254d33
mov byte [ebp - 2], 1
jmp 0x1254d33
mov eax, ecx
and eax, 0x301
cmp eax, 0x301
jne 0x1254d33
mov byte [ebp - 2], 2
jmp 0x1254d33
mov byte [ebp - 2], bl
test ecx, 0x70000
je 0x1254edb
mov dword [ebp - 0x14], ebx
test dl, 0x40
jne 0x1254edb
mov eax, dword [ebp - 8]
mov ecx, 0xc0000000
and eax, ecx
cmp eax, 0x40000000
je 0x1254e4d
cmp eax, 0x80000000
je 0x1254dc2
cmp eax, ecx
jne 0x1254edb
test esi, esi
je 0x1254edb
push 2
pop ecx
cmp esi, ecx
jbe 0x1254e92
cmp esi, 4
jbe 0x1254d95
cmp esi, 5
je 0x1254e92
jmp 0x1254edb
push ecx
push ebx
push ebx
push dword [edi]
call fcn.012521a1
add esp, 0x10
or eax, edx
je 0x1254e8f
push ebx
push ebx
push ebx
push dword [edi]
call fcn.012521a1
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x1254c5e
push 3
lea eax, [ebp - 0x14]
push eax
push dword [edi]
call fcn.0124f1b8
add esp, 0xc
cmp eax, 0xffffffff
je 0x1254c5e
mov ecx, dword [ebp - 0x14]
push 2
pop edx
cmp eax, edx
je 0x1254dff
cmp eax, 3
jne 0x1254e76
cmp ecx, 0xbfbbef
jne 0x1254dff
mov byte [ebp - 2], 1
jmp 0x1254edb
and ecx, 0xffff
cmp ecx, 0xfffe
jne 0x1254e24
push dword [edi]
call fcn.0124fa11
pop ecx
call fcn.0124d77a
push 0x16
pop ebx
mov dword [eax], ebx
jmp 0x1254fdb
cmp ecx, 0xfeff
jne 0x1254e76
push ebx
push ebx
push edx
push dword [edi]
call fcn.012521a1
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
je 0x1254c5e
mov byte [ebp - 2], 2
jmp 0x1254edb
test esi, esi
je 0x1254edb
push 2
pop ecx
cmp esi, ecx
jbe 0x1254e92
cmp esi, 4
ja 0x1254d87
push ecx
push ebx
push ebx
push dword [edi]
call fcn.012521a1
add esp, 0x10
or eax, edx
je 0x1254e8f
push ebx
push ebx
push ebx
push dword [edi]
call fcn.012521a1
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1254edb
jmp 0x1254c5e
push 2
pop ecx
movsx eax, byte [ebp - 2]
mov esi, ebx
dec eax
je 0x1254ea7
dec eax
jne 0x1254edb
mov dword [ebp - 0x14], 0xfeff
jmp 0x1254eb4
push 3
pop ecx
mov dword [ebp - 0x14], 0xbfbbef
mov dword [ebp - 0x28], ecx
mov eax, ecx
sub eax, esi
push eax
lea eax, [ebp - 0x14]
add eax, esi
push eax
push dword [edi]
call fcn.012502c4
add esp, 0xc
cmp eax, 0xffffffff
je 0x1254c5e
mov ecx, dword [ebp - 0x28]
add esi, eax
cmp ecx, esi
jg 0x1254eb4
mov edx, dword [edi]
mov eax, edx
sar eax, 5
and edx, 0x1f
mov ecx, dword [eax*4 + 0xe6b8c0]
shl edx, 6
mov al, byte [ecx + edx + 0x24]
xor al, byte [ebp - 2]
and al, 0x7f
xor byte [ecx + edx + 0x24], al
mov esi, dword [edi]
mov ecx, dword [ebp + 0x14]
mov eax, esi
sar eax, 5
and esi, 0x1f
mov edx, dword [eax*4 + 0xe6b8c0]
shl esi, 6
shr ecx, 0x10
mov al, byte [edx + esi + 0x24]
shl cl, 7
and al, 0x7f
or cl, al
mov byte [edx + esi + 0x24], cl
mov ecx, dword [ebp + 0x14]
cmp byte [ebp - 3], bl
jne 0x1254f4e
test cl, 8
je 0x1254f4e
mov ecx, dword [edi]
mov eax, ecx
sar eax, 5
and ecx, 0x1f
mov eax, dword [eax*4 + 0xe6b8c0]
shl ecx, 6
or byte [eax + ecx + 4], 0x20
mov ecx, dword [ebp + 0x14]
and byte [ebx + 0x758b144d], cl
clc
mov esi, dword [ebp - 8]
mov edx, 0xc0000000
mov eax, esi
and eax, edx
cmp eax, edx
jne 0x1254fdb
test cl, 1
je 0x1254fdb
rol dword [ecx], 0x74
js 0x1254f63
push dword [ebp - 0x1c]
jne 0x1254f4a
call fcn.0139fbb7
sub edi, edi
jne 0x1254f5f
lea eax, [ebp - 0x38]
push dword [ebp - 0x18]
and esi, 0x7fffffff
push 3
push eax
push dword [ebp - 0xc]
push esi
push dword [ebp + 0x10]
call fcn.01254744
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x1254fc4
call fcn.01584e37
jle 0x1254fe9
call fcn.0124d759
mov ecx, dword [edi]
mov eax, ecx
sar eax, 5
and ecx, 0x1f
mov eax, dword [eax*4 + 0xe6b8c0]
shl ecx, 6
and byte [eax + ecx + 4], 0xfe
push dword [edi]
call fcn.01255770
pop ecx
jmp 0x1254b5d
mov edx, dword [edi]
mov ecx, edx
sar ecx, 5
and edx, 0x1f
mov ecx, dword [ecx*4 + 0xe6b8c0]
shl edx, 6
mov dword [edx + ecx], eax
mov eax, ebx
jmp 0x1254ac5
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0124d71b
int3
xchg edi, edi
dec esp