Function at 0x572070
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
xor ebp, ebp
push edi
mov edi, 2
cmp dword [esi + 0xd88], 3
jg 0x572094
push esi
call fcn.00571e70
add esp, 4
pop edi
pop esi
pop ebp
ret
mov eax, dword [esi + 0x76]
test eax, eax
je 0x5722c6
push ebx
cmp dword [esi], 0
jne 0x5722a9
mov edx, dword [esi + 0x6a]
mov eax, dword [esi + 0x4a]
xor ecx, ecx
mov ebx, dword [esi + 0x52]
mov cl, byte [edx + eax + 2]
and edx, 0x7fff
mov eax, ecx
mov ecx, dword [esi + 0x62]
and ecx, 0x1ff
and eax, 0x3fff
shl ecx, 5
xor eax, ecx
xor ecx, ecx
mov dword [esi + 0x62], eax
mov cx, word [ebx + eax*2]
mov eax, dword [esi + 0x4e]
test ecx, ecx
mov word [eax + edx*2], cx
mov edx, dword [esi + 0x62]
mov eax, dword [esi + 0x52]
mov bx, word [esi + 0x6a]
mov word [eax + edx*2], bx
mov ebx, dword [esi + 0x6e]
mov dword [esi + 0x66], edi
mov edi, 2
je 0x572145
mov edx, dword [esi + 0x66]
mov eax, dword [esi + 0x7e]
cmp edx, eax
jae 0x572145
mov eax, dword [esi + 0x6a]
sub eax, ecx
cmp eax, 0x7efa
ja 0x572145
push esi
push ecx
call fcn.00571c10
mov edi, eax
mov eax, dword [esi + 0x76]
add esp, 8
cmp edi, eax
jbe 0x57212b
mov edi, eax
cmp edi, 3
jne 0x572145
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x6e]
sub ecx, edx
cmp ecx, 0x1000
jbe 0x572145
mov edi, 2
mov eax, dword [esi + 0x66]
cmp eax, 3
jb 0x57221c
cmp edi, eax
ja 0x57221c
mov edx, dword [esi + 0x6a]
add eax, 0xfffffffd
sub edx, ebx
push esi
dec edx
push eax
push edx
call fcn.005731b0
mov ecx, dword [esi + 0x66]
mov edi, dword [esi + 0x76]
mov edx, 1
add esp, 0xc
sub edx, ecx
add edi, edx
add ecx, 0xfffffffe
mov dword [esi + 0x76], edi
mov dword [esi + 0x66], ecx
mov ebx, dword [esi + 0x6a]
mov ecx, dword [esi + 0x4a]
mov edi, dword [esi + 0x62]
inc ebx
mov dword [esi + 0x6a], ebx
mov edx, ebx
xor ebx, ebx
and edi, 0x1ff
mov bl, byte [edx + ecx + 2]
and edx, 0x7fff
mov ecx, ebx
mov ebx, dword [esi + 0x4e]
and ecx, 0x3fff
shl edi, 5
xor ecx, edi
mov edi, dword [esi + 0x52]
mov dword [esi + 0x62], ecx
mov cx, word [edi + ecx*2]
mov word [ebx + edx*2], cx
mov edx, dword [esi + 0x62]
mov ecx, dword [esi + 0x52]
mov di, word [esi + 0x6a]
mov word [ecx + edx*2], di
mov ecx, dword [esi + 0x66]
dec ecx
mov dword [esi + 0x66], ecx
jne 0x572185
mov ebx, dword [esi + 0x6a]
xor ebp, ebp
inc ebx
mov edi, 2
test eax, eax
mov dword [esi + 0x6a], ebx
mov ecx, ebx
je 0x57227b
mov edx, dword [esi + 0x5a]
test edx, edx
jl 0x572203
mov ebx, dword [esi + 0x4a]
mov eax, edx
add eax, ebx
jmp 0x572205
xor eax, eax
push esi
sub ecx, edx
push 0
push ecx
push eax
call fcn.00572f30
mov edx, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], edx
jmp 0x57227b
test ebp, ebp
je 0x572268
mov eax, dword [esi + 0x6a]
mov ecx, dword [esi + 0x4a]
xor edx, edx
push esi
mov dl, byte [eax + ecx - 1]
push edx
push 0
call fcn.005731b0
add esp, 0xc
test eax, eax
je 0x57226d
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x57224c
mov edx, dword [esi + 0x4a]
mov eax, ecx
add eax, edx
jmp 0x57224e
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 0
push edx
push eax
call fcn.00572f30
mov eax, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], eax
jmp 0x57226d
mov ebp, 1
mov ecx, dword [esi + 0x6a]
mov eax, dword [esi + 0x76]
inc ecx
dec eax
mov dword [esi + 0x6a], ecx
mov dword [esi + 0x76], eax
mov eax, dword [esi + 0x76]
mov ebx, 0x106
cmp eax, ebx
jae 0x57229e
mov eax, dword [esi + 0x72]
test eax, eax
jne 0x57229e
push esi
call fcn.00571d60
mov eax, dword [esi + 0x76]
add esp, 4
cmp eax, ebx
jb 0x572287
mov eax, dword [esi + 0x76]
test eax, eax
jne 0x5720a0
test ebp, ebp
pop ebx
je 0x5722c6
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x4a]
xor eax, eax
push esi
mov al, byte [ecx + edx - 1]
push eax
push 0
call fcn.005731b0
add esp, 0xc
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x5722d4
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x5722d6
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 1
push edx
push eax
call fcn.00572f30
add esp, 0x10
pop edi
pop esi
pop ebp
ret