Function at 0x5660e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63e64d
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00409430
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x18]
test al, 1
je 0x56613d
mov esi, 2
jmp 0x56630e
xor ebx, ebx
test al, 2
jne 0x5661ab
mov eax, dword [ebp + 8]
mov ecx, eax
mov ebx, dword [eax + 4]
mov dword [ebp - 0x24], ebx
call fcn.005acb50
xor eax, ebx
xor edx, edx
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov edi, dword [eax + edx*4]
lea ebx, [eax + edx*4]
mov dword [ebp - 0x20], ebx
test edi, edi
je 0x5661ab
mov ebx, dword [ebp + 8]
mov ebx, dword [ebx]
nop
mov ecx, dword [edi + 4]
cmp ecx, ebx
je 0x56619a
test ecx, ecx
je 0x5661a2
test ebx, ebx
je 0x5661a2
mov eax, dword [ecx + 4]
cmp eax, dword [ebx + 4]
jne 0x5661a2
mov edx, dword [ebx + 0xc]
mov ecx, dword [ecx + 0xc]
push eax
call fcn.005a4c60
add esp, 4
test al, al
je 0x5661a2
mov eax, dword [ebp - 0x24]
cmp dword [edi + 8], eax
je 0x5661d2
mov edi, dword [edi]
test edi, edi
jne 0x566170
mov ebx, dword [ebp - 0x20]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
cmp edx, eax
jb 0x5662b9
mov edi, 2
lea ecx, [eax + eax]
cmp eax, edi
cmovb ecx, edi
cmp ecx, edx
jae 0x5661df
lea esi, [edi + 1]
jmp 0x56630e
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [edi + 0xc], eax
jmp 0x56630c
push dword [esi + 0x18]
mov eax, dword [esi]
push esi
push ecx
mov ecx, esi
call dword [eax + 8]
mov edi, eax
mov dword [ebp - 0x28], edi
test edi, edi
je 0x5662d1
mov cl, byte [edi + 0x18]
not cl
test cl, 1
je 0x5662d1
cmp dword [esi + 0x14], 0
je 0x56628e
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
cmp dword [esi + 0x10], ebx
jbe 0x56628e
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], edx
mov eax, dword [esi + 0x14]
mov eax, dword [ecx + eax]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x56626f
mov ebx, dword [eax]
lea edi, [eax + 4]
dec dword [esi + 0xc]
mov ecx, edi
call fcn.005acb50
xor eax, dword [edi + 4]
xor edx, edx
mov edi, dword [ebp - 0x28]
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
lea ecx, [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov eax, dword [ecx]
mov dword [ebp - 0x18], ebx
mov dword [edx], eax
mov eax, ebx
mov dword [ecx], edx
inc dword [edi + 0xc]
test ebx, ebx
jne 0x566231
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x1c]
mov eax, dword [esi + 0x14]
inc ebx
add ecx, 4
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ecx
mov dword [edx + eax], 0
add edx, 4
mov dword [ebp - 0x24], edx
cmp ebx, dword [esi + 0x10]
jb 0x566224
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 0xc]
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.005acb50
xor eax, dword [edi + 4]
xor edx, edx
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea ebx, [eax + edx*4]
jmp 0x5662bc
mov edi, dword [ebp + 8]
push ecx
lea ecx, [esi + 4]
push ecx
mov ecx, dword [ecx]
call fcn.00568160
mov ecx, eax
mov dword [ebp - 0x14], ecx
test ecx, ecx
jne 0x5662d8
mov esi, 2
jmp 0x56630e
mov eax, dword [edi]
test eax, eax
je 0x5662e3
lock inc dword [eax]
jmp 0x5662e5
xor eax, eax
mov dword [ecx + 4], eax
mov eax, dword [edi + 4]
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebx]
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov dword [ebx], eax
inc dword [esi + 0xc]
mov dword [ebp - 0x14], 0
xor esi, esi
lea eax, [ebp - 0x14]
mov eax, dword [eax]
test eax, eax
je 0x566325
push ecx
lea ecx, [ebp - 0x30]
push ecx
mov ecx, dword [ebp - 0x2c]
push eax
call fcn.00560ee0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc