Function at 0x5630a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor eax, eax
mov ecx, 0xd
mov edi, esi
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 4]
xor ebx, ebx
test eax, eax
jle 0x5630d2
mov ecx, dword [edi + 8]
cmp dword [ecx], 0
jle 0x5630cc
inc ebx
add ecx, 4
dec eax
jne 0x5630c6
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
mov ecx, dword [edi]
mov dword [esi], ecx
mov edx, dword [edi + 0x10]
mov dword [esi + 0x2c], edx
mov eax, dword [edi + 0x14]
mov dword [esi + 0x30], eax
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
push ebx
push ecx
push edx
call fcn.005629b0
mov dword [ebp - 4], eax
lea eax, [ebx*4]
mov dword [ebp - 8], eax
add eax, 3
add esp, 0xc
and eax, 0xfffffffc
call fcn.00478ba0
mov edx, dword [ebp - 4]
test edx, edx
mov eax, esp
mov dword [ebp - 0xc], eax
jne 0x56317f
mov eax, dword [esi + 0x10]
test eax, eax
mov edi, dword [sym.imp.MSVCR71.dll_free]
je 0x563133
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x563140
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x18]
test eax, eax
je 0x56314d
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x56315a
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x20]
test eax, eax
je 0x563167
push eax
call edi
add esp, 4
xor eax, eax
mov ecx, 0xd
mov edi, esi
rep stosd dword es:[edi], eax
or eax, 0xffffffff
lea esp, [ebp - 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
jle 0x56320e
sub eax, edx
mov dword [ebp - 0x10], eax
mov dword [ebp + 8], ebx
nop
mov eax, dword [edx]
mov ecx, eax
shr ecx, 0x10
shl eax, 0x10
or ecx, eax
mov eax, ecx
mov edi, ecx
shr eax, 8
shl ecx, 8
shl edi, 8
xor eax, edi
and eax, 0xff00ff
xor eax, ecx
mov ecx, eax
mov edi, eax
shr ecx, 4
shl eax, 4
shl edi, 4
xor ecx, edi
and ecx, 0xf0f0f0f
xor ecx, eax
mov eax, ecx
lea edi, [ecx*4]
shr eax, 2
xor eax, edi
shl ecx, 2
and eax, 0x33333333
xor eax, ecx
mov ecx, eax
shr ecx, 1
lea edi, [eax + eax]
xor ecx, edi
and ecx, 0x55555555
add eax, eax
xor ecx, eax
mov eax, dword [ebp + 8]
mov dword [edx], ecx
mov ecx, dword [ebp - 0x10]
mov dword [ecx + edx], edx
add edx, 4
dec eax
mov dword [ebp + 8], eax
jne 0x563190
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
push 0x562ca0
push 4
push ebx
push eax
call dword [sym.imp.MSVCR71.dll_qsort]
mov eax, dword [ebp - 8]
add eax, 3
add esp, 0x10
and eax, 0xfffffffc
call fcn.00478ba0
mov edx, dword [ebp - 8]
mov dword [ebp + 8], esp
push edx
call dword [sym.imp.MSVCR71.dll_malloc]
mov dword [esi + 0x14], eax
add esp, 4
xor eax, eax
test ebx, ebx
jle 0x56328e
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + eax*4]
sub edx, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sar edx, 2
mov dword [ecx + edx*4], eax
inc eax
cmp eax, ebx
jl 0x563247
test ebx, ebx
jle 0x56328e
mov eax, ecx
mov ecx, dword [ebp - 4]
sub ecx, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ebx
jmp 0x563274
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + eax]
mov edx, dword [eax]
mov edi, dword [esi + 0x14]
mov dword [edi + edx*4], ecx
mov ecx, dword [ebp - 0xc]
add eax, 4
dec ecx
mov dword [ebp - 0xc], ecx
jne 0x563271
mov edi, dword [ebp + 0xc]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCR71.dll_free]
mov ecx, dword [ebp + 8]
lea eax, [esi + 0xc]
push eax
push ecx
push ebx
push edi
call fcn.00562cc0
mov edx, dword [ebp - 8]
push edx
mov dword [esi + 0x10], eax
call dword [sym.imp.MSVCR71.dll_malloc]
mov dword [esi + 0x18], eax
mov edx, dword [edi + 4]
add esp, 0x18
xor ecx, ecx
xor eax, eax
test edx, edx
jle 0x5632e3
mov edx, dword [edi + 8]
cmp dword [edx + eax*4], 0
jle 0x5632db
mov edx, dword [ebp + 8]
mov edx, dword [edx + ecx*4]
mov ebx, dword [esi + 0x18]
mov dword [ebx + edx*4], eax
inc ecx
mov edx, dword [edi + 4]
inc eax
cmp eax, edx
jl 0x5632c5
push ecx
call dword [sym.imp.MSVCR71.dll_malloc]
mov dword [esi + 0x1c], eax
mov eax, dword [edi + 4]
xor ecx, ecx
add esp, 4
cmp eax, ecx
mov dword [ebp + 0xc], ecx
jle 0x563329
lea esp, [esp]
mov eax, dword [edi + 8]
mov edx, dword [eax + ecx*4]
test edx, edx
lea eax, [eax + ecx*4]
jle 0x563321
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov edx, dword [edx + ebx*4]
mov al, byte [eax]
mov ebx, dword [esi + 0x1c]
mov byte [edx + ebx], al
inc dword [ebp + 0xc]
mov eax, dword [edi + 4]
inc ecx
cmp ecx, eax
jl 0x563300
mov eax, dword [esi + 8]
xor ebx, ebx
xor ecx, ecx
cmp eax, ebx
je 0x56333b
shr eax, 1
inc ecx
cmp eax, ebx
jne 0x563334
lea eax, [ecx - 4]
cmp eax, 5
mov dword [esi + 0x24], eax
jge 0x56334d
mov dword [esi + 0x24], 5
mov ecx, dword [esi + 0x24]
mov eax, 8
cmp ecx, eax
jle 0x56335c
mov dword [esi + 0x24], eax
mov ecx, dword [esi + 0x24]
mov eax, 1
shl eax, cl
push 4
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.MSVCR71.dll_calloc]
mov dword [esi + 0x20], eax
mov eax, dword [ebp + 0xc]
add esp, 8
test eax, eax
mov dword [esi + 0x28], ebx
mov dword [ebp - 4], ebx
jle 0x563475
lea esp, [esp]
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x28]
lea eax, [ecx + ebx]
movsx ecx, byte [eax]
cmp edx, ecx
jge 0x5633a3
mov dword [esi + 0x28], ecx
movsx eax, byte [eax]
mov ecx, dword [esi + 0x24]
cmp eax, ecx
mov dword [ebp + 8], eax
jg 0x563466
mov edx, dword [esi + 0x14]
mov eax, dword [edx + ebx*4]
mov edx, eax
shl eax, 0x10
shr edx, 0x10
or edx, eax
mov eax, edx
mov edi, edx
shr eax, 8
shl edx, 8
shl edi, 8
xor eax, edi
and eax, 0xff00ff
xor eax, edx
mov edx, eax
mov edi, eax
shr edx, 4
shl eax, 4
shl edi, 4
xor edx, edi
and edx, 0xf0f0f0f
xor edx, eax
mov eax, edx
shr eax, 2
lea edi, [edx*4]
xor eax, edi
shl edx, 2
and eax, 0x33333333
xor eax, edx
mov edx, eax
lea edi, [eax + eax]
shr edx, 1
xor edx, edi
add eax, eax
and edx, 0x55555555
xor edx, eax
sub ecx, dword [ebp + 8]
mov eax, 1
shl eax, cl
xor edi, edi
test eax, eax
jle 0x563466
lea esp, [esp]
mov ecx, dword [esi + 0x1c]
mov cl, byte [ebx + ecx]
mov eax, edi
shl eax, cl
mov ecx, dword [esi + 0x20]
or eax, edx
mov dword [ebp + 8], eax
lea eax, [ebx + 1]
mov ebx, dword [ebp + 8]
mov dword [ecx + ebx*4], eax
mov eax, dword [esi + 0x1c]
mov ebx, dword [ebp - 4]
movsx eax, byte [ebx + eax]
mov ecx, dword [esi + 0x24]
sub ecx, eax
mov eax, 1
shl eax, cl
inc edi
cmp edi, eax
jl 0x563430
mov eax, dword [ebp + 0xc]
inc ebx
cmp ebx, eax
mov dword [ebp - 4], ebx
jl 0x563390
mov edi, dword [esi + 0x24]
mov ecx, 0x1f
sub ecx, edi
mov eax, 0xfffffffe
shl eax, cl
xor edi, edi
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x10], edi
mov dword [ebp - 4], edi
jle 0x563629
lea ecx, [ecx]
mov eax, dword [esi + 0x24]
mov ecx, 0x20
sub ecx, eax
shl edi, cl
mov ecx, edi
mov edx, edi
shl edx, 0x10
shr ecx, 0x10
or ecx, edx
mov eax, ecx
shr eax, 8
mov edx, ecx
shl edx, 8
xor eax, edx
and eax, 0xff00ff
mov edx, ecx
shl edx, 8
xor eax, edx
mov edx, eax
mov ebx, eax
shr edx, 4
shl ebx, 4
xor edx, ebx
shl eax, 4
and edx, 0xf0f0f0f
xor edx, eax
mov eax, edx
lea ebx, [edx*4]
shr eax, 2
xor eax, ebx
shl edx, 2
and eax, 0x33333333
xor eax, edx
mov edx, eax
shr edx, 1
lea ebx, [eax + eax]
xor edx, ebx
add eax, eax
and edx, 0x55555555
xor edx, eax
mov eax, dword [esi + 0x20]
cmp dword [eax + edx*4], 0
jne 0x563617
mov edx, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
lea eax, [edx + 1]
cmp eax, ebx
jge 0x56355b
mov ebx, dword [esi + 0x14]
lea edx, [ebx + edx*4 + 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 8], edx
lea esp, [esp]
mov edx, dword [ebp - 8]
cmp dword [edx], edi
ja 0x563558
inc dword [ebp + 8]
mov edx, dword [ebp - 8]
add edx, 4
inc eax
cmp eax, ebx
mov dword [ebp - 8], edx
jl 0x563540
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
cmp eax, ebx
jge 0x563590
mov edx, dword [esi + 0x14]
lea edx, [edx + eax*4]
mov dword [ebp - 8], edx
jmp 0x563570
mov edx, dword [ebp - 8]
mov edx, dword [edx]
and edx, dword [ebp - 0x14]
cmp edi, edx
jb 0x56358a
mov edx, dword [ebp - 8]
inc eax
add edx, 4
cmp eax, ebx
mov dword [ebp - 8], edx
jl 0x563570
mov edx, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov edi, ebx
sub edi, eax
cmp edx, 0x7fff
jbe 0x5635a1
mov edx, 0x7fff
cmp edi, 0x7fff
jbe 0x5635ae
mov edi, 0x7fff
mov eax, ecx
mov ebx, ecx
shr eax, 8
shl ecx, 8
shl ebx, 8
xor eax, ebx
and eax, 0xff00ff
xor eax, ecx
mov ecx, eax
mov ebx, eax
shr ecx, 4
shl eax, 4
shl ebx, 4
xor ecx, ebx
and ecx, 0xf0f0f0f
xor ecx, eax
mov eax, ecx
lea ebx, [ecx*4]
shr eax, 2
xor eax, ebx
shl ecx, 2
and eax, 0x33333333
xor eax, ecx
or edx, 0xffff0000
shl edx, 0xf
mov ecx, eax
or edx, edi
shr ecx, 1
lea edi, [eax + eax]
xor ecx, edi
add eax, eax
and ecx, 0x55555555
xor ecx, eax
mov eax, dword [esi + 0x20]
mov dword [eax + ecx*4], edx
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
inc edi
cmp edi, eax
mov dword [ebp - 4], edi
jl 0x5634a0
xor eax, eax
lea esp, [ebp - 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret