Function at 0x571f9c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
add esi, 0xffffef06
xor edi, edi
xor ebx, ebx
mov eax, dword [ebp + 8]
mov word [eax - 0x1a6a], 2
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a56], 0
je 0x572282
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a56], 3
jb 0x572086
movzx eax, word [esi]
add eax, 3
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xb4c]
movzx eax, byte [edx + eax - 1]
mov edx, dword [ebp + 8]
mov dx, word [edx - 0x1a68]
shl edx, 5
xor ax, dx
and ax, 0x7fff
mov edx, dword [ebp + 8]
mov word [edx - 0x1a68], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a68]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xb54]
mov ax, word [edx + eax*2]
mov dx, word [esi]
and dx, 0x7fff
movzx edx, dx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xb50]
mov word [ecx + edx*2], ax
mov eax, dword [ebp + 8]
movzx eax, word [eax - 0x1a68]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xb54]
mov di, word [edx + eax*2]
mov edx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xb54]
mov cx, word [esi]
mov word [edx + eax*2], cx
test di, di
je 0x5720be
movzx eax, word [esi]
movzx edx, di
sub eax, edx
cmp eax, 0x7efa
ja 0x5720be
mov eax, dword [ebp + 8]
push eax
mov eax, edi
call fcn.00571bb8
pop ecx
mov ebx, eax
mov eax, dword [ebp + 8]
cmp bx, word [eax - 0x1a56]
jbe 0x5720be
mov eax, dword [ebp + 8]
mov bx, word [eax - 0x1a56]
cmp bx, 3
jb 0x57220e
mov eax, dword [ebp + 8]
push eax
movzx eax, word [esi]
mov edx, dword [ebp + 8]
movzx edx, word [edx - 0x1a5a]
sub eax, edx
movzx edx, bx
sub edx, 3
call fcn.0057076c
pop ecx
mov edx, dword [ebp + 8]
sub word [edx - 0x1a56], bx
mov edx, dword [ebp + 8]
cmp bx, word [edx - 0x1a5e]
ja 0x5721b1
dec ebx
inc word [esi]
movzx edx, word [esi]
add edx, 3
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xb4c]
movzx edx, byte [ecx + edx - 1]
mov ecx, dword [ebp + 8]
mov cx, word [ecx - 0x1a68]
shl ecx, 5
xor dx, cx
and dx, 0x7fff
mov ecx, dword [ebp + 8]
mov word [ecx - 0x1a68], dx
mov edx, dword [ebp + 8]
movzx edx, word [edx - 0x1a68]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xb54]
push dword [ecx + edx*2]
mov dx, word [esi]
and dx, 0x7fff
movzx edx, dx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xb50]
lea ecx, [ecx + edx*2]
pop edx
mov word [ecx], dx
mov edx, dword [ebp + 8]
movzx edx, word [edx - 0x1a68]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xb54]
lea edx, [ecx + edx*2]
push edx
mov dx, word [esi]
pop ecx
mov word [ecx], dx
dec ebx
test bx, bx
jne 0x572102
inc word [esi]
jmp 0x57223d
add word [esi], bx
xor ebx, ebx
movzx edx, word [esi]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xb4c]
movzx edx, byte [ecx + edx]
mov ecx, dword [ebp + 8]
mov word [ecx - 0x1a68], dx
movzx edx, word [esi]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x40c]
mov ecx, dword [ecx + 0xb4c]
movzx edx, byte [ecx + edx + 1]
mov ecx, dword [ebp + 8]
mov cx, word [ecx - 0x1a68]
shl ecx, 5
xor dx, cx
and dx, 0x7fff
mov ecx, dword [ebp + 8]
mov word [ecx - 0x1a68], dx
jmp 0x57223d
mov eax, dword [ebp + 8]
push eax
movzx eax, word [esi]
mov edx, dword [ebp + 8]
mov edx, dword [edx - 0x40c]
mov edx, dword [edx + 0xb4c]
movzx edx, byte [edx + eax]
xor eax, eax
call fcn.0057076c
pop ecx
mov edx, dword [ebp + 8]
dec word [edx - 0x1a56]
inc word [esi]
test al, al
je 0x572259
mov eax, dword [ebp + 8]
push eax
xor eax, eax
call fcn.00571e60
pop ecx
movzx eax, word [esi]
mov edx, dword [ebp + 8]
mov dword [edx - 0x1100], eax
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a56], 0x106
jae 0x572271
mov eax, dword [ebp + 8]
push eax
call fcn.00571810
pop ecx
mov eax, dword [ebp + 8]
cmp word [eax - 0x1a56], 0
jne 0x571fcc
mov eax, dword [ebp + 8]
push eax
mov eax, 1
call fcn.00571e60
pop ecx
pop edi
pop esi
pop ebx
pop ebp
ret