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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov ebp, dword [esp + 0x4c]
mov eax, dword [ebp + 0x28c]
cmp eax, 5
ja case.default.0x4c35f3
mov edi, edx
lea edx, [ebp + 8]
mov dword [esp + 0x10], edx
lea edx, [ebp + 0x95e]
mov dword [esp + 0x24], edx
lea edx, [ebp + 0x94c]
jmp dword [eax*4 + 0x830520]
mov eax, dword [ebp + 0xc]
cmp eax, 2
jae 0x4c3a4e
mov esi, dword [ebp + 0x10]
cmp esi, dword [ebp + 0x18]
je 0x4c40d0
mov dword [esp + 8], edx
movzx edx, byte [esi]
mov ebx, edi
mov edi, ecx
mov ecx, eax
shl edx, cl
mov ecx, edi
mov edi, ebx
or edx, dword [ebp + 8]
or eax, 8
inc esi
mov dword [ebp + 0x10], esi
jmp 0x4c3a58
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov eax, ebp
mov ebp, dword [ebp + 0x290]
mov ecx, dword [eax + 0x2a0]
mov dword [esp + 0xc], ecx
mov eax, dword [eax + 0x2a4]
mov dword [esp], eax
cmp ebp, 0x11
jbe 0x4c3c3d
cmp dword [esp + 0xc], 1
mov ebp, dword [esp + 0x4c]
je 0x4c367a
mov eax, 0xfffffffa
cmp dword [esp], 0
jne 0x4c40d5
mov esi, dword [esp + 4]
lea eax, [ebp + 0x2a8]
mov edi, dword [esp + 0x24]
push edi
push dword [esp + 0xc]
push eax
call fcn.004c79e0
add esp, 0xc
xorps xmm0, xmm0
movups xmmword [edi + 0x10], xmm0
movups xmmword [edi], xmm0
mov ebx, dword [ebp + 0x328]
movaps xmm0, xmmword [0x8304d0]
movups xmmword [ebp + 0x8cc], xmm0
movdqa xmm0, xmmword [0x8304e0]
movdqu xmmword [ebp + 0x8dc], xmm0
pcmpeqd xmm0, xmm0
movdqu xmmword [ebx - 0x20], xmm0
movaps xmm1, xmmword [0x8304f0]
movups xmmword [ebp + 0x8ec], xmm1
movaps xmm1, xmmword [0x830500]
movups xmmword [ebp + 0x8fc], xmm1
movdqu xmmword [ebx - 0x10], xmm0
movsd xmm0, qword [0x830510]
movups xmmword [ebp + 0x294], xmm0
mov dword [ebp + 0x2a4], 0x8000
mov dword [ebp + 0x28c], 5
mov dword [esp], 0x8000
mov dword [esp + 0x18], 8
mov dword [esp + 8], 0
mov dword [esp + 0x14], 0
xor edi, edi
jmp 0x4c37ac
mov dword [esp + 4], edi
mov edx, dword [ebp + 0x290]
mov edi, dword [ebp + 0x29c]
jmp 0x4c3adb
mov edi, dword [ebp + 0x29c]
cmp edi, 3
jne 0x4c4037
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x4c4006
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
dec ecx
jmp 0x4c4021
mov eax, dword [ebp + 0xc]
jmp 0x4c3a7a
mov esi, edi
mov eax, dword [ebp + 0x2a4]
mov dword [esp], eax
mov eax, dword [ebp + 0x2a0]
mov dword [esp + 0x14], eax
mov edi, dword [ebp + 0x29c]
mov eax, dword [ebp + 0x294]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x298]
mov dword [esp + 0x18], eax
mov ebx, dword [ebp + 0x328]
push dword [esp + 0x10]
call fcn.004c8930
add esp, 4
test eax, eax
je 0x4c3a30
mov dword [esp + 4], esi
cmp edi, esi
setb al
cmp dword [esp], 0
setne cl
and cl, al
cmp cl, 1
jne 0x4c4073
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 4]
jmp 0x4c382c
mov edx, dword [esp + 8]
mov dword [ebp + edx*4 + 0x8cc], ecx
mov cl, 0xf
sub cl, dl
mov edi, edx
mov edx, dword [esp + 0x28]
mov esi, edx
shl esi, cl
sub dword [esp], esi
add word [ebp + edi*2 + 0x95e], dx
mov ecx, dword [esp + 4]
cmp eax, ecx
jae 0x4c4073
mov edi, eax
cmp dword [esp], 0
je 0x4c4073
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0xc], eax
jae 0x4c3d43
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
cmp eax, 0x10
ja 0x4c3868
mov ebp, dword [esp + 0xc]
movzx edx, word [ebp]
mov ecx, eax
shl edx, cl
or esi, edx
add eax, 0x10
add ebp, 2
mov dword [esp + 0xc], ebp
mov ecx, dword [esp + 0x4c]
mov dword [ecx + 0x10], ebp
mov ebp, dword [esp + 0x4c]
mov edx, esi
and edx, 0x1f
movzx ecx, byte [ebp + edx*4 + 0x2a8]
sub eax, ecx
shr esi, cl
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], esi
movzx edx, word [ebp + edx*4 + 0x2aa]
cmp edx, 0xf
ja 0x4c38e0
test edx, edx
je 0x4c38ba
mov eax, dword [ebp + edx*4 + 0x8cc]
mov word [ebx + eax*2], di
mov dword [ebp + edx*4 + 0x8cc], edi
mov eax, 0x8000
mov ecx, edx
shr eax, cl
sub dword [esp], eax
inc word [ebp + edx*2 + 0x95e]
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 4]
inc edi
mov dword [esp + 0x14], 0
mov eax, edi
cmp eax, ecx
jb 0x4c3820
jmp 0x4c4073
mov dword [esp + 0x20], 0
xor ecx, ecx
cmp edx, 0x10
mov edx, 0
cmove edx, dword [esp + 0x18]
sete cl
xor ecx, 3
mov ebp, dword [0x88fc7c]
mov ebp, dword [ebp + ecx*4]
and ebp, esi
mov dword [esp + 0x1c], ebp
shr esi, cl
sub eax, ecx
mov ebp, dword [esp + 0x4c]
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], esi
cmp dword [esp + 8], edx
jne 0x4c3940
mov edx, dword [esp + 0x14]
test edx, edx
je 0x4c3944
lea eax, [edx - 2]
shl eax, cl
mov dword [esp + 0x20], edx
jmp 0x4c3946
mov dword [esp + 8], edx
xor eax, eax
mov ebp, dword [esp + 0x1c]
mov esi, ebp
mov edx, eax
add ebp, eax
add ebp, 3
mov eax, ebp
sub eax, dword [esp + 0x20]
mov dword [esp + 0x28], eax
add eax, edi
mov ecx, dword [esp + 4]
cmp eax, ecx
ja 0x4c4068
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 8]
test ebp, ebp
je 0x4c3a0d
mov ecx, dword [esp + 0x4c]
mov ecx, dword [ecx + ebp*4 + 0x8cc]
add edx, esi
sub edx, dword [esp + 0x20]
mov esi, edx
lea ebp, [edx + 3]
and ebp, 7
je 0x4c39ad
nop word cs:[eax + eax]
mov word [ebx + ecx*2], di
mov ecx, edi
inc edi
dec ebp
jne 0x4c39a0
lea ecx, [edi - 1]
add esi, 2
cmp esi, 7
mov ebp, dword [esp + 0x4c]
jb 0x4c37f0
dec edi
nop
lea esi, [edi + 1]
mov word [ebx + ecx*2], si
lea ecx, [edi + 2]
mov word [ebx + edi*2 + 2], cx
lea ecx, [edi + 3]
mov word [ebx + edi*2 + 4], cx
lea ecx, [edi + 4]
mov word [ebx + edi*2 + 6], cx
lea ecx, [edi + 5]
mov word [ebx + edi*2 + 8], cx
lea ecx, [edi + 6]
mov word [ebx + edi*2 + 0xa], cx
lea ecx, [edi + 7]
mov word [ebx + edi*2 + 0xc], cx
lea ecx, [edi + 8]
mov word [ebx + edi*2 + 0xe], cx
add edi, 9
cmp edi, eax
mov edi, ecx
jne 0x4c39c0
jmp 0x4c37f0
mov dword [esp + 8], 0
mov ebp, dword [esp + 0x4c]
cmp eax, ecx
jb 0x4c3820
jmp 0x4c4073
mov eax, 0xffffffe1
jmp 0x4c40d5
mov edi, dword [ebp + 0x29c]
mov eax, dword [ebp + 0x2a4]
mov dword [esp], eax
mov ecx, esi
cmp edi, ecx
jb 0x4c3d78
jmp 0x4c407c
mov dword [esp + 8], edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx]
mov esi, ebp
mov ebp, edx
and ebp, 3
mov dword [esi + 0x290], ebp
add eax, 0xfffffffe
mov dword [esi + 0xc], eax
shr edx, 2
mov dword [esi + 8], edx
cmp ebp, 1
jne 0x4c3bfa
cmp eax, 2
jae 0x4c3aaa
mov ebp, dword [esp + 0x4c]
mov esi, dword [ebp + 0x10]
cmp esi, dword [ebp + 0x18]
je 0x4c3d2f
mov dword [esp + 4], edi
movzx edx, byte [esi]
mov edi, ecx
mov ecx, eax
shl edx, cl
mov ecx, edi
or edx, dword [ebp + 8]
or eax, 8
inc esi
mov dword [ebp + 0x10], esi
jmp 0x4c3ab8
mov dword [esp + 4], edi
mov edx, dword [esp + 0x10]
mov edx, dword [edx]
mov ebp, dword [esp + 0x4c]
mov edi, edx
and edi, 3
mov dword [ebp + 0x29c], edi
add eax, 0xfffffffe
mov dword [ebp + 0xc], eax
shr edx, 2
mov dword [ebp + 8], edx
mov dword [ebp + 0x290], 0
xor edx, edx
dec ecx
bsr eax, ecx
xor eax, 0xffffffe0
add eax, 0x21
test ecx, ecx
cmove eax, ecx
cmp edx, edi
jbe 0x4c3b34
test edi, edi
je 0x4c3bf3
xor eax, eax
mov ecx, 0x197
movzx edx, word [ebp + eax*2 + 0x32c]
inc eax
mov esi, ecx
nop dword [eax + eax]
cmp dx, word [ebp + esi*2]
je 0x4c3be9
lea ebx, [esi + 1]
add esi, 0xfffffe6b
cmp esi, edi
mov esi, ebx
jbe 0x4c3b10
inc ecx
cmp eax, edi
jne 0x4c3afd
jmp 0x4c374f
mov ebx, dword [ebp + 0xc]
mov dword [esp], edx
cmp ebx, eax
jae 0x4c3b80
mov esi, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
nop word cs:[eax + eax]
cmp esi, edx
je 0x4c3bc8
movzx ebp, byte [esi]
mov ecx, ebx
shl ebp, cl
mov ecx, dword [esp + 0x4c]
or ebp, dword [ecx + 8]
mov dword [ecx + 8], ebp
add ebx, 8
mov dword [ecx + 0xc], ebx
inc esi
mov dword [ecx + 0x10], esi
cmp ebx, eax
jb 0x4c3b50
jmp 0x4c3b86
mov ecx, dword [esp + 0x10]
mov ebp, dword [ecx]
mov ecx, dword [0x88fc7c]
mov edx, dword [ecx + eax*4]
and edx, ebp
mov ecx, eax
shr ebp, cl
sub ebx, eax
mov ecx, dword [esp + 0x4c]
mov dword [ecx + 0xc], ebx
mov dword [ecx + 8], ebp
cmp edx, dword [esp + 4]
jae 0x4c40dd
mov ebp, ecx
mov ecx, dword [esp]
mov word [ebp + ecx*2 + 0x32c], dx
mov edx, ecx
inc edx
cmp edx, edi
jbe 0x4c3b37
jmp 0x4c3aee
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp]
mov dword [eax + 0x290], ecx
mov dword [eax + 0x28c], 2
mov eax, 2
jmp 0x4c40d5
mov eax, 0xfffffffb
jmp 0x4c40d5
xor edi, edi
jmp 0x4c4037
mov dword [esp + 4], edi
mov eax, dword [esp + 0x4c]
mov dword [eax + 0x2a4], 0x20
mov dword [eax + 0x2a0], 0
xorps xmm0, xmm0
mov ecx, dword [esp + 8]
movups xmmword [ecx + 0xe], xmm0
movups xmmword [ecx], xmm0
mov dword [eax + 0x28c], 4
mov dword [esp], 0x20
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 0xc]
jmp 0x4c3c5a
inc ebp
cmp ebp, 0x12
je 0x4c3660
movzx edi, byte [ebp + 0x8308b4]
cmp eax, 4
jae 0x4c3c90
mov ebx, dword [esp + 0x4c]
mov edx, dword [ebx + 0x10]
cmp edx, dword [ebx + 0x18]
je 0x4c3cf6
movzx esi, byte [edx]
mov ecx, eax
shl esi, cl
or esi, dword [ebx + 8]
or eax, 8
inc edx
mov dword [ebx + 0x10], edx
jmp 0x4c3c96
mov ecx, dword [esp + 0x10]
mov esi, dword [ecx]
mov edx, esi
and edx, 0xf
movzx ecx, byte [edx + 0x8308c6]
movzx ebx, byte [edx + 0x8308d6]
sub eax, ecx
shr esi, cl
mov ecx, dword [esp + 0x4c]
mov dword [ecx + 0xc], eax
mov dword [ecx + 8], esi
mov byte [ecx + edi + 0x94c], bl
mov ecx, 0x1111
bt ecx, edx
jb 0x4c3c50
mov edx, 0x20
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x24]
inc word [ecx + ebx*2]
mov ecx, dword [esp]
sub ecx, edx
inc dword [esp + 0xc]
mov dword [esp], ecx
add ecx, 0xffffffdf
cmp ecx, 0xffffffe0
jae 0x4c3c50
jmp 0x4c3660
test eax, eax
je 0x4c3d13
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
and edx, 0xf
movzx ecx, byte [edx + 0x8308c6]
cmp eax, ecx
jae 0x4c3d24
jmp 0x4c40a9
xor edx, edx
movzx ecx, byte [edx + 0x8308c6]
cmp eax, ecx
jb 0x4c40a9
mov esi, dword [esp + 0x10]
mov esi, dword [esi]
jmp 0x4c3ca2
mov dword [ebp + 0x28c], 1
mov eax, 2
jmp 0x4c40d5
mov dword [ebp + 0x29c], edi
mov eax, dword [esp + 0x14]
mov dword [ebp + 0x2a0], eax
mov eax, dword [esp + 0x18]
mov dword [ebp + 0x298], eax
mov eax, dword [esp + 8]
mov dword [ebp + 0x294], eax
mov eax, dword [esp]
mov dword [ebp + 0x2a4], eax
cmp edi, ecx
jae 0x4c407c
xor esi, esi
mov dword [esp + 4], ecx
nop
cmp dword [esp], 0
je 0x4c4087
test esi, esi
je 0x4c3dc0
mov edx, dword [ebp + 0x10]
cmp edx, dword [ebp + 0x18]
je 0x4c40d0
movzx esi, byte [edx]
mov eax, dword [ebp + 0xc]
mov ecx, eax
shl esi, cl
or dword [ebp + 8], esi
add eax, 8
mov dword [ebp + 0xc], eax
inc edx
mov dword [ebp + 0x10], edx
test eax, eax
je 0x4c3dc7
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
jmp 0x4c3dc9
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4c3db5
xor edx, edx
mov dword [esp + 0xc], edx
and edx, 0x1f
mov ebp, dword [esp + 0x4c]
movzx ecx, byte [ebp + edx*4 + 0x2a8]
mov esi, 1
mov ebx, eax
sub ebx, ecx
jb 0x4c3e60
movzx edx, word [ebp + edx*4 + 0x2aa]
cmp edx, 0xf
ja 0x4c3e50
mov dword [ebp + 0xc], ebx
shr dword [ebp + 8], cl
mov eax, dword [ebp + 0x328]
mov dword [ebp + 0x2a0], 0
test edx, edx
je 0x4c3e45
mov ecx, dword [ebp + edx*4 + 0x8cc]
mov word [eax + ecx*2], di
mov dword [ebp + edx*4 + 0x8cc], edi
mov dword [ebp + 0x298], edx
mov eax, 0x8000
mov ecx, edx
shr eax, cl
mov ecx, dword [esp]
sub ecx, eax
mov dword [esp], ecx
mov dword [ebp + 0x2a4], ecx
inc word [ebp + edx*2 + 0x95e]
inc edi
mov dword [ebp + 0x29c], edi
xor esi, esi
jmp 0x4c3e60
lea ebx, [edx + ecx]
add ebx, 0xfffffff2
sub eax, ebx
jae 0x4c3e73
nop word [eax + eax]
mov ecx, edi
mov edi, ecx
cmp ecx, dword [esp + 4]
jb 0x4c3d80
jmp 0x4c407c
mov esi, dword [esp + 0xc]
shr esi, cl
mov ecx, dword [0x88fc7c]
and esi, dword [ecx + edx*4 - 0x38]
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x4c]
mov dword [esi + 0xc], eax
mov ecx, ebx
shr dword [esi + 8], cl
cmp edx, 0x10
jne 0x4c3ebb
mov edx, dword [esi + 0x298]
mov ecx, 2
cmp dword [esi + 0x294], edx
mov eax, dword [esp + 0xc]
mov dword [esp + 8], edx
je 0x4c3ed2
mov dword [esi + 0x294], edx
jmp 0x4c3ee5
xor edx, edx
mov ecx, 3
cmp dword [esi + 0x294], edx
mov eax, dword [esp + 0xc]
mov dword [esp + 8], edx
jne 0x4c3eb3
mov edx, dword [esi + 0x2a0]
test edx, edx
je 0x4c3ee5
lea ebp, [edx - 2]
shl ebp, cl
mov ecx, edx
jmp 0x4c3ee9
xor ebp, ebp
xor ecx, ecx
mov ebx, dword [esi + 0x328]
mov edx, ebp
add eax, ebp
add eax, 3
mov dword [esi + 0x2a0], eax
sub eax, ecx
mov ebp, ecx
lea ecx, [eax + edi]
cmp ecx, dword [esp + 4]
ja 0x4c40f5
mov esi, dword [esp + 8]
test esi, esi
je 0x4c3fec
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + esi*4 + 0x8cc]
add edx, dword [esp + 0xc]
sub edx, ebp
mov esi, edx
lea ebp, [edx + 3]
and ebp, 7
je 0x4c3f4d
nop dword [eax + eax]
mov word [ebx + eax*2], di
mov eax, edi
inc edi
dec ebp
jne 0x4c3f40
lea eax, [edi - 1]
add esi, 2
cmp esi, 7
mov ebp, dword [esp + 0x4c]
jb 0x4c3fa8
dec edi
nop word [eax + eax]
lea esi, [edi + 1]
mov word [ebx + eax*2], si
lea eax, [edi + 2]
mov word [ebx + edi*2 + 2], ax
lea eax, [edi + 3]
mov word [ebx + edi*2 + 4], ax
lea eax, [edi + 4]
mov word [ebx + edi*2 + 6], ax
lea eax, [edi + 5]
mov word [ebx + edi*2 + 8], ax
lea eax, [edi + 6]
mov word [ebx + edi*2 + 0xa], ax
lea eax, [edi + 7]
mov word [ebx + edi*2 + 0xc], ax
lea eax, [edi + 8]
mov word [ebx + edi*2 + 0xe], ax
add edi, 9
cmp edi, ecx
mov edi, eax
jne 0x4c3f60
mov dword [ebp + 0x29c], ecx
mov ecx, dword [esp + 8]
mov dword [ebp + ecx*4 + 0x8cc], eax
mov eax, dword [ebp + 0x294]
mov edi, dword [ebp + 0x2a4]
mov cl, 0xf
sub cl, al
mov edx, dword [esp + 0x14]
mov esi, edx
shl esi, cl
sub edi, esi
mov dword [esp], edi
mov dword [ebp + 0x2a4], edi
add word [ebp + eax*2 + 0x95e], dx
mov ecx, dword [ebp + 0x29c]
jmp 0x4c3ff6
mov ebp, dword [esp + 0x4c]
mov dword [ebp + 0x29c], ecx
xor esi, esi
mov edi, ecx
cmp ecx, dword [esp + 4]
jb 0x4c3d80
jmp 0x4c407c
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [ebp + 0x18]
je 0x4c40e4
movzx eax, byte [ecx]
or eax, dword [ebp + 8]
inc ecx
mov dword [ebp + 0x10], ecx
mov ecx, 7
mov edi, eax
and edi, 1
mov dword [ebp + 0xc], ecx
shr eax, 1
mov dword [ebp + 8], eax
add edi, 3
mov dword [ebp + 0x29c], edi
lea eax, [ebp + 0x32c]
push edi
push eax
push 8
push dword [esp + 0x50]
call fcn.004c82b0
add esp, 0x10
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x4c4057
mov dword [ecx], eax
mov dword [ebp + 0x28c], 0
mov eax, 1
jmp 0x4c40d5
mov dword [esp], 0xfffff
mov ebp, dword [esp + 0x4c]
mov eax, dword [esp]
mov dword [ebp + 0x2a4], eax
mov eax, 0xfffffff9
cmp dword [esp], 0
jne 0x4c40d5
push dword [esp + 0x24]
push dword [ebp + 0x328]
push 8
push dword [esp + 0x50]
call fcn.004c7e60
add esp, 0x10
mov ecx, dword [esp + 0x48]
test ecx, ecx
jne 0x4c4055
jmp 0x4c4057
mov eax, dword [esp + 0x4c]
mov dword [eax + 0x290], ebp
mov ecx, dword [esp + 0xc]
mov dword [eax + 0x2a0], ecx
mov ecx, dword [esp]
mov dword [eax + 0x2a4], ecx
mov dword [eax + 0x28c], 4
mov eax, 2
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 0xfffffffc
jmp 0x4c40d5
mov dword [ebp + 0x28c], 3
mov eax, 2
jmp 0x4c40d5
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 4]
mov dword [eax + 0x29c], ecx
mov dword [eax + 0x2a4], 0xfffff
mov eax, 0xfffffff9
jmp 0x4c40d5