Function at 0x57bc40
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov eax, dword [0x5ecf58]
push ebp
cmp eax, 3
mov dword [esp + 4], 0
mov ebp, 2
jg 0x57bc61
call fcn.0057bf50
pop ebp
pop ecx
ret
mov eax, dword [0x5ecf5c]
test eax, eax
je 0x57bf0b
mov edx, dword [0x5ecf50]
mov ecx, dword [0x5fbf4c]
push ebx
push esi
push edi
xor eax, eax
and edx, 0xff
mov al, byte [ecx + 0x6208c2]
mov esi, ecx
and eax, 0x1fff
mov edi, dword [0x5fbf5c]
shl edx, 5
xor edx, eax
xor eax, eax
and esi, 0x7fff
mov dword [0x5ecf50], edx
mov ax, word [edx*2 + 0x5fc000]
mov word [edx*2 + 0x5fc000], cx
mov word [esi*2 + 0x6108a0], ax
mov esi, ebp
test eax, eax
mov dword [0x5fbf48], esi
mov ebp, 2
je 0x57bd30
cmp esi, dword [0x5ecf4c]
jae 0x57bd30
mov ebx, ecx
sub ebx, eax
cmp ebx, 0x7efa
ja 0x57bd30
push eax
call fcn.0057b9f0
mov ebp, eax
mov eax, dword [0x5ecf5c]
add esp, 4
cmp ebp, eax
jbe 0x57bcfe
mov ebp, eax
cmp ebp, 3
jne 0x57bdf0
mov ecx, dword [0x5fbf4c]
mov esi, dword [0x5fbf5c]
mov edx, ecx
sub edx, esi
cmp edx, 0x1000
jbe 0x57bd24
mov ebp, 2
mov edx, dword [0x5ecf50]
mov esi, dword [0x5fbf48]
cmp esi, 3
jb 0x57be28
cmp ebp, esi
ja 0x57be28
sub ecx, edi
add esi, 0xfffffffd
dec ecx
push esi
push ecx
call fcn.0057cdb0
mov esi, dword [0x5fbf48]
mov ecx, dword [0x5ecf5c]
mov edi, eax
mov edx, dword [0x5ecf50]
mov eax, 1
add esp, 8
sub eax, esi
add ecx, eax
sub esi, 2
mov dword [0x5ecf5c], ecx
mov ecx, dword [0x5fbf4c]
inc ecx
xor eax, eax
and edx, 0xff
mov al, byte [ecx + 0x6208c2]
and eax, 0x1fff
shl edx, 5
xor edx, eax
mov eax, ecx
and eax, 0x7fff
dec esi
mov bx, word [edx*2 + 0x5fc000]
mov word [edx*2 + 0x5fc000], cx
mov word [eax*2 + 0x6108a0], bx
jne 0x57bd7d
mov dword [0x5fbf48], esi
xor esi, esi
inc ecx
mov dword [0x5ecf50], edx
test edi, edi
mov dword [esp + 0x10], esi
mov ebp, 2
mov dword [0x5fbf4c], ecx
je 0x57beb8
mov edx, dword [0x5fbf60]
test edx, edx
jl 0x57be01
lea eax, [edx + 0x6208c0]
jmp 0x57be03
mov edx, dword [0x5ecf50]
mov ecx, dword [0x5fbf4c]
jmp 0x57bd2a
xor eax, eax
sub ecx, edx
push 0
push ecx
push eax
call fcn.0057c4a0
mov ecx, dword [0x5fbf4c]
mov edx, dword [0x5ecf50]
add esp, 0xc
mov dword [0x5fbf60], ecx
jmp 0x57beb8
mov esi, dword [esp + 0x10]
test esi, esi
je 0x57be9d
xor edx, edx
mov dl, byte [ecx + 0x6208bf]
push edx
push 0
call fcn.0057cdb0
add esp, 8
test eax, eax
je 0x57be7d
mov ecx, dword [0x5fbf60]
test ecx, ecx
jl 0x57be59
lea eax, [ecx + 0x6208c0]
jmp 0x57be5b
xor eax, eax
mov edx, dword [0x5fbf4c]
push 0
sub edx, ecx
push edx
push eax
call fcn.0057c4a0
mov ecx, dword [0x5fbf4c]
add esp, 0xc
mov dword [0x5fbf60], ecx
jmp 0x57be83
mov ecx, dword [0x5fbf4c]
mov eax, dword [0x5ecf5c]
mov edx, dword [0x5ecf50]
inc ecx
dec eax
mov dword [0x5fbf4c], ecx
mov dword [0x5ecf5c], eax
jmp 0x57beb8
mov eax, dword [0x5ecf5c]
inc ecx
mov esi, 1
dec eax
mov dword [esp + 0x10], esi
mov dword [0x5fbf4c], ecx
mov dword [0x5ecf5c], eax
mov eax, dword [0x5ecf5c]
cmp eax, 0x106
jae 0x57beeb
mov edi, dword [0x5ecf54]
test edi, edi
jne 0x57beeb
call fcn.0057bb40
mov eax, dword [0x5ecf5c]
mov edx, dword [0x5ecf50]
mov ecx, dword [0x5fbf4c]
cmp eax, 0x106
jb 0x57bec4
test eax, eax
jne 0x57bc7d
pop edi
test esi, esi
pop esi
pop ebx
je 0x57bf11
mov al, byte [ecx + 0x6208bf]
push eax
push 0
call fcn.0057cdb0
add esp, 8
mov ecx, dword [0x5fbf4c]
mov edx, dword [0x5fbf60]
test edx, edx
jl 0x57bf32
sub ecx, edx
lea eax, [edx + 0x6208c0]
push 1
push ecx
push eax
call fcn.0057c4a0
add esp, 0xc
pop ebp
pop ecx
ret
sub ecx, edx
xor eax, eax
push 1
push ecx
push eax
call fcn.0057c4a0
add esp, 0xc
pop ebp
pop ecx
ret