Function at 0x4105b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5eae84]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor edi, edi
push 0x34
mov esi, ecx
push edi
push esi
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x14], edi
call sub.MSVCR110.dll_memset
mov ecx, dword [ebp - 0x10]
add esp, 0xc
mov edx, dword [ecx + 4]
mov dword [ebp - 8], edx
test edx, edx
jle 0x410602
mov eax, dword [ecx + 8]
jmp 0x4105f0
cmp dword [eax], 0
jle 0x4105f6
inc edi
add eax, 4
dec edx
jne 0x4105f0
mov edx, dword [ebp - 8]
mov dword [ebp - 0x14], edi
mov dword [esi + 4], edx
mov dword [esi + 8], edi
mov eax, dword [ecx]
mov dword [esi], eax
test edi, edi
jle 0x410c68
mov edx, dword [ecx + 4]
mov ecx, dword [ecx + 8]
push edi
call fcn.0040ff10
mov dword [ebp - 0x18], eax
lea eax, [edi*4]
add esp, 4
mov dword [ebp - 0x1c], eax
call fcn.0057e3b0
mov ecx, dword [ebp - 0x18]
mov edx, esp
mov dword [ebp - 8], edx
test ecx, ecx
jne 0x4106ab
mov eax, dword [esi + 0x10]
mov edi, dword [sym.imp.MSVCR110.dll_free]
test eax, eax
je 0x410654
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x410661
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x18]
test eax, eax
je 0x41066e
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x41067b
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x20]
test eax, eax
je 0x410688
push eax
call edi
add esp, 4
push 0x34
push 0
push esi
call sub.MSVCR110.dll_memset
add esp, 0xc
or eax, 0xffffffff
lea esp, [ebp - 0x30]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057d22e
mov esp, ebp
pop ebp
ret
xor eax, eax
test edi, edi
jle 0x4108bb
cmp edi, 4
jb 0x41082b
cmp dword [0x641030], 2
jl 0x41082b
movdqa xmm4, xmmword [0x5c69f0]
lea eax, [ecx - 4]
movd xmm0, ecx
lea eax, [eax + edi*4]
pshufd xmm3, xmm0, 0
cmp edx, eax
ja 0x4106f4
lea eax, [edi - 1]
lea eax, [edx + eax*4]
cmp eax, ecx
jae 0x410829
mov eax, edi
and eax, 0x80000003
jns 0x410702
dec eax
or eax, 0xfffffffc
inc eax
mov esi, edi
sub esi, eax
mov eax, 0x10
movd xmm5, eax
mov eax, 8
movd xmm6, eax
mov eax, 4
movd xmm7, eax
mov eax, edx
sub eax, ecx
mov dword [ebp - 0xc], eax
mov edi, eax
xor eax, eax
mov dword [ebp - 0x20], esi
mov esi, ecx
lea edx, [eax + 2]
movdqu xmm0, xmmword [esi]
lea esi, [esi + 0x10]
movdqa xmm1, xmm0
psrld xmm0, xmm5
pslld xmm1, xmm5
pand xmm0, xmmword [0x5c6a20]
pand xmm1, xmmword [0x5c6ae0]
por xmm1, xmm0
movdqa xmm0, xmm1
pslld xmm0, xmm6
psrld xmm1, xmm6
pand xmm0, xmmword [0x5c6ad0]
pand xmm1, xmmword [0x5c6a30]
por xmm0, xmm1
movdqa xmm1, xmm0
psrld xmm0, xmm7
pslld xmm1, xmm7
pand xmm0, xmmword [0x5c6a40]
pand xmm1, xmmword [0x5c6ac0]
por xmm1, xmm0
movd xmm0, edx
movdqa xmm2, xmm1
pslld xmm2, xmm0
psrld xmm1, xmm0
pand xmm2, xmmword [0x5c6ab0]
pand xmm1, xmmword [str.3333333333333333]
por xmm2, xmm1
mov edx, 1
movdqa xmm0, xmm2
movd xmm1, edx
pslld xmm0, xmm1
psrld xmm2, xmm1
pand xmm0, xmmword [0x5c6aa0]
pand xmm2, xmmword [0x5c6a70]
por xmm0, xmm2
movdqu xmmword [esi - 0x10], xmm0
movd xmm0, eax
pshufd xmm0, xmm0, 0
paddd xmm0, xmm4
pmulld xmm0, xmmword [0x5c6a00]
paddd xmm0, xmm3
add eax, 4
movdqu xmmword [edi + esi - 0x10], xmm0
mov edx, 2
cmp eax, dword [ebp - 0x20]
jl 0x410734
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
jmp 0x41082b
xor eax, eax
cmp eax, edi
jge 0x4108bb
sub edx, ecx
mov dword [ebp - 0x20], edi
lea esi, [ecx + eax*4]
mov dword [ebp - 0xc], edx
sub edi, eax
mov ecx, dword [esi]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
shr ecx, 4
mov eax, edx
shl eax, 4
xor ecx, eax
and ecx, 0xf0f0f0f
shl edx, 4
xor ecx, edx
mov edx, ecx
lea eax, [ecx*4]
shr edx, 2
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
and ecx, 0x55555555
lea eax, [edx + edx]
xor ecx, eax
mov eax, dword [ebp - 0xc]
mov dword [esi], ecx
mov dword [esi + eax], esi
add esi, 4
dec edi
jne 0x410840
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
push 0x410580
push 4
push edi
push edx
call dword [sym.imp.MSVCR110.dll_qsort]
add esp, 0x10
lea eax, [edi*4]
call fcn.0057e3b0
lea eax, [edi*4]
mov dword [ebp - 0xc], esp
push eax
call dword [sym.imp.MSVCR110.dll_malloc]
mov edx, dword [ebp - 0xc]
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], eax
test edi, edi
jle 0x410941
mov esi, dword [ebp - 8]
lea esp, [esp]
mov eax, dword [esi + ecx*4]
sub eax, dword [ebp - 0x18]
sar eax, 2
mov dword [edx + eax*4], ecx
inc ecx
cmp ecx, edi
jl 0x410900
mov esi, dword [ebp - 0x24]
test edi, edi
jle 0x410941
mov eax, dword [ebp - 0x18]
sub eax, edx
mov dword [ebp - 8], edi
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x28], eax
mov edi, edx
dec dword [ebp - 8]
mov edx, dword [edi]
mov eax, dword [eax + edi]
mov ecx, dword [esi + 0x14]
lea edi, [edi + 4]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x28]
jne 0x410928
mov edi, dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.MSVCR110.dll_free]
lea eax, [esi + 0xc]
push eax
push dword [ebp - 0xc]
mov edx, edi
mov edi, dword [ebp - 0x10]
mov ecx, edi
call fcn.00410190
push dword [ebp - 0x1c]
mov dword [esi + 0x10], eax
call dword [sym.imp.MSVCR110.dll_malloc]
xor ecx, ecx
add esp, 0x10
mov dword [esi + 0x18], eax
xor edx, edx
mov dword [ebp - 8], ecx
cmp dword [edi + 4], ecx
jle 0x4109a2
jmp 0x410980
mov eax, dword [edi + 8]
cmp dword [eax + edx*4], 0
jle 0x41099c
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + ecx*4]
mov eax, dword [esi + 0x18]
mov dword [eax + ecx*4], edx
mov ecx, dword [ebp - 8]
inc ecx
mov dword [ebp - 8], ecx
inc edx
cmp edx, dword [edi + 4]
jl 0x410980
push ecx
call dword [sym.imp.MSVCR110.dll_malloc]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 0x10]
xor ecx, ecx
xor edi, edi
add esp, 4
mov dword [ebp - 0x14], edi
mov dword [ebp - 8], ecx
cmp dword [eax + 4], ecx
jle 0x4109f4
mov eax, dword [eax + 8]
cmp dword [eax + ecx*4], 0
lea eax, [eax + ecx*4]
mov dword [ebp - 0x1c], eax
jle 0x4109e5
mov eax, dword [ebp - 0xc]
mov ecx, dword [esi + 0x1c]
mov edx, dword [eax + edi*4]
mov eax, dword [ebp - 0x1c]
inc edi
mov al, byte [eax]
mov byte [edx + ecx], al
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
inc ecx
mov dword [ebp - 8], ecx
cmp ecx, dword [eax + 4]
jl 0x4109c1
mov dword [ebp - 0x14], edi
mov eax, dword [esi + 8]
xor ecx, ecx
test eax, eax
je 0x410a05
lea ecx, [ecx]
inc ecx
shr eax, 1
jne 0x410a00
add ecx, 0xfffffffc
mov edx, 5
cmp ecx, edx
mov eax, ecx
cmovl eax, edx
mov dword [esi + 0x24], eax
cmp eax, 8
mov ecx, 8
cmovg eax, ecx
mov dword [esi + 0x24], eax
mov ecx, dword [esi + 0x24]
mov eax, 1
shl eax, cl
push 4
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.MSVCR110.dll_calloc]
xor edi, edi
add esp, 8
mov dword [esi + 0x20], eax
mov dword [esi + 0x28], 0
mov dword [ebp - 8], edi
cmp dword [ebp - 0x14], edi
jle 0x410b39
mov ecx, dword [esi + 0x1c]
movsx eax, byte [ecx + edi]
cmp dword [esi + 0x28], eax
jge 0x410a65
mov dword [esi + 0x28], eax
movsx ecx, byte [ecx + edi]
mov dword [ebp - 0x28], ecx
cmp ecx, dword [esi + 0x24]
jg 0x410b2c
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + edi*4]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
shr ecx, 4
mov eax, edx
shl eax, 4
xor ecx, eax
and ecx, 0xf0f0f0f
shl edx, 4
xor ecx, edx
mov edx, ecx
lea eax, [ecx*4]
shr edx, 2
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
and ecx, 0x55555555
lea eax, [edx + edx]
xor ecx, eax
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x24]
sub ecx, dword [ebp - 0x28]
mov eax, 1
shl eax, cl
xor edx, edx
mov dword [ebp - 0x10], edx
test eax, eax
jle 0x410b2c
mov eax, dword [esi + 0x1c]
mov ecx, dword [ebp - 8]
inc edi
mov cl, byte [ecx + eax]
mov eax, dword [esi + 0x20]
shl edx, cl
or edx, dword [ebp - 0x20]
mov dword [eax + edx*4], edi
mov eax, dword [esi + 0x1c]
mov edi, dword [ebp - 8]
mov ecx, dword [esi + 0x24]
movsx eax, byte [eax + edi]
mov edx, dword [ebp - 0x10]
sub ecx, eax
mov eax, 1
shl eax, cl
inc edx
mov dword [ebp - 0x10], edx
cmp edx, eax
jl 0x410af6
inc edi
mov dword [ebp - 8], edi
cmp edi, dword [ebp - 0x14]
jl 0x410a56
mov ecx, 0x1f
sub ecx, dword [esi + 0x24]
mov eax, 0xfffffffe
shl eax, cl
xor edi, edi
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x18], eax
jle 0x410c68
mov ecx, 0x20
sub ecx, dword [esi + 0x24]
shl eax, cl
mov ecx, eax
rol ecx, 0x10
mov edx, ecx
mov dword [ebp - 8], eax
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
shr ecx, 4
mov eax, edx
shl eax, 4
xor ecx, eax
and ecx, 0xf0f0f0f
shl edx, 4
xor ecx, edx
mov edx, ecx
lea eax, [ecx*4]
shr edx, 2
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
and ecx, 0x55555555
lea eax, [edx + edx]
xor ecx, eax
mov eax, dword [esi + 0x20]
cmp dword [eax + ecx*4], 0
lea eax, [eax + ecx*4]
mov dword [ebp - 0x28], eax
jne 0x410c58
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
inc edx
cmp edx, ecx
jge 0x410c12
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp - 0x14]
add eax, 4
nop
cmp dword [eax], esi
ja 0x410c0f
inc dword [ebp - 0xc]
inc edx
add eax, 4
cmp edx, ecx
jl 0x410c00
mov esi, dword [ebp - 0x24]
cmp edi, ecx
jge 0x410c32
mov eax, dword [esi + 0x14]
lea edx, [eax + edi*4]
lea esp, [esp]
mov eax, dword [edx]
and eax, dword [ebp - 0x1c]
cmp dword [ebp - 8], eax
jb 0x410c32
inc edi
add edx, 4
cmp edi, ecx
jl 0x410c20
mov eax, dword [ebp - 0xc]
sub ecx, edi
cmp eax, 0x7fff
mov edx, 0x7fff
cmova eax, edx
cmp ecx, edx
cmova ecx, edx
or eax, 0xffff0000
shl eax, 0xf
or eax, ecx
mov ecx, dword [ebp - 0x28]
mov dword [ecx], eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x18]
jl 0x410b62
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057d22e
mov esp, ebp
pop ebp
ret