Function at 0x570f90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
cmp dword [esi + 0xb0], 2
mov dword [esi + 0xac], 0
jne 0x571004
push 1
call fcn.00570e30
test eax, eax
je 0x570ffa
mov eax, dword [esi + 0x74]
test eax, eax
jne 0x570fc8
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x6c]
mov ecx, dword [esi + 0x68]
test edx, edx
ja 0x570fd8
jb 0x570fbe
cmp ecx, eax
jb 0x570fbe
sub ecx, eax
push eax
push dword [esi + 0x70]
sbb edx, 0
mov dword [esi + 0x68], ecx
lea ecx, [esi + 0x10]
mov dword [esi + 0x6c], edx
call fcn.0048e930
movzx eax, al
xor eax, 1
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0xb0], 0
mov eax, dword [esi + 0x3c]
mov ecx, 8
sub ecx, dword [esi + 0x38]
shr eax, cl
shr eax, 0x10
cmp dword [esi + 0x9c], 0x25
movzx ecx, al
mov eax, 0x5c5918
push ebx
push edi
mov edi, 0x5c5948
mov dword [ebp - 8], ecx
cmovae edi, eax
mov eax, dword [esi + 0xa8]
add eax, 0x10
xor ebx, ebx
add eax, edi
mov dword [ebp - 4], eax
movzx edx, byte [edi]
xor edx, ecx
mov ecx, 8
movzx eax, byte [eax]
sub ecx, eax
shr edx, cl
test edx, edx
je 0x57107c
mov edx, dword [ebp - 4]
sub edx, edi
nop word [eax + eax]
movzx eax, byte [edx + edi + 1]
lea edi, [edi + 1]
mov ecx, 8
inc ebx
sub ecx, eax
movzx eax, byte [edi]
xor eax, dword [ebp - 8]
shr eax, cl
test eax, eax
jne 0x571060
mov eax, dword [ebp - 4]
movzx eax, byte [ebx + eax]
add eax, dword [esi + 0x38]
mov dword [esi + 0x38], eax
cmp eax, 8
jb 0x5710cd
nop
mov eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x44]
jb 0x5710af
lea ecx, [esi + 0x40]
call fcn.00554db0
test al, al
jne 0x5710ac
inc dword [esi + 0x60]
or dl, 0xff
jmp 0x5710b5
mov eax, dword [esi + 0x40]
mov dl, byte [eax]
inc eax
mov dword [esi + 0x40], eax
mov ecx, dword [esi + 0x3c]
add dword [esi + 0x38], 0xfffffff8
shl ecx, 8
movzx eax, dl
or ecx, eax
cmp dword [esi + 0x38], 8
mov dword [esi + 0x3c], ecx
jae 0x571090
cmp ebx, 9
jb 0x5711be
jne 0x571115
inc dword [esi + 0xb0]
mov eax, dword [esi + 0x74]
test eax, eax
jne 0x5710f1
pop edi
pop ebx
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x6c]
mov ecx, dword [esi + 0x68]
test edx, edx
ja 0x571101
jb 0x5710e5
cmp ecx, eax
jb 0x5710e5
sub ecx, eax
push eax
push dword [esi + 0x70]
sbb edx, 0
mov dword [esi + 0x68], ecx
mov dword [esi + 0x6c], edx
jmp 0x57125f
mov dword [esi + 0xb0], 0
mov ecx, esi
cmp ebx, 0xe
jne 0x57116d
push 0x5c5908
call fcn.00570eb0
push 0xf
mov ecx, esi
lea edi, [eax + 5]
call fcn.00570e30
add eax, 0x7fff
mov dword [esi + 0x74], edi
mov dword [esi + 0x70], eax
test edi, edi
je 0x5710e5
mov edx, dword [esi + 0x6c]
mov ecx, dword [esi + 0x68]
test edx, edx
ja 0x57115b
jb 0x5710e5
cmp ecx, edi
jb 0x5710e5
sub ecx, edi
push edi
sbb edx, 0
mov dword [esi + 0x68], ecx
mov dword [esi + 0x6c], edx
push eax
jmp 0x57125f
mov eax, dword [esi + 0x78]
sub eax, ebx
mov dword [ebp - 8], ebx
inc eax
and eax, 3
push 0x5c58e8
mov edi, dword [esi + eax*4 + 0x7c]
call fcn.00570eb0
mov ebx, eax
cmp ebx, 0xff
jne 0x5711a7
cmp dword [ebp - 8], 0xa
jne 0x5711a7
xor dword [esi + 0xa8], 0x10
xor eax, eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
cmp edi, 0x100
jb 0x57121a
mov eax, dword [esi + 0xbc]
inc ebx
dec eax
cmp edi, eax
jb 0x57121a
inc ebx
jmp 0x57121a
mov ecx, dword [esi + 0x9c]
add ecx, ebx
mov dword [esi + 0xb0], 0
mov eax, ecx
shr eax, 4
sub ecx, eax
mov dword [esi + 0x9c], ecx
mov ecx, esi
push 0x5c58b8
call fcn.00570eb0
movzx ecx, al
mov edi, dword [esi + ecx*4 + 0x4c0]
test al, al
je 0x57121a
dec dword [esi + edi*4 + 0x14c0]
mov eax, dword [esi + ecx*4 + 0x4bc]
inc dword [esi + eax*4 + 0x14c0]
mov dword [esi + ecx*4 + 0x4c0], eax
mov dword [esi + ecx*4 + 0x4bc], edi
mov eax, dword [esi + 0x78]
mov dword [esi + eax*4 + 0x7c], edi
mov eax, dword [esi + 0x78]
inc eax
mov dword [esi + 0x70], edi
and eax, 3
add ebx, 2
mov dword [esi + 0x78], eax
mov dword [esi + 0x74], ebx
je 0x5710e5
mov ecx, dword [esi + 0x6c]
mov eax, dword [esi + 0x68]
test ecx, ecx
ja 0x571252
jb 0x5710e5
cmp eax, ebx
jb 0x5710e5
sub eax, ebx
push ebx
sbb ecx, 0
mov dword [esi + 0x68], eax
mov dword [esi + 0x6c], ecx
push edi
lea ecx, [esi + 0x10]
call fcn.0048e930
pop edi
movzx eax, al
pop ebx
xor eax, 1
pop esi
mov esp, ebp
pop ebp
ret