Function at 0x57c3b0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x40
push ebx
push ebp
mov ebp, dword [esp + 0x4c]
cmp dword [ebp + 8], 2
jne 0x57c3fd
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x57c3fd
push 3
push ebp
call fcn.0057e360
mov ebx, dword [esp + 0x58]
push esi
push ebx
push ebp
call fcn.0057db10
add esp, 0x14
test eax, eax
jne 0x57c3f0
mov dword [ebp + 0xc], 0xff
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
push 2
push ebp
call fcn.0057e360
add esp, 8
jmp 0x57c401
mov ebx, dword [esp + 0x50]
cmp dword [ebp + 8], 3
jne 0x57c42a
push esi
push ebx
push ebp
call fcn.0057db10
add esp, 0xc
test eax, eax
je 0x57c3e1
cmp eax, 0xfffffff4
jne 0x57c670
pop ebp
mov eax, 0x80000904
pop ebx
add esp, 0x40
ret
mov eax, dword [ebp + 0xc]
cmp eax, 0xda
push edi
je 0x57c49d
cmp eax, 0x10
je 0x57c591
push ebp
mov eax, 1
mov ecx, ebx
mov edi, esi
call fcn.0057bc00
add esp, 4
test eax, eax
jne 0x57c476
cmp byte [esi + 0xf], 2
je 0x57c466
pop edi
pop ebp
mov eax, 0x80001004
pop ebx
add esp, 0x40
ret
pop edi
mov dword [ebp + 0xc], 0xcd
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
xor eax, eax
mov ecx, 0x10
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
push eax
push ebp
call fcn.0057ba40
mov al, byte [esp + 0x20]
add esp, 8
cmp al, 0x20
jne 0x57c629
lea ecx, [ebx + 1]
push ebp
mov eax, 2
mov edi, esi
call fcn.0057bb80
add esp, 4
test eax, eax
jne 0x57c56a
mov cl, 0xff
lea ebx, [ebx]
cmp byte [eax + esi], 0
jne 0x57c50a
cmp byte [eax + esi + 1], cl
jne 0x57c50a
cmp byte [eax + esi + 2], cl
jne 0x57c50a
cmp byte [eax + esi + 3], cl
jne 0x57c50a
cmp byte [eax + esi + 4], cl
jne 0x57c50a
cmp byte [eax + esi + 5], cl
jne 0x57c50a
cmp byte [eax + esi + 6], cl
jne 0x57c50a
cmp byte [eax + esi + 7], cl
jne 0x57c50a
cmp byte [eax + esi + 8], cl
jne 0x57c50a
cmp byte [eax + esi + 9], cl
jne 0x57c50a
cmp byte [eax + esi + 0xa], cl
jne 0x57c50a
mov dl, byte [eax + esi + 0xb]
test dl, dl
je 0x57c525
inc eax
cmp eax, 0x930
jl 0x57c4c0
pop edi
mov dword [ebp + 0xc], 0
pop ebp
mov eax, 0x80000900
pop ebx
add esp, 0x40
ret
push 0x930
add eax, esi
push eax
push esi
call fcn.006f7070
lea eax, [esi + 0xc]
mov ecx, 0xa7ab20
add esp, 0xc
sub ecx, eax
mov edx, 0x249
mov edi, dword [ecx + eax]
xor dword [eax], edi
add eax, 4
dec edx
jne 0x57c545
cmp byte [esi + 0xf], 2
jne 0x57c45a
pop edi
mov dword [ebp + 0xc], 0xda
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
xor eax, eax
mov ecx, 0x10
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
cmp eax, 1
jne 0x57c604
lea ecx, [esp + 0xc]
push ecx
push ebp
call fcn.0057eb90
add esp, 8
lea ecx, [esp + 0x50]
push ecx
mov ecx, ebp
mov dword [esp + 0x54], 0
call fcn.0057bcd0
add esp, 4
test eax, eax
jne 0x57c663
mov ebx, dword [esp + 0x50]
test ebx, ebx
jle 0x57c663
push 0x930
push ebp
call fcn.0057bd40
add esp, 8
test eax, eax
jne 0x57c663
mov eax, dword [esp + 0x54]
push ebp
mov ecx, 1
mov edi, esi
call fcn.0057bb10
add esp, 4
test eax, eax
push ebx
push ebp
jne 0x57c65b
call fcn.0057bd40
add esp, 8
pop edi
mov dword [ebp + 0xc], 0x10
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
cmp eax, 2
jne 0x57c619
lea edx, [esp + 0xc]
push edx
push ebp
call fcn.0057e460
jmp 0x57c58e
lea eax, [esp + 0xc]
push eax
push ebp
call fcn.0057d4f0
jmp 0x57c58e
cmp al, 0x11
jne 0x57c640
pop edi
mov dword [ebp + 0xc], 0
pop ebp
mov eax, 0x80000901
pop ebx
add esp, 0x40
ret
cmp al, 2
jne 0x57c591
pop edi
mov dword [ebp + 0xc], 0
pop ebp
mov eax, 0x80000902
pop ebx
add esp, 0x40
ret
call fcn.0057bd40
add esp, 8
mov eax, 0x80000903
mov dword [ebp + 0xc], 0
pop edi
pop ebp
pop ebx
add esp, 0x40
ret