Function at 0x4016c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov esi, ecx
mov edi, eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4016da
push eax
call fcn.00482624
add esp, 4
mov eax, dword [esi + 4]
add eax, eax
add eax, eax
push ebx
push eax
call fcn.00482680
mov edx, dword [esi + 4]
add edx, edx
add edx, edx
add esp, 4
xor ecx, ecx
mov dword [esi + 0x10], eax
test edx, edx
jle 0x401735
jmp 0x401700
mov ebx, ecx
and ebx, reloc.WS2_32.dll_closesocket
jns 0x40170f
dec ebx
or ebx, 0xfffffffc
inc ebx
imul ebx, dword [esi + 4]
mov eax, ecx
cdq
and edx, 3
add eax, edx
mov dl, byte [ecx + edi]
sar eax, 2
add ebx, eax
mov eax, dword [esi + 0x10]
mov byte [ebx + eax], dl
mov eax, dword [esi + 4]
add eax, eax
inc ecx
add eax, eax
cmp ecx, eax
jl 0x401700
xor edi, edi
xor eax, eax
cmp dword [esi + 4], eax
jle 0x40175c
mov edi, edi
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0xc]
imul ecx, edi
add ecx, eax
add ecx, dword [esi + 0x10]
lea edx, [edx + eax*4]
mov dl, byte [edx + edi]
xor byte [ecx], dl
inc eax
cmp eax, dword [esi + 4]
jl 0x401740
inc edi
cmp edi, 4
jl 0x401737
cmp dword [esi], 1
mov dword [ebp - 4], 1
jle 0x401949
mov eax, dword [esi + 0x10]
movzx ecx, byte [eax]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax], cl
movzx ecx, byte [eax + 1]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 2], cl
movzx ecx, byte [eax + 3]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 3], cl
mov eax, dword [esi + 4]
add eax, dword [esi + 0x10]
movzx ecx, byte [eax]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax], cl
movzx ecx, byte [eax + 1]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 2], cl
movzx ecx, byte [eax + 3]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 3], cl
mov edx, dword [esi + 4]
mov eax, dword [esi + 0x10]
movzx ecx, byte [eax + edx*2]
lea eax, [eax + edx*2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax], cl
movzx ecx, byte [eax + 1]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 2], cl
movzx ecx, byte [eax + 3]
mov edx, ecx
and edx, 0xfffffff0
and ecx, 0xf
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 3], cl
mov eax, dword [esi + 4]
lea eax, [eax + eax*2]
add eax, dword [esi + 0x10]
movzx ecx, byte [eax]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax], cl
movzx ecx, byte [eax + 1]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 2], cl
movzx ecx, byte [eax + 3]
mov edx, ecx
and edx, 0xfffffff0
and ecx, 0xf
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 3], cl
call fcn.004013b0
call fcn.00401460
xor edx, edx
xor ecx, ecx
cmp dword [esi + 4], ecx
jle 0x401934
lea esp, [esp]
mov eax, dword [esi + 4]
mov ebx, dword [esi + 0xc]
mov edi, eax
imul eax, dword [ebp - 4]
imul edi, edx
add eax, ecx
add edi, ecx
add edi, dword [esi + 0x10]
lea eax, [ebx + eax*4]
mov al, byte [eax + edx]
xor byte [edi], al
inc ecx
cmp ecx, dword [esi + 4]
jl 0x401910
inc edx
cmp edx, 4
jl 0x401902
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [esi]
jl 0x401772
mov eax, dword [esi + 0x10]
movzx ecx, byte [eax]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax], cl
movzx ecx, byte [eax + 1]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 2], cl
movzx ecx, byte [eax + 3]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 3], cl
mov eax, dword [esi + 4]
add eax, dword [esi + 0x10]
movzx ecx, byte [eax]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax], cl
movzx ecx, byte [eax + 1]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 2], cl
movzx ecx, byte [eax + 3]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 3], cl
mov edx, dword [esi + 4]
mov eax, dword [esi + 0x10]
movzx ecx, byte [eax + edx*2]
lea eax, [eax + edx*2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax], cl
movzx ecx, byte [eax + 1]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 2], cl
movzx ecx, byte [eax + 3]
mov edx, ecx
and edx, 0xfffffff0
and ecx, 0xf
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 3], cl
mov eax, dword [esi + 4]
lea eax, [eax + eax*2]
add eax, dword [esi + 0x10]
movzx ecx, byte [eax]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax], cl
movzx ecx, byte [eax + 1]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 1], cl
movzx ecx, byte [eax + 2]
mov edx, ecx
and ecx, 0xf
and edx, 0xfffffff0
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 2], cl
movzx ecx, byte [eax + 3]
mov edx, ecx
and edx, 0xfffffff0
and ecx, 0xf
movzx ecx, byte [edx + ecx + str.cw]
mov byte [eax + 3], cl
call fcn.004013b0
mov edx, dword [esi]
mov dword [ebp - 4], edx
xor edx, edx
lea esp, [esp]
xor ecx, ecx
cmp dword [esi + 4], ecx
jle 0x401b0b
mov eax, dword [esi + 4]
mov ebx, dword [esi + 0xc]
mov edi, eax
imul eax, dword [ebp - 4]
imul edi, edx
add eax, ecx
add edi, ecx
add edi, dword [esi + 0x10]
lea eax, [ebx + eax*4]
mov al, byte [eax + edx]
xor byte [edi], al
inc ecx
cmp ecx, dword [esi + 4]
jl 0x401ae7
inc edx
cmp edx, 4
jl 0x401ae0
mov edx, dword [esi + 4]
add edx, edx
add edx, edx
xor ecx, ecx
pop ebx
test edx, edx
jle 0x401b58
nop
mov edi, ecx
and edi, reloc.WS2_32.dll_closesocket
jns 0x401b2f
dec edi
or edi, 0xfffffffc
inc edi
imul edi, dword [esi + 4]
mov eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
add edi, eax
mov eax, dword [esi + 0x10]
mov dl, byte [edi + eax]
mov eax, dword [ebp + 8]
mov byte [ecx + eax], dl
mov edx, dword [esi + 4]
add edx, edx
inc ecx
add edx, edx
cmp ecx, edx
jl 0x401b20
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4