Function at 0x5a9d50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push edi
push dword [ebp + 0x14]
mov dword [ebp - 0x34], 0
call fcn.0051b760
mov edi, dword [ebp + 0x14]
push edi
call fcn.0051b5b0
add esp, 8
mov dword [ebp - 0x20], eax
test eax, eax
je 0x5aa1fb
push edi
call fcn.0051b5b0
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x5aa1fb
push esi
push edi
call fcn.0051b5b0
mov esi, eax
add esp, 4
mov dword [ebp - 0x30], esi
test esi, esi
je 0x5aa1fa
push edi
call fcn.0051b5b0
mov edi, eax
add esp, 4
mov dword [ebp - 0x24], edi
test edi, edi
je 0x5aa1fa
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 0x58]
push 6
push eax
push ebx
call fcn.005aa950
add esp, 0xc
test eax, eax
je 0x5aa1de
cmp eax, 6
jg 0x5aa1de
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 0xc]
push esi
call fcn.005a9950
add esp, 0xc
test eax, eax
je 0x5aa1f9
push esi
call fcn.004f81f0
add esp, 4
test eax, eax
jne 0x5aa1f9
push ebx
push edi
call fcn.004f7ea0
add esp, 8
test eax, eax
je 0x5aa1f9
push esi
call fcn.004f82b0
push edi
mov dword [ebp - 0x14], eax
call fcn.004f82b0
mov edi, dword [ebx + 4]
push edi
push esi
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], edi
call fcn.004f89c0
add esp, 0x10
test eax, eax
je 0x5aa1f9
mov edx, dword [ebp - 0x30]
mov esi, dword [esi]
mov dword [ebp - 0x18], esi
mov eax, dword [edx + 4]
cmp eax, edi
jge 0x5a9e65
mov ecx, dword [ebp - 4]
lea edi, [esi + eax*4]
sub ecx, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov ebx, dword [ebp - 0x20]
push edi
push ebx
mov dword [edx + 4], edi
call fcn.004f89c0
add esp, 8
test eax, eax
je 0x5aa1f9
mov edx, ebx
mov ebx, dword [edx]
mov dword [ebp - 0xc], ebx
mov dword [ebx], 1
cmp edi, 1
jle 0x5a9e9c
lea ecx, [edi - 1]
xor eax, eax
lea edi, [ebx + 4]
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
push edi
push dword [ebp - 0x1c]
mov dword [edx + 4], edi
call fcn.004f89c0
add esp, 8
test eax, eax
je 0x5aa1f9
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov dword [ebp - 0x10], edx
test edi, edi
jle 0x5a9ecd
mov ecx, edi
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], edi
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
mov dword [ebp - 8], eax
nop dword [eax + eax]
test ecx, ecx
je 0x5a9fb4
nop dword [eax + eax]
mov ebx, dword [esi]
test bl, 1
jne 0x5a9fae
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax]
mov edx, eax
mov ecx, dword [ecx]
and edx, 1
neg edx
mov dword [ebp - 0x3c], edx
mov ecx, dword [ecx]
and ecx, edx
lea edx, [edi - 1]
xor eax, ecx
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
test edx, edx
jle 0x5a9f90
mov ecx, dword [ebp - 0xc]
mov edx, esi
sub edx, ecx
mov dword [ebp - 0x40], edx
lea edi, [ecx + 4]
mov ecx, 0xfffffffc
sub ecx, dword [ebp - 0xc]
mov dword [ebp - 0x38], ecx
nop dword [eax]
mov edx, dword [edx + edi]
mov ecx, edx
shl ecx, 0x1f
shr ebx, 1
or ecx, ebx
shr eax, 1
mov ebx, dword [ebp - 0x2c]
mov dword [esi + ebx*4], ecx
mov ebx, edx
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x18]
add edx, edi
mov ecx, dword [ecx]
mov edx, dword [edx + ecx + 4]
and edx, dword [ebp - 0x3c]
xor edx, dword [edi]
mov ecx, edx
shl ecx, 0x1f
or ecx, eax
mov eax, edx
mov edx, dword [ebp - 4]
mov dword [edi - 4], ecx
dec edx
mov ecx, dword [ebp - 0x2c]
add edi, 4
inc ecx
cmp ecx, edx
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x40]
jl 0x5a9f40
mov edi, dword [ebp - 4]
shr ebx, 1
mov dword [esi + ecx*4], ebx
mov ebx, dword [ebp - 0xc]
shr eax, 1
mov dword [ebx + ecx*4], eax
mov ecx, dword [ebp - 0x14]
sub ecx, 1
mov dword [ebp - 0x14], ecx
jne 0x5a9ef0
jmp 0x5a9fb1
mov ebx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
cmp ecx, 0x20
jg 0x5a9fcc
mov eax, dword [esi]
test eax, eax
je 0x5aa1f9
cmp eax, 1
je 0x5aa1bc
cmp ecx, dword [ebp - 0x28]
jge 0x5aa00c
mov ebx, dword [ebp - 0x24]
mov eax, ecx
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 8]
mov ebx, dword [ebx]
mov dword [ebp - 8], ebx
mov ebx, edx
mov edx, dword [eax]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], edx
xor edx, edx
test edi, edi
jle 0x5aa172
cmp edi, 4
jb 0x5aa12a
mov esi, dword [ebp - 0x10]
lea eax, [edi - 1]
sub esi, 4
lea eax, [ebx + eax*4]
lea edi, [esi + edi*4]
mov esi, dword [ebp - 0x18]
cmp ebx, edi
ja 0x5aa03e
cmp eax, dword [ebp - 0x10]
jae 0x5aa127
mov edi, dword [ebp - 4]
dec edi
lea edi, [esi + edi*4]
cmp ebx, edi
ja 0x5aa051
cmp eax, esi
jae 0x5aa127
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 4]
sub ebx, 4
lea esi, [ebx + esi*4]
mov ebx, dword [ebp - 0xc]
cmp ebx, esi
mov esi, dword [ebp - 0x18]
ja 0x5aa070
cmp eax, dword [ebp - 8]
jae 0x5aa127
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
dec ebx
lea eax, [ecx + ebx*4]
mov ebx, dword [ebp - 0xc]
cmp esi, eax
ja 0x5aa089
cmp edi, ecx
jae 0x5aa127
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
dec ebx
lea eax, [ecx + ebx*4]
mov ebx, dword [ebp - 0xc]
cmp esi, eax
ja 0x5aa0a4
mov eax, ecx
cmp edi, eax
jae 0x5aa122
mov ecx, dword [ebp - 4]
mov eax, ecx
and eax, reloc.WS2_32.dll_closesocket
jns 0x5aa0b5
dec eax
or eax, 0xfffffffc
inc eax
mov ebx, dword [ebp - 8]
mov edi, ecx
sub ebx, esi
sub edi, eax
mov dword [ebp - 0x40], ebx
mov eax, esi
mov ebx, dword [ebp - 0x10]
sub ebx, esi
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x3c], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x2c], ebx
sub dword [ebp - 0x2c], esi
mov ebx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x2c]
movups xmm0, xmmword [eax]
add edx, 4
lea eax, [eax + 0x10]
movups xmm1, xmmword [ebx + eax - 0x10]
pxor xmm1, xmm0
movups xmm0, xmmword [ecx + eax - 0x10]
movups xmmword [eax - 0x10], xmm1
movups xmm1, xmmword [esi + eax - 0x10]
pxor xmm1, xmm0
movups xmmword [ecx + eax - 0x10], xmm1
cmp edx, edi
jl 0x5aa0e0
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x40], edx
cmp edx, edi
jge 0x5aa172
jmp 0x5aa12a
mov edi, dword [ebp - 4]
jmp 0x5aa12d
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 8]
sub eax, esi
lea ecx, [esi + edx*4]
mov dword [ebp - 0x40], eax
sub ebx, esi
mov eax, dword [ebp - 0x10]
sub eax, esi
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x40]
sub edi, edx
mov esi, dword [ebp - 0x38]
mov edx, eax
mov dword [ebp - 0x3c], eax
nop dword [eax]
mov eax, dword [ecx + ebx]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
mov eax, dword [ecx + edx - 4]
xor dword [ecx + esi - 4], eax
sub edi, 1
jne 0x5aa150
mov esi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x28]
jne 0x5a9ee0
lea eax, [ecx - 1]
cdq
and edx, 0x1f
lea edi, [edx + eax]
sar edi, 5
mov eax, dword [esi + edi*4]
test eax, eax
jne 0x5aa19f
test edi, edi
je 0x5aa19f
mov eax, dword [esi + edi*4 - 4]
dec edi
test eax, eax
je 0x5aa192
push eax
call fcn.004f8360
mov edx, dword [ebp - 0x10]
add esp, 4
shl edi, 5
lea ecx, [edi + eax]
mov edi, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
jmp 0x5a9ee0
mov ebx, dword [ebp - 0x20]
push ebx
call fcn.004f87f0
push ebx
push dword [ebp + 8]
call fcn.004f7ea0
add esp, 0xc
test eax, eax
je 0x5aa1f9
mov dword [ebp - 0x34], 1
jmp 0x5aa1f9
push 0x196
push 0x65ca70
push 0x6a
push 0x83
push 3
call fcn.0050bc80
add esp, 0x14
pop ebx
pop esi
push dword [ebp + 0x14]
call fcn.0051b4b0
mov eax, dword [ebp - 0x34]
add esp, 4
pop edi
mov esp, ebp
pop ebp
ret