Function at 0x42a710
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
push 0x2c
push edi
push esi
mov dword [ebp - 0xc], edi
call sub.MSVCRT.dll_memset
mov ebx, dword [ebp + 0xc]
add esp, 0xc
mov edx, dword [ebx + 4]
test edx, edx
jle 0x42a74f
mov eax, dword [ebx + 8]
mov ecx, edx
lea esp, [esp]
cmp dword [eax], 0
jle 0x42a746
inc edi
add eax, 4
dec ecx
jne 0x42a740
mov dword [ebp - 0xc], edi
mov dword [esi + 4], edx
mov dword [esi + 8], edi
mov eax, dword [ebx]
mov dword [esi], eax
test edi, edi
jle 0x42ac36
push edi
push dword [ebx + 4]
push dword [ebx + 8]
call fcn.0042a490
add esp, 0xc
mov dword [ebp - 8], eax
lea eax, [edi*4]
call fcn.00455cf2
mov eax, dword [ebp - 8]
mov ecx, esp
mov dword [ebp - 0x10], ecx
test eax, eax
jne 0x42a7a1
push esi
call fcn.0042a6a0
add esp, 4
or eax, 0xffffffff
lea esp, [ebp - 0x28]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jle 0x42a830
sub ecx, eax
mov dword [ebp - 4], edi
mov ebx, eax
mov dword [ebp - 0x14], ecx
mov esi, ecx
mov ecx, dword [ebx]
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
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
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
lea eax, [edx + edx]
and ecx, 0x55555555
xor ecx, eax
mov dword [ebx], ecx
mov dword [esi + ebx], ebx
add ebx, 4
dec edi
jne 0x42a7b5
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
push 0x42a680
push 4
push edi
push ecx
call sub.MSVCRT.dll_qsort
add esp, 0x10
lea eax, [edi*4]
call fcn.00455cf2
lea eax, [edi*4]
mov dword [ebp - 4], esp
push eax
call sub.MSVCRT.dll_malloc
mov edx, dword [ebp - 4]
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], eax
test edi, edi
jle 0x42a8b0
mov ebx, dword [ebp - 0x10]
nop
mov eax, dword [ebx + ecx*4]
sub eax, dword [ebp - 8]
sar eax, 2
mov dword [edx + eax*4], ecx
inc ecx
cmp ecx, edi
jl 0x42a870
mov ebx, dword [ebp + 0xc]
test edi, edi
jle 0x42a8b0
mov eax, dword [ebp - 8]
mov ebx, edx
sub eax, edx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], eax
mov edx, dword [ebx]
lea ebx, [ebx + 4]
mov ecx, dword [esi + 0x14]
mov eax, dword [eax + ebx - 4]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x10]
dec edi
jne 0x42a895
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp + 0xc]
push dword [ebp - 8]
call sub.MSVCRT.dll_free
push dword [ebp - 4]
push edi
push ebx
call fcn.0042a190
mov dword [esi + 0x10], eax
lea eax, [edi*4]
push eax
call sub.MSVCRT.dll_malloc
xor edx, edx
mov dword [esi + 0x18], eax
add esp, 0x14
xor edi, edi
cmp dword [ebx + 4], edx
jle 0x42a8fd
mov eax, dword [ebx + 8]
cmp dword [eax + edx*4], 0
jle 0x42a8f7
mov eax, dword [ebp - 4]
mov ecx, dword [eax + edi*4]
inc edi
mov eax, dword [esi + 0x18]
mov dword [eax + ecx*4], edx
inc edx
cmp edx, dword [ebx + 4]
jl 0x42a8e1
push edi
call sub.MSVCRT.dll_malloc
xor ecx, ecx
mov dword [esi + 0x1c], eax
xor edi, edi
mov dword [ebp + 0xc], ecx
add esp, 4
mov dword [ebp - 0xc], edi
cmp dword [ebx + 4], ecx
jle 0x42a950
jmp 0x42a920
mov eax, dword [ebx + 8]
cmp dword [eax + ecx*4], 0
lea eax, [eax + ecx*4]
mov dword [ebp - 0x14], eax
jle 0x42a944
mov eax, dword [ebp - 4]
mov ecx, dword [esi + 0x1c]
mov edx, dword [eax + edi*4]
inc edi
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
mov byte [edx + ecx], al
mov ecx, dword [ebp + 0xc]
inc ecx
mov dword [ebp + 0xc], ecx
cmp ecx, dword [ebx + 4]
jl 0x42a920
mov dword [ebp - 0xc], edi
mov eax, dword [esi + 8]
xor ecx, ecx
test eax, eax
je 0x42a965
lea esp, [esp]
inc ecx
shr eax, 1
jne 0x42a960
lea eax, [ecx - 4]
mov dword [esi + 0x24], eax
cmp eax, 5
jge 0x42a977
mov dword [esi + 0x24], 5
cmp dword [esi + 0x24], 8
jle 0x42a984
mov dword [esi + 0x24], 8
mov ecx, dword [esi + 0x24]
mov eax, 1
shl eax, cl
push 4
push eax
mov dword [ebp - 0x14], eax
call sub.MSVCRT.dll_calloc
add esp, 8
mov dword [esi + 0x20], eax
xor ebx, ebx
mov dword [esi + 0x28], 0
test edi, edi
jle 0x42aa8e
mov ecx, dword [esi + 0x1c]
movsx eax, byte [ecx + ebx]
cmp dword [esi + 0x28], eax
jge 0x42a9bf
mov dword [esi + 0x28], eax
movsx ecx, byte [ecx + ebx]
mov dword [ebp - 8], ecx
cmp ecx, dword [esi + 0x24]
jg 0x42aa85
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + ebx*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
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
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
lea eax, [edx + edx]
and ecx, 0x55555555
xor edx, edx
xor ecx, eax
mov dword [ebp + 0xc], edx
mov dword [ebp - 4], ecx
mov eax, 1
mov ecx, dword [esi + 0x24]
sub ecx, dword [ebp - 8]
shl eax, cl
test eax, eax
jle 0x42aa85
mov eax, dword [esi + 0x1c]
lea edi, [ebx + 1]
mov cl, byte [ebx + eax]
mov eax, dword [esi + 0x20]
shl edx, cl
or edx, dword [ebp - 4]
mov dword [eax + edx*4], edi
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x24]
mov edx, dword [ebp + 0xc]
inc edx
movsx eax, byte [eax + ebx]
sub ecx, eax
mov dword [ebp + 0xc], edx
mov eax, 1
shl eax, cl
cmp edx, eax
jl 0x42aa50
mov edi, dword [ebp - 0xc]
inc ebx
cmp ebx, edi
jl 0x42a9b0
mov ecx, 0x1f
mov eax, 0xfffffffe
sub ecx, dword [esi + 0x24]
xor ebx, ebx
shl eax, cl
xor edi, edi
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [ebp - 0x14], eax
jle 0x42ac36
mov ecx, 0x20
sub ecx, dword [esi + 0x24]
shl eax, cl
mov ecx, eax
mov dword [ebp + 0xc], eax
rol ecx, 0x10
mov edx, ecx
mov dword [ebp - 0x1c], ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
mov eax, ecx
shl eax, 8
and edx, 0xff00ff
xor edx, eax
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov eax, dword [esi + 0x20]
mov dword [ebp - 8], eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor ecx, eax
mov eax, dword [ebp - 8]
cmp dword [eax + ecx*4], 0
jne 0x42ac26
mov edx, dword [ebp - 0xc]
lea ecx, [ebx + 1]
cmp ecx, edx
jge 0x42ab61
mov eax, dword [esi + 0x14]
mov esi, dword [ebp + 0xc]
lea eax, [eax + ebx*4]
add eax, 4
cmp dword [eax], esi
ja 0x42ab5e
inc ecx
inc ebx
add eax, 4
cmp ecx, edx
jl 0x42ab51
mov esi, dword [ebp + 8]
cmp edi, edx
jge 0x42ab82
mov eax, dword [esi + 0x14]
lea ecx, [eax + edi*4]
jmp 0x42ab70
mov eax, dword [ecx]
and eax, dword [ebp - 0x18]
cmp dword [ebp + 0xc], eax
jb 0x42ab82
inc edi
add ecx, 4
cmp edi, edx
jl 0x42ab70
mov eax, edx
mov dword [ebp + 0xc], ebx
sub eax, edi
mov dword [ebp - 0x10], eax
cmp ebx, 0x7fff
jbe 0x42ab9c
mov edx, 0x7fff
mov dword [ebp + 0xc], edx
cmp eax, 0x7fff
jbe 0x42abaa
mov dword [ebp - 0x10], 0x7fff
mov ecx, dword [ebp - 0x1c]
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
mov eax, edx
shl eax, 4
shr ecx, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov eax, dword [ebp + 0xc]
or eax, 0xffff0000
mov ecx, edx
shl eax, 0xf
or eax, dword [ebp - 0x10]
mov dword [ebp + 0xc], eax
lea eax, [edx + edx]
shr ecx, 1
xor ecx, eax
lea eax, [edx + edx]
mov edx, dword [ebp + 0xc]
and ecx, 0x55555555
xor ecx, eax
mov eax, dword [ebp - 8]
mov dword [eax + ecx*4], edx
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 0x14]
jl 0x42aab2
xor eax, eax
lea esp, [ebp - 0x28]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret