Function at 0x6b6ebf50
Capabilities:
Encrypt data using speck
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov dword [esp + 0xc], ecx
mov edi, dword [esp + 0x38]
mov eax, dword [edi + 0x274]
cmp eax, 4
ja case.default.0x6b6ebf73
mov esi, edx
lea ecx, [edi + 8]
mov dword [esp + 4], ecx
jmp dword [eax*4 + 0x6b7d7668]
mov ecx, edi
mov edx, dword [esp + 4]
push esi
call fcn.6b6eb070
add esp, 4
mov ebp, eax
cmp eax, 1
jne 0x6b6ec3ce
inc dword [esi]
mov dword [edi + 0x974], 0
push dword [esp + 0xc]
push dword [edi + 0x20]
call dword [edi + 0x18]
add esp, 8
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
test eax, eax
je 0x6b6ebff5
cmp dword [esi], 1
ja 0x6b6ebfff
push dword [esp + 0xc]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov ebp, 1
jmp 0x6b6ec3ce
mov ebp, 0xffffffe1
jmp 0x6b6ec3ce
mov edx, dword [edi + 0x978]
jmp 0x6b6ec092
mov ecx, dword [edi + 0x97c]
jmp 0x6b6ec0cc
mov ebp, 0xffffffe7
jmp 0x6b6ec3ce
mov dword [edi + 0x274], 1
mov ecx, dword [edi + 0xc]
mov eax, 0x20
sub eax, ecx
cmp eax, 5
mov dword [esp], esi
jae 0x6b6ec05d
mov ebp, dword [edi + 0x14]
dec ebp
nop
cmp ebp, 0xffffffff
je 0x6b6ec3c9
mov esi, dword [esp + 0x38]
mov edi, dword [esi + 8]
mov ebx, dword [esi + 0x10]
mov edx, edi
shr edx, 8
mov dword [esi + 8], edx
movzx edx, byte [ebx]
shld edx, edi, 0x18
mov dword [esi + 8], edx
add ecx, 0xfffffff8
mov dword [esi + 0xc], ecx
mov dword [esi + 0x14], ebp
inc ebx
mov dword [esi + 0x10], ebx
add eax, 8
dec ebp
cmp eax, 5
jb 0x6b6ec020
jmp 0x6b6ec063
mov eax, dword [esp + 4]
mov edx, dword [eax]
shr edx, cl
mov eax, edx
and eax, 1
lea ecx, [ecx + eax*4 + 1]
neg eax
shr edx, 1
and edx, 0xf
inc edx
and edx, eax
mov edi, dword [esp + 0x38]
mov dword [edi + 0x978], edx
mov dword [edi + 0xc], ecx
mov dword [edi + 0x274], 2
mov esi, dword [esp]
add edx, dword [esi]
lea eax, [edi + 0x980]
mov ecx, edx
push edi
push 0
push eax
call fcn.6b6eb270
add esp, 0xc
mov ebp, eax
cmp eax, 1
jne 0x6b6ec3ce
mov dword [edi + 0x97c], 0xffff
mov dword [edi + 0x274], 3
mov ecx, 0xffff
mov edx, dword [edi + 0x974]
mov eax, dword [edi + 0x978]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
mov eax, dword [eax]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
cmp ecx, 0xffff
setne al
cmp edx, dword [esp + 0xc]
jb 0x6b6ec180
cmp ecx, 0xffff
jne 0x6b6ec180
mov edi, dword [esp + 0x38]
mov ecx, dword [edi + 0xc]
cmp ecx, 0x20
jne 0x6b6ec14a
mov ecx, dword [edi + 0x14]
test ecx, ecx
je 0x6b6ec390
mov edx, dword [edi + 8]
mov esi, dword [edi + 0x10]
mov eax, edx
shr eax, 8
mov dword [edi + 8], eax
movzx eax, byte [esi]
shld eax, edx, 0x18
mov dword [edi + 8], eax
mov dword [edi + 0xc], 0x18
dec ecx
mov dword [edi + 0x14], ecx
inc esi
mov dword [edi + 0x10], esi
mov ecx, 0x18
jmp 0x6b6ec150
mov eax, dword [esp + 4]
mov eax, dword [eax]
lea edx, [ecx + 1]
mov dword [edi + 0xc], edx
mov esi, edi
mov ebp, 1
xor edi, edi
bt eax, ecx
jae 0x6b6ec39c
mov eax, dword [esp + 0x34]
mov ecx, dword [eax]
mov edx, dword [esp + 0xc]
push esi
call fcn.6b6edf80
add esp, 4
jmp 0x6b6ec39c
mov esi, ecx
mov ecx, dword [esp + 0x38]
add ecx, 0x980
mov dword [esp + 0x18], ecx
mov ecx, esi
mov dword [esp + 8], edx
test al, 1
jne 0x6b6ec280
mov eax, dword [esp + 0x38]
mov ecx, dword [eax + 0xc]
mov edx, 0x20
sub edx, ecx
cmp edx, 0xf
jae 0x6b6ec1fd
mov ebx, dword [eax + 0x14]
dec ebx
nop
nop
nop
nop
nop
nop
nop
cmp ebx, 0xffffffff
je 0x6b6ec348
mov ebp, dword [esp + 0x38]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov eax, edi
shr eax, 8
mov dword [ebp + 8], eax
movzx eax, byte [esi]
shld eax, edi, 0x18
mov dword [ebp + 8], eax
add ecx, 0xfffffff8
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], ebx
inc esi
mov dword [ebp + 0x10], esi
add edx, 8
dec ebx
cmp edx, 0xf
jb 0x6b6ec1c0
jmp 0x6b6ec203
mov eax, dword [esp + 4]
mov eax, dword [eax]
shr eax, cl
movzx edi, al
mov esi, dword [esp + 0x38]
lea edx, [esi + edi*4 + 0x980]
movzx ebx, byte [esi + edi*4 + 0x980]
cmp ebx, 9
jb 0x6b6ec246
add ecx, 8
mov dword [esi + 0xc], ecx
movzx edi, word [esi + edi*4 + 0x982]
shr eax, 8
mov ebp, dword [0x6b83adb4]
and eax, dword [ebp + ebx*4 - 0x20]
and eax, 0x7f
add eax, edi
mov bl, byte [edx + eax*4]
lea edx, [edx + eax*4]
movzx eax, bl
add eax, ecx
mov dword [esi + 0xc], eax
movzx ecx, word [edx + 2]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 8]
test ecx, ecx
je 0x6b6ec371
mov eax, ecx
sub eax, dword [esp + 0x1c]
jbe 0x6b6ec280
mov esi, ecx
jmp 0x6b6ec375
mov edx, dword [esp + 0x38]
mov esi, ecx
mov ecx, dword [edx + 0xc]
mov eax, 0x20
sub eax, ecx
mov dword [esp], esi
cmp eax, esi
jae 0x6b6ec2e0
mov edi, dword [edx + 0x14]
dec edi
nop
cmp edi, 0xffffffff
je 0x6b6ec3b2
mov ebp, dword [esp + 0x38]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov edx, esi
shr edx, 8
mov dword [ebp + 8], edx
movzx edx, byte [ebx]
shld edx, esi, 0x18
mov dword [ebp + 8], edx
add ecx, 0xfffffff8
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], edi
inc ebx
mov dword [ebp + 0x10], ebx
add eax, 8
dec edi
cmp eax, dword [esp]
jb 0x6b6ec2a0
jmp 0x6b6ec2e6
mov eax, dword [esp + 4]
mov edx, dword [eax]
shr edx, cl
mov eax, dword [0x6b83adb4]
mov ebx, dword [esp]
and edx, dword [eax + ebx*4]
add ecx, ebx
mov eax, dword [esp + 0x38]
mov dword [eax + 0xc], ecx
mov edi, 1
mov ecx, ebx
shl edi, cl
add edi, edx
mov ecx, dword [esp + 8]
lea eax, [edi + ecx]
cmp eax, dword [esp + 0xc]
ja 0x6b6ec3a4
mov eax, dword [esp + 0x14]
add eax, ecx
push edi
push 0
push eax
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x14]
add esp, 0xc
nop
nop
inc edx
dec edi
jne 0x6b6ec330
mov ecx, dword [esp]
xor eax, eax
cmp edx, dword [esp + 0xc]
jb 0x6b6ec192
jmp 0x6b6ec105
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 4]
lea eax, [esp + 0x10]
push eax
call fcn.6b6eded0
add esp, 4
test eax, eax
je 0x6b6ec3ab
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 8]
test ecx, ecx
jne 0x6b6ec262
xor eax, eax
xor esi, esi
mov ecx, dword [esp + 0x14]
mov byte [ecx + edx], al
inc edx
mov ecx, esi
xor eax, eax
cmp edx, dword [esp + 0xc]
jb 0x6b6ec192
jmp 0x6b6ec105
mov esi, edi
mov ebp, 2
mov edi, 4
mov dword [esi + 0x274], edi
jmp 0x6b6ec3ce
mov ebp, 0xfffffff8
jmp 0x6b6ec3ce
mov dword [esp], 0xffff
mov ecx, dword [esp + 8]
mov eax, dword [esp + 0x38]
mov edx, dword [esp]
mov dword [eax + 0x97c], edx
mov dword [eax + 0x974], ecx
mov ebp, 2
mov eax, ebp
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret