Function at 0x57f180
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63f68d
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 ebx, ecx
call fcn.00409430
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 0
mov edx, dword [ebx + 0x18]
test dl, 1
jne 0x57f3a6
mov edi, dword [ebp + 8]
xor esi, esi
test dl, 2
jne 0x57f239
mov eax, dword [edi + 0x1c]
xor eax, dword [edi + 0x18]
xor eax, dword [edi + 0x14]
xor eax, dword [edi + 0x10]
movzx edx, word [edi + 0x20]
movzx ecx, word [edi + 0x22]
bswap eax
shl edx, 0x10
or edx, ecx
xor eax, edx
xor edx, edx
xor eax, dword [edi + 0xc]
xor eax, dword [edi + 8]
xor eax, dword [edi + 4]
xor eax, dword [edi]
div dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
lea esi, [eax + edx*4]
mov dword [ebp - 0x18], esi
mov esi, dword [esi]
test esi, esi
je 0x57f233
nop
push edi
lea ecx, [esi + 4]
call fcn.0042c870
test al, al
jne 0x57f264
mov esi, dword [esi]
test esi, esi
jne 0x57f220
mov edx, dword [ebx + 0x18]
mov esi, dword [ebp - 0x18]
mov eax, dword [ebx + 8]
cmp dword [ebx + 0xc], eax
jb 0x57f38e
mov esi, 2
lea ecx, [eax + eax]
cmp eax, esi
cmovb ecx, esi
cmp ecx, dword [ebx + 0xc]
jae 0x57f271
mov eax, dword [ebp - 0x14]
mov esi, 3
jmp 0x57f3d1
mov eax, dword [ebp - 0x14]
mov esi, 1
jmp 0x57f3d1
mov eax, dword [ebx]
push edx
push ebx
push ecx
mov ecx, ebx
call dword [eax + 8]
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x57f3a6
mov cl, byte [esi + 0x18]
not cl
test cl, 1
je 0x57f3a6
cmp dword [ebx + 0x14], 0
je 0x57f34a
cmp dword [ebx + 0x10], 0
mov dword [ebp - 0x18], 0
jbe 0x57f34a
xor eax, eax
xor edx, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edx
nop dword [eax + eax]
mov ecx, dword [ebx + 0x14]
mov ecx, dword [eax + ecx]
test ecx, ecx
je 0x57f31e
nop word [eax + eax]
mov edi, dword [ecx]
dec dword [ebx + 0xc]
mov eax, dword [ecx + 0x20]
xor eax, dword [ecx + 0x1c]
xor eax, dword [ecx + 0x18]
xor eax, dword [ecx + 0x14]
movzx esi, word [ecx + 0x24]
movzx edx, word [ecx + 0x26]
bswap eax
shl esi, 0x10
or esi, edx
xor edx, edx
xor eax, esi
mov esi, dword [ebp - 0x24]
xor eax, dword [ecx + 0x10]
xor eax, dword [ecx + 0xc]
xor eax, dword [ecx + 8]
xor eax, dword [ecx + 4]
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edx, [eax + edx*4]
mov eax, dword [edx]
mov dword [ecx], eax
mov dword [edx], ecx
mov ecx, edi
inc dword [esi + 0xc]
test edi, edi
jne 0x57f2d0
mov edx, dword [ebp - 0x20]
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebp - 0x18]
inc ecx
mov dword [ebp - 0x18], ecx
mov dword [edx + eax], 0
add edx, 4
mov eax, dword [ebp - 0x1c]
add eax, 4
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
cmp ecx, dword [ebx + 0x10]
jb 0x57f2c0
mov edi, dword [ebp + 8]
mov eax, dword [ebx]
mov ecx, ebx
push esi
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax + 0xc]
mov eax, dword [edi + 0x1c]
xor eax, dword [edi + 0x18]
xor eax, dword [edi + 0x14]
xor eax, dword [edi + 0x10]
movzx edx, word [edi + 0x20]
movzx ecx, word [edi + 0x22]
bswap eax
shl edx, 0x10
or edx, ecx
xor eax, edx
xor edx, edx
xor eax, dword [edi + 0xc]
xor eax, dword [edi + 8]
xor eax, dword [edi + 4]
xor eax, dword [edi]
div dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
lea esi, [eax + edx*4]
push ecx
lea ecx, [ebx + 4]
push ecx
mov ecx, dword [ecx]
call fcn.00582a70
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x57f3b0
lea esi, [eax + 2]
jmp 0x57f3d1
mov eax, dword [ebp - 0x14]
mov esi, 2
jmp 0x57f3d1
push dword [ebp + 0xc]
mov ecx, eax
push edi
call fcn.00582620
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
xor eax, eax
inc dword [ebx + 0xc]
xor esi, esi
mov dword [ebp - 0x14], eax
test eax, eax
je 0x57f3e3
push ecx
lea ecx, [ebp - 0x2c]
push ecx
mov ecx, dword [ebp - 0x28]
push eax
call fcn.0057bb60
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