Function at 0x5972f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x24]
sub esp, 0x20
test ecx, ecx
je 0x59757b
mov eax, dword [ebp + 0x20]
and dword [ebp + 0xc], 0xfffffffe
add eax, 0xfffffffc
and dword [ebp + 0x14], 0xfffffffe
and dword [ebp + 0x1c], 0xfffffffe
mov edx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
push edi
dec ecx
mov dword [ebp + 0x24], ecx
xor ecx, ecx
cmp byte [0x708fa1], cl
mov edi, dword [ebp + 0x20]
mov dword [ebp - 0x10], edi
je 0x59757f
lea eax, [edi - 0x10]
mov dword [ebp - 0x14], eax
test eax, eax
js 0x5973d8
mov ecx, dword [ebp + 8]
lea eax, [edx + 0x10]
mov edi, dword [ebp + 0x18]
sub ecx, edx
mov dword [ebp - 8], ecx
sub edi, edx
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
add ecx, 0x10
sub edx, dword [ebp + 0x18]
shr ecx, 4
mov dword [ebp - 0x14], ecx
shl ecx, 4
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x10]
mov dword [ebp - 4], edx
mov edx, dword [ebp - 8]
mov dword [ebp - 0x1c], ecx
jmp 0x597380
dec dword [ebp - 0x14]
lea esi, [esi + 0x20]
mov ecx, dword [ebp - 4]
lea eax, [eax + 0x20]
movdqu xmm1, xmmword [eax - 0x30]
movdqu xmm4, xmmword [edx + eax - 0x20]
movdqu xmm2, xmmword [ecx + esi - 0x20]
mov ecx, dword [ebp - 0x18]
movdqu xmm3, xmmword [eax - 0x20]
movdqa xmm0, xmm2
psubusw xmm0, xmm1
psubusw xmm1, xmm2
paddw xmm0, xmm1
movdqu xmmword [esi - 0x20], xmm0
movdqa xmm0, xmm4
psubusw xmm0, xmm3
psubusw xmm3, xmm4
paddw xmm0, xmm3
movdqu xmmword [ecx + eax - 0x20], xmm0
jne 0x597380
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 0x10]
cmp ecx, dword [ebp - 0xc]
jg 0x597439
mov esi, dword [ebp + 8]
lea eax, [edx + ecx*2]
sub esi, edx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp + 0x18]
mov dword [ebp - 8], esi
sub dword [ebp - 8], edx
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x1c]
sub edx, ecx
mov edi, dword [ebp - 8]
shr edx, 2
inc edx
lea ecx, [ecx + edx*4]
jmp 0x597410
movq xmm2, qword [eax + esi]
lea eax, [eax + 8]
movq xmm1, qword [eax - 8]
movdqa xmm0, xmm2
psubusw xmm0, xmm1
psubusw xmm1, xmm2
paddw xmm0, xmm1
movq qword [eax + edi - 8], xmm0
dec edx
jne 0x597410
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp + 0x18]
mov eax, edi
sub eax, ecx
mov dword [ebp - 0x1c], eax
cmp ecx, edi
jge 0x597556
mov edx, dword [ebp + 0x10]
cmp eax, 4
jb 0x597517
cmp dword [0x708db0], 2
jl 0x597517
lea eax, [esi + ecx*2]
mov dword [ebp - 0x14], eax
lea eax, [edx + ecx*2]
mov dword [ebp - 0x20], eax
lea eax, [edx - 2]
lea eax, [eax + edi*2]
cmp dword [ebp - 0x14], eax
ja 0x59748a
lea eax, [edi - 1]
lea eax, [esi + eax*2]
cmp eax, dword [ebp - 0x20]
jae 0x597517
mov eax, dword [ebp + 8]
lea edx, [eax + ecx*2]
lea eax, [eax + edi*2]
add eax, 0xfffffffe
cmp dword [ebp - 0x14], eax
ja 0x5974a5
lea eax, [edi - 1]
lea eax, [esi + eax*2]
cmp eax, edx
jae 0x597514
mov eax, dword [ebp - 0x1c]
and eax, reloc.WS2_32.dll_closesocket
jns 0x5974b4
dec eax
or eax, 0xfffffffc
inc eax
mov dword [ebp - 8], edi
sub dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], esi
sub dword [ebp - 0x14], eax
mov esi, dword [ebp + 0x10]
sub esi, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], esi
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp - 0x20]
movq xmm0, qword [edx]
lea edx, [edx + 8]
pmovzxwd xmm1, xmm0
movq xmm0, qword [edx + edi - 8]
add ecx, 4
pmovzxwd xmm0, xmm0
psubd xmm1, xmm0
pabsd xmm0, xmm1
pshuflw xmm0, xmm0, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm0, xmm0, 0xd8
movq qword [edx + eax - 8], xmm0
cmp ecx, dword [ebp - 8]
jl 0x5974d4
mov edi, dword [ebp - 0x10]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
cmp ecx, edi
jge 0x597556
sub eax, edx
lea esi, [edx + ecx*2]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x18]
sub eax, edx
sub edi, ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + esi]
lea esi, [esi + 2]
movzx ecx, word [esi - 2]
sub eax, ecx
mov ecx, dword [ebp - 0x20]
cdq
xor eax, edx
sub eax, edx
mov word [ecx + esi - 2], ax
mov eax, dword [ebp - 0x14]
dec edi
jne 0x597533
mov esi, dword [ebp + 0x18]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
add eax, dword [ebp + 0xc]
add edx, dword [ebp + 0x14]
add esi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x24]
mov dword [ebp + 8], eax
mov dword [ebp + 0x10], edx
mov dword [ebp + 0x18], esi
test ecx, ecx
jne 0x597321
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0xc], ecx
jl 0x59743c
lea edi, [edx + 4]
mov dword [ebp - 0x14], esi
sub dword [ebp - 0x14], eax
mov dword [ebp - 4], edi
lea edi, [eax + 2]
mov dword [ebp - 8], edi
mov edi, edx
sub edi, eax
mov eax, esi
sub eax, edx
mov dword [ebp - 0x20], edi
mov edx, dword [ebp - 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
mov edi, edi
movzx edi, word [edi + eax]
movzx esi, word [eax]
movzx eax, word [eax - 2]
movzx edx, word [edx - 4]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp + 0x18]
mov word [edx + ecx*2], ax
mov eax, esi
mov esi, dword [ebp - 0x14]
sub eax, edi
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 8]
mov word [esi + edx], ax
movzx esi, word [edx + 4]
mov eax, dword [ebp - 4]
movzx edi, word [eax + 2]
movzx eax, word [edx + 2]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x1c]
movzx edx, word [edx]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 4]
mov word [edi + edx], ax
mov eax, esi
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp + 0x18]
movzx edx, di
mov edi, dword [ebp - 0x20]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 4]
mov word [esi + ecx*2 + 6], ax
add edx, 8
mov eax, dword [ebp - 8]
add ecx, 4
add eax, 8
mov dword [ebp - 4], edx
mov dword [ebp - 8], eax
cmp ecx, dword [ebp - 0xc]
jle 0x5975b0
mov edi, dword [ebp - 0x10]
jmp 0x59743c