Function at 0x57f7f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xac
mov eax, dword [0x78f694]
xor eax, esp
mov dword [esp + 0xa8], eax
cmp dword [ecx + 0x44], 3
mov eax, dword [esp + 0xb8]
mov edx, dword [esp + 0xbc]
push ebx
push ebp
mov ebp, dword [esp + 0xb8]
push esi
mov esi, dword [esp + 0xd0]
push edi
mov edi, dword [esp + 0xc4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], esi
jne 0x57f85c
mov ebx, dword [esp + 0xd8]
push ebx
push esi
mov esi, dword [esp + 0xd8]
push esi
push edx
push eax
push edi
push ebp
call fcn.0057f600
jmp 0x57fa3d
push eax
call fcn.0047e460
mov ebx, eax
mov eax, dword [esp + 0xd4]
add eax, ebx
mov dword [esp + 0x18], eax
add eax, 0x14
add esp, 4
cmp eax, 0x80
ja 0x57fa3d
mov ecx, dword [esp + 0x10]
lea eax, [edi + 1]
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push ebx
sub edi, esi
push ecx
lea edx, [esp + 0x54]
add edi, ebp
push edx
mov dword [esp + 0x28], edi
call fcn.00630200
mov eax, dword [esp + 0xdc]
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea edx, [esp + ebx + 0x60]
push edx
call fcn.00630200
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x54]
push eax
push ecx
lea edx, [esp + 0x6c]
push edx
push esi
push ebp
call fcn.004fa930
mov ebx, dword [esp + 0x104]
add esp, 0x2c
test ebx, ebx
jle 0x57f966
mov edi, dword [esp + 0x20]
mov eax, 0x10
sub eax, edi
mov dword [esp + 0x18], eax
lea eax, [ebx - 1]
shr eax, 4
add eax, 1
mov dword [esp + 0x10], eax
nop
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
add eax, 0x10
push eax
lea ecx, [esp + 0x44]
push ecx
push esi
push ebp
call fcn.004fa930
lea edx, [esp + 0x50]
push edx
push 0x10
mov eax, edx
push eax
push esi
push ebp
call fcn.004fa930
mov ecx, dword [esp + 0x40]
add ecx, edi
add esp, 0x28
cmp ecx, ebx
jle 0x57f9b7
mov eax, ebx
and eax, reloc.WS2_32.dll_ntohs
jns 0x57f949
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jle 0x57f95c
push eax
lea edx, [esp + 0x28]
push edx
push edi
call fcn.00630200
add esp, 0xc
add edi, 0x10
sub dword [esp + 0x10], 1
jne 0x57f900
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x38]
push eax
push edi
lea ecx, [esp + 0x54]
push ecx
push esi
push edx
call fcn.004fa960
add esp, 0x14
test ebx, ebx
jle 0x57fa3d
lea ecx, [ebx - 1]
mov eax, 0xcccccccd
mul ecx
add edi, 0x14
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x20]
mov ebp, 0x14
sub ebp, edi
shr edx, 4
add edx, 1
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], edx
jmp 0x57f9c4
mov eax, 0x10
jmp 0x57f94d
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x40]
push ecx
push esi
push edx
call fcn.004fa960
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x4c]
push eax
push 0x14
mov ecx, eax
push ecx
push esi
push edx
call fcn.004fa960
add ebp, edi
add esp, 0x28
cmp ebp, ebx
jle 0x57fa1a
mov eax, 0x66666667
imul ebx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov ebp, ebx
sub ebp, eax
jmp 0x57fa1f
mov ebp, 0x14
xor eax, eax
test ebp, ebp
jle 0x57fa33
mov cl, byte [esp + eax + 0x24]
xor byte [edi + eax], cl
add eax, 1
cmp eax, ebp
jl 0x57fa25
add edi, 0x14
sub dword [esp + 0x10], 1
jne 0x57f9c0
mov ecx, dword [esp + 0xb8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0062cbd3
add esp, 0xac
ret 0x1c