Function at 0x570a50
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov ecx, dword [esp + 0x50]
mov edi, dword [esp + 0x44]
mov edx, 1
shl edx, cl
mov esi, dword [esp + 0x3c]
mov eax, 1
lea ebp, [edx - 1]
cmp edi, 0xffffffff
mov dword [esp + 8], edx
je 0x570b22
add cl, 0xff
mov edx, 0x10000
shl edx, cl
sar edx, 0x10
mov dword [esp], edx
lea edx, [edi + 1]
test edi, edi
mov dword [esp + 4], edx
je 0x570b39
and edx, 0xfffffffe
mov eax, 1
mov ebx, ebp
xor ecx, ecx
jmp 0x570ad2
lea edi, [ecx + 1]
mov esi, dword [esp + 0x3c]
mov dword [esi + ebx*8 + 0xc], edi
add ebx, 0xffffffff
mov di, 1
mov esi, dword [esp + 0x54]
mov word [esi + ecx*2 + 2], di
add ecx, 2
cmp edx, ecx
je 0x570b3d
mov esi, dword [esp + 0x40]
movsx edi, word [esi + ecx*2]
cmp edi, 0xffffffff
je 0x570af0
cmp dword [esp], edi
mov esi, 0
cmovle eax, esi
jmp 0x570aff
mov esi, dword [esp + 0x3c]
mov dword [esi + ebx*8 + 0xc], ecx
add ebx, 0xffffffff
mov di, 1
mov esi, dword [esp + 0x54]
mov word [esi + ecx*2], di
mov esi, dword [esp + 0x40]
movsx edi, word [esi + ecx*2 + 2]
cmp edi, 0xffffffff
je 0x570ab0
cmp dword [esp], edi
mov esi, 0
cmovle eax, esi
jmp 0x570ac2
mov dword [esi], 1
mov dword [esi + 4], ecx
mov eax, edx
shr eax, 1
mov ecx, edx
shr ecx, 3
jmp 0x570da4
xor ecx, ecx
mov ebx, ebp
test byte [esp + 4], 1
mov edi, dword [esp + 0x3c]
je 0x570b76
mov edx, dword [esp + 0x40]
movsx edx, word [edx + ecx*2]
cmp edx, 0xffffffff
je 0x570b63
xor edi, edi
cmp dword [esp], edx
cmovle eax, edi
mov edi, dword [esp + 0x3c]
jmp 0x570b6e
mov dword [edi + ebx*8 + 0xc], ecx
add ebx, 0xffffffff
mov dx, 1
mov esi, dword [esp + 0x54]
mov word [esi + ecx*2], dx
mov dword [edi], eax
mov eax, dword [esp + 0x50]
mov dword [edi + 4], eax
mov eax, dword [esp + 8]
mov ecx, eax
shr ecx, 3
cmp ebx, ebp
jne 0x570d13
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x54]
lea ecx, [eax + 0x6a]
mov dword [esp + 4], ecx
add eax, 0xe2
mov dword [esp + 0x1c], eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
xor eax, eax
jmp 0x570be0
add ebx, esi
mov ecx, dword [esp]
lea eax, [ecx + 1]
add edi, 0x1010101
adc edx, 0x1010101
cmp ecx, dword [esp + 0x44]
mov ecx, edi
je 0x570d9a
mov edi, eax
mov eax, dword [esp + 0x40]
mov dword [esp], edi
movsx esi, word [eax + edi*2]
mov eax, dword [esp + 4]
mov dword [eax + ebx + 4], edx
mov dword [eax + ebx], ecx
cmp esi, 9
mov edi, ecx
jl 0x570bc0
mov dword [esp + 0xc], edi
mov eax, dword [esp + 4]
add eax, ebx
mov dword [esp + 0x14], esi
add esi, 0xfffffff7
mov ecx, 8
cmp esi, 0x18
jb 0x570ce9
mov dword [esp + 0x10], ebx
shr esi, 3
add esi, 1
mov dword [esp + 0x24], esi
and esi, 0xfffffffc
movd xmm0, dword [esp + 0xc]
movd xmm1, edx
punpckldq xmm0, xmm1
pshufd xmm0, xmm0, 0x44
mov dword [esp + 0x20], esi
lea ecx, [esi - 4]
mov edi, ecx
shr edi, 2
add edi, 1
mov esi, edi
and esi, 3
xor ebx, ebx
cmp ecx, 0xc
jb 0x570ca7
and edi, 0xfffffffc
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
add ecx, ebx
xor ebx, ebx
nop dword [eax]
movdqu xmmword [ecx + ebx*8 - 0x70], xmm0
movdqu xmmword [ecx + ebx*8 - 0x60], xmm0
movdqu xmmword [ecx + ebx*8 - 0x50], xmm0
movdqu xmmword [ecx + ebx*8 - 0x40], xmm0
movdqu xmmword [ecx + ebx*8 - 0x30], xmm0
movdqu xmmword [ecx + ebx*8 - 0x20], xmm0
movdqu xmmword [ecx + ebx*8 - 0x10], xmm0
movdqu xmmword [ecx + ebx*8], xmm0
add ebx, 0x10
add edi, 0xfffffffc
jne 0x570c70
test esi, esi
je 0x570cc8
shl ebx, 3
nop
mov ecx, ebx
or ecx, 8
movdqu xmmword [eax + ecx], xmm0
movdqu xmmword [eax + ecx + 0x10], xmm0
add ebx, 0x20
add esi, 0xffffffff
jne 0x570cb0
mov ecx, dword [esp + 0x20]
cmp dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x14]
je 0x570bc0
lea ecx, [ecx*8 + 8]
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x14]
nop word cs:[eax + eax]
nop dword [eax + eax]
mov dword [eax + ecx], edi
mov dword [eax + ecx + 4], edx
add ecx, 8
cmp ecx, esi
jl 0x570d00
jmp 0x570bc0
shr eax, 1
add eax, ecx
add eax, 3
xor ecx, ecx
xor edx, edx
jmp 0x570d2f
lea esi, [edx + 1]
cmp edx, dword [esp + 0x44]
mov edx, esi
je 0x570df9
mov esi, dword [esp + 0x40]
movsx esi, word [esi + edx*2]
test esi, esi
jle 0x570d20
cmp si, 1
mov dword [esp + 4], esi
je 0x570d80
and esi, 0xfffffffe
mov dword [esp], esi
xor esi, esi
nop dword [eax]
mov dword [edi + ecx*8 + 0xc], edx
nop word cs:[eax + eax]
nop
add ecx, eax
and ecx, ebp
cmp ecx, ebx
ja 0x570d60
mov dword [edi + ecx*8 + 0xc], edx
nop dword [eax]
add ecx, eax
and ecx, ebp
cmp ecx, ebx
ja 0x570d70
add esi, 2
cmp esi, dword [esp]
jne 0x570d50
test byte [esp + 4], 1
je 0x570d20
mov dword [edi + ecx*8 + 0xc], edx
nop dword [eax + eax]
add ecx, eax
and ecx, ebp
cmp ecx, ebx
ja 0x570d90
jmp 0x570d20
mov eax, dword [esp + 8]
shr eax, 1
mov ecx, dword [esp + 0x18]
add eax, ecx
add eax, 3
mov dword [esp], eax
mov eax, dword [esp]
add eax, eax
mov dword [esp + 4], eax
xor edx, edx
xor esi, esi
nop dword [eax]
mov edi, esi
and edi, ebp
mov ecx, dword [esp + 0x54]
movzx ebx, byte [ecx + edx + 0x6a]
mov eax, dword [esp + 0x3c]
mov dword [eax + edi*8 + 0xc], ebx
mov eax, dword [esp]
lea edi, [esi + eax]
and edi, ebp
movzx ebx, byte [ecx + edx + 0x6b]
mov eax, dword [esp + 0x3c]
mov dword [eax + edi*8 + 0xc], ebx
add esi, dword [esp + 4]
and esi, ebp
add edx, 2
cmp edx, dword [esp + 8]
jb 0x570dc0
mov eax, dword [esp + 0x50]
add eax, 0xffffffe1
mov dword [esp], eax
xor esi, esi
mov ebp, dword [esp + 0x54]
mov eax, dword [esp + 8]
nop dword [eax]
mov ecx, dword [esp + 0x3c]
mov edi, dword [ecx + esi*8 + 0xc]
movzx ebx, word [ebp + edi*2]
lea ecx, [ebx + 1]
mov word [ebp + edi*2], cx
bsr ecx, ebx
xor ecx, 0x1f
add ecx, dword [esp]
mov edx, dword [esp + 0x3c]
mov byte [edx + esi*8 + 0xb], cl
shl ebx, cl
sub ebx, eax
mov ecx, dword [esp + 0x3c]
mov word [ecx + esi*8 + 8], bx
mov ecx, dword [esp + 0x4c]
movzx ecx, byte [ecx + edi]
mov edx, dword [esp + 0x3c]
mov byte [edx + esi*8 + 0xa], cl
mov ecx, dword [esp + 0x48]
mov ecx, dword [ecx + edi*4]
mov edx, dword [esp + 0x3c]
mov dword [edx + esi*8 + 0xc], ecx
add esi, 1
cmp eax, esi
jne 0x570e10
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret