Function at 0x40cf10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x6ee06c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
xor edx, edx
push esi
push edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x28], ebx
nop
movzx eax, byte [ebx + edx]
mov byte [ebp + edx*4 - 0x14], al
movzx eax, byte [ebx + edx + 4]
mov byte [ebp + edx*4 - 0x13], al
movzx eax, byte [ebx + edx + 8]
mov byte [ebp + edx*4 - 0x12], al
movzx eax, byte [ebx + edx + 0xc]
mov byte [ebp + edx*4 - 0x11], al
inc edx
cmp edx, 4
jl 0x40cf30
mov ebx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x10]
mov esi, 4
lea edx, [ebx + 0x2a8]
nop word [eax + eax]
movzx eax, byte [edx - 4]
lea ecx, [ecx + 1]
xor byte [ecx - 5], al
movzx eax, byte [edx]
xor byte [ecx - 1], al
movzx eax, byte [edx + 4]
xor byte [ecx + 3], al
movzx eax, byte [edx + 8]
inc edx
xor byte [ecx + 7], al
sub esi, 1
jne 0x40cf70
lea edi, [ebx + 0x298]
mov dword [ebp - 0x20], 9
mov dword [ebp - 0x24], edi
mov edi, 4
mov ecx, edi
mov dword [ebp - 0x18], ecx
nop
lea esi, [ecx - 1]
mov eax, esi
and eax, reloc.WS2_32.dll_closesocket
jns 0x40cfc1
dec eax
or eax, 0xfffffffc
inc eax
add eax, edi
mov bl, byte [ebp + eax - 0x14]
mov eax, ecx
and eax, reloc.WS2_32.dll_closesocket
jns 0x40cfd5
dec eax
or eax, 0xfffffffc
inc eax
add eax, edi
mov dl, byte [ebp + eax - 0x14]
lea eax, [ecx + 1]
and eax, reloc.WS2_32.dll_closesocket
jns 0x40cfea
dec eax
or eax, 0xfffffffc
inc eax
add eax, edi
mov cl, byte [ebp + eax - 0x14]
mov eax, dword [ebp - 0x18]
add eax, 2
and eax, reloc.WS2_32.dll_closesocket
jns 0x40d002
dec eax
or eax, 0xfffffffc
inc eax
add eax, edi
mov dword [ebp - 0x18], esi
mov al, byte [ebp + eax - 0x14]
mov byte [ebp + edi - 0x12], cl
mov ecx, esi
mov byte [ebp + edi - 0x14], bl
mov byte [ebp + edi - 0x13], dl
mov byte [ebp + edi - 0x11], al
add edi, 4
cmp ecx, 1
jg 0x40cfb0
mov edi, dword [ebp - 0x24]
xor ecx, ecx
mov ebx, dword [ebp - 0x1c]
nop dword [eax]
movzx eax, byte [ebp + ecx*4 - 0x14]
movzx eax, byte [eax + ebx + 0x104]
mov byte [ebp + ecx*4 - 0x14], al
movzx eax, byte [ebp + ecx*4 - 0x13]
movzx eax, byte [eax + ebx + 0x104]
mov byte [ebp + ecx*4 - 0x13], al
movzx eax, byte [ebp + ecx*4 - 0x12]
movzx eax, byte [eax + ebx + 0x104]
mov byte [ebp + ecx*4 - 0x12], al
movzx eax, byte [ebp + ecx*4 - 0x11]
movzx eax, byte [eax + ebx + 0x104]
mov byte [ebp + ecx*4 - 0x11], al
inc ecx
cmp ecx, 4
jl 0x40d030
xor eax, eax
nop dword [eax]
movzx ecx, byte [edi + eax - 4]
xor byte [ebp + eax - 0x14], cl
movzx ecx, byte [edi + eax]
xor byte [ebp + eax - 0x10], cl
movzx ecx, byte [edi + eax + 4]
xor byte [ebp + eax - 0xc], cl
movzx ecx, byte [edi + eax + 8]
xor byte [ebp + eax - 8], cl
inc eax
cmp eax, 4
jl 0x40d080
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x40d0b9
lea eax, [ebp - 0x14]
push eax
call fcn.0040d2a0
dec esi
sub edi, 0x10
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], edi
test esi, esi
jns 0x40cfa4
mov esi, dword [ebp - 0x28]
lea edi, [ebp - 0x14]
xor edx, edx
lea ebx, [ebp - 0x12]
nop word [eax + eax]
movzx eax, byte [edi + edx*4]
movzx ecx, byte [ebx + edx*4]
mov byte [esi + edx], al
movzx eax, byte [ebp + edx*4 - 0x13]
mov byte [esi + edx + 4], al
lea eax, [ebp - 0x11]
mov byte [esi + edx + 8], cl
movzx ecx, byte [eax + edx*4]
mov byte [esi + edx + 0xc], cl
inc edx
cmp edx, 4
jl 0x40d0e0
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00423e75
mov esp, ebp
pop ebp
ret 4