Function at 0x401cd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
mov ebx, ecx
mov ecx, 0x51bcaa
push edi
mov dword [ebp - 0x1c], ebx
call fcn.004dd914
mov edx, dword [ebp + 8]
lea esi, [ebp - 0x2f]
add edx, 8
mov edi, 4
mov dword [ebp - 0x20], edx
nop dword [eax]
movzx eax, byte [edx - 8]
lea edx, [edx + 1]
mov byte [esi - 1], al
lea esi, [esi + 4]
movzx eax, byte [edx - 5]
mov byte [esi - 4], al
movzx eax, byte [edx - 1]
mov byte [esi - 3], al
movzx eax, byte [edx + 3]
mov byte [esi - 2], al
sub edi, 1
jne 0x401d00
lea ecx, [ebp - 0x2c]
lea edx, [ebx + 0x208]
lea esi, [edi + 4]
movzx eax, byte [edx - 4]
lea ecx, [ecx + 1]
xor byte [ecx - 5], al
lea edx, [edx + 1]
movzx eax, byte [edx - 1]
xor byte [ecx - 1], al
movzx eax, byte [edx + 3]
xor byte [ecx + 3], al
movzx eax, byte [edx + 7]
xor byte [ecx + 7], al
sub esi, 1
jne 0x401d33
lea eax, [ebx + 0x218]
mov dword [ebp - 8], 1
lea edx, [ebp - 0x30]
mov dword [ebp - 0x18], eax
lea esi, [ebp - 0x2e]
lea edi, [ebp - 0x2d]
xor ecx, ecx
nop word [eax + eax]
movzx eax, byte [edx + ecx*4]
movzx eax, byte [eax + ebx + 4]
mov byte [edx + ecx*4], al
movzx eax, byte [ebp + ecx*4 - 0x2f]
movzx eax, byte [eax + ebx + 4]
mov byte [ebp + ecx*4 - 0x2f], al
movzx eax, byte [esi + ecx*4]
movzx eax, byte [eax + ebx + 4]
mov byte [esi + ecx*4], al
movzx eax, byte [edi + ecx*4]
movzx eax, byte [eax + ebx + 4]
mov byte [edi + ecx*4], al
inc ecx
cmp ecx, 4
jl 0x401d80
mov esi, 4
mov edi, 3
lea eax, [edi - 2]
and eax, reloc.WS2_32.dll_closesocket
jns 0x401dd1
dec eax
or eax, 0xfffffffc
inc eax
add eax, esi
mov bl, byte [ebp + eax - 0x30]
lea eax, [edi - 1]
and eax, reloc.WS2_32.dll_closesocket
jns 0x401de6
dec eax
or eax, 0xfffffffc
inc eax
add eax, esi
mov dl, byte [ebp + eax - 0x30]
mov eax, edi
and eax, reloc.WS2_32.dll_closesocket
jns 0x401dfa
dec eax
or eax, 0xfffffffc
inc eax
add eax, esi
inc edi
mov cl, byte [ebp + eax - 0x30]
mov eax, edi
and eax, reloc.WS2_32.dll_closesocket
jns 0x401e0f
dec eax
or eax, 0xfffffffc
inc eax
add eax, esi
mov al, byte [ebp + eax - 0x30]
mov byte [ebp + esi - 0x2d], al
lea eax, [edi - 2]
mov byte [ebp + esi - 0x30], bl
mov byte [ebp + esi - 0x2f], dl
mov byte [ebp + esi - 0x2e], cl
add esi, 4
cmp eax, 4
jl 0x401dc2
mov esi, dword [ebp - 8]
cmp esi, 0xa
je 0x401ef3
xor ecx, ecx
mov dword [ebp - 0x14], ecx
lea eax, [ebp + ecx - 0x30]
mov dword [ebp - 0x10], 4
mov dword [ebp - 0xc], eax
mov edi, 1
movzx eax, byte [eax]
mov byte [ebp - 4], al
movzx eax, byte [ebp + ecx - 0x2c]
mov byte [ebp - 3], al
movzx eax, byte [ebp + ecx - 0x28]
mov byte [ebp - 2], al
movzx eax, byte [ebp + ecx - 0x24]
mov byte [ebp - 1], al
mov cl, byte [ebp + edi - 5]
mov al, cl
add al, al
test cl, cl
jns 0x401e80
xor al, 0x1b
mov ecx, edi
and ecx, reloc.WS2_32.dll_closesocket
jns 0x401e8f
dec ecx
or ecx, 0xfffffffc
inc ecx
mov cl, byte [ebp + ecx - 4]
mov bl, cl
add bl, bl
test cl, cl
jns 0x401e9e
xor bl, 0x1b
xor bl, cl
lea ecx, [edi + 1]
and ecx, reloc.WS2_32.dll_closesocket
jns 0x401eb0
dec ecx
or ecx, 0xfffffffc
inc ecx
mov dl, byte [ebp + ecx - 4]
lea ecx, [edi + 2]
and ecx, reloc.WS2_32.dll_closesocket
jns 0x401ec4
dec ecx
or ecx, 0xfffffffc
inc ecx
mov cl, byte [ebp + ecx - 4]
inc edi
xor cl, dl
mov edx, dword [ebp - 0xc]
xor cl, bl
xor cl, al
mov byte [edx], cl
add edx, 4
sub dword [ebp - 0x10], 1
mov dword [ebp - 0xc], edx
jne 0x401e72
mov ecx, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x14], ecx
cmp ecx, 4
jl 0x401e41
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0x18]
xor edx, edx
mov ecx, edi
nop word [eax + eax]
movzx eax, byte [ecx - 4]
lea ecx, [ecx + 1]
xor byte [ebp + edx - 0x30], al
movzx eax, byte [ecx - 1]
xor byte [ebp + edx - 0x2c], al
movzx eax, byte [ecx + 3]
xor byte [ebp + edx - 0x28], al
movzx eax, byte [ecx + 7]
xor byte [ebp + edx - 0x24], al
inc edx
cmp edx, 4
jl 0x401f00
mov ebx, dword [ebp - 0x1c]
lea edx, [ebp - 0x30]
inc esi
add edi, 0x10
mov dword [ebp - 8], esi
cmp esi, 0xa
mov dword [ebp - 0x18], edi
lea esi, [ebp - 0x2e]
lea edi, [ebp - 0x2d]
jle 0x401d73
mov ebx, dword [ebp - 0x20]
lea edx, [ebp - 0x2f]
mov esi, 4
movzx eax, byte [edx - 1]
lea edx, [edx + 4]
movzx ecx, byte [edx - 3]
lea ebx, [ebx + 1]
mov byte [ebx - 9], al
movzx eax, byte [edx - 4]
mov byte [ebx - 1], cl
movzx ecx, byte [edx - 2]
mov byte [ebx - 5], al
mov byte [ebx + 3], cl
sub esi, 1
jne 0x401f53
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4