Function at 0x1018d720
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push esi
mov esi, dword [ebp + 0x14]
push esi
mov dword [ebp - 0x38], 0
call fcn.1012a4f0
push esi
call fcn.1012a400
mov esi, eax
add esp, 8
mov dword [ebp - 0x28], esi
test esi, esi
je 0x1018db9e
push edi
mov edi, dword [ebp + 0x14]
push edi
call fcn.1012a400
mov edx, eax
add esp, 4
mov dword [ebp - 0x18], edx
test edx, edx
je 0x1018db9d
push edi
call fcn.1012a400
mov esi, eax
add esp, 4
mov dword [ebp - 0x34], esi
test esi, esi
je 0x1018db9d
push edi
call fcn.1012a400
mov edi, eax
add esp, 4
mov dword [ebp - 0x1c], edi
test edi, edi
je 0x1018db9d
push ebx
mov ebx, dword [ebp + 0x10]
push ebx
push dword [ebp + 0xc]
push esi
call fcn.1018d2f0
add esp, 0xc
test eax, eax
je 0x1018db9c
cmp dword [esi + 4], 0
je 0x1018db9c
push ebx
push edi
call fcn.10125610
add esp, 8
test eax, eax
je 0x1018db9c
push esi
call fcn.101258a0
push edi
mov dword [ebp - 0x14], eax
call fcn.101258a0
mov edi, dword [ebx + 4]
add esp, 8
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], edi
cmp edi, dword [esi + 8]
jg 0x1018d7ec
mov eax, esi
jmp 0x1018d7f6
push edi
push esi
call fcn.10125d30
add esp, 8
test eax, eax
je 0x1018db9c
mov edx, dword [ebp - 0x34]
mov esi, dword [esi]
mov dword [ebp - 0x20], esi
mov eax, dword [edx + 4]
cmp eax, edi
jge 0x1018d81c
mov ecx, dword [ebp - 8]
lea edi, [esi + eax*4]
sub ecx, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0x28]
mov dword [edx + 4], edi
cmp edi, dword [ebx + 8]
jg 0x1018d82b
mov eax, ebx
jmp 0x1018d835
push edi
push ebx
call fcn.10125d30
add esp, 8
test eax, eax
je 0x1018db9c
mov edx, dword [ebx]
mov dword [ebp - 0x10], edx
mov dword [edx], 1
cmp edi, 1
jle 0x1018d85a
lea ecx, [edi - 1]
xor eax, eax
lea edi, [edx + 4]
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov dword [ebx + 4], edi
cmp edi, dword [ecx + 8]
jg 0x1018d869
mov eax, ecx
jmp 0x1018d879
push edi
push ecx
call fcn.10125d30
mov edx, dword [ebp - 0x10]
add esp, 8
mov ecx, dword [ebp - 0x18]
test eax, eax
je 0x1018db9c
mov ebx, dword [ecx]
mov dword [ebp - 4], ebx
test edi, edi
jle 0x1018d898
mov ecx, edi
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ecx + 4], edi
mov ecx, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
test ecx, ecx
je 0x1018d962
mov edi, edi
mov ebx, dword [esi]
test bl, 1
jne 0x1018d95f
mov ecx, dword [ebp + 0x10]
mov eax, dword [edx]
mov edx, eax
and edx, 1
neg edx
mov ecx, dword [ecx]
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 - 0x30], ecx
test edx, edx
jle 0x1018d945
mov ecx, dword [ebp - 0x10]
mov edx, esi
sub edx, ecx
mov dword [ebp - 0x2c], 0xfffffffc
sub dword [ebp - 0x2c], ecx
mov dword [ebp - 0x40], edx
lea edi, [ecx + 4]
mov edx, dword [edx + edi]
mov ecx, edx
shl ecx, 0x1f
shr ebx, 1
or ecx, ebx
shr eax, 1
mov ebx, dword [ebp - 0x30]
mov dword [esi + ebx*4], ecx
mov ebx, edx
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x20]
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 - 8]
mov dword [edi - 4], ecx
dec edx
mov ecx, dword [ebp - 0x30]
add edi, 4
inc ecx
cmp ecx, edx
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x40]
jl 0x1018d8f5
mov edi, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
shr ebx, 1
mov dword [esi + ecx*4], ebx
shr eax, 1
mov dword [edx + ecx*4], eax
mov ecx, dword [ebp - 0x14]
dec ecx
mov dword [ebp - 0x14], ecx
jne 0x1018d8b0
mov ebx, dword [ebp - 4]
cmp ecx, 0x20
jg 0x1018d97a
mov eax, dword [esi]
test eax, eax
je 0x1018db9c
cmp eax, 1
je 0x1018db5d
cmp ecx, dword [ebp - 0x24]
jge 0x1018d9ba
mov edx, dword [ebp - 0x1c]
mov eax, ecx
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [eax]
mov dword [ebp - 0x14], ecx
mov edx, dword [edx]
mov dword [ebp - 0xc], edx
mov edx, ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
xor ebx, ebx
test edi, edi
jle 0x1018db10
cmp edi, 4
jb 0x1018dacd
mov eax, dword [ebp - 4]
lea eax, [eax + edi*4]
add eax, 0xfffffffc
cmp edx, eax
ja 0x1018d9e9
lea eax, [edi - 1]
lea eax, [edx + eax*4]
cmp eax, dword [ebp - 4]
jae 0x1018dacd
lea eax, [edi - 1]
lea eax, [esi + eax*4]
cmp edx, eax
ja 0x1018da01
lea eax, [edi - 1]
lea eax, [edx + eax*4]
cmp eax, esi
jae 0x1018dacd
mov eax, dword [ebp - 0xc]
lea eax, [eax + edi*4]
add eax, 0xfffffffc
cmp edx, eax
ja 0x1018da1d
lea eax, [edi - 1]
lea eax, [edx + eax*4]
cmp eax, dword [ebp - 0xc]
jae 0x1018dacd
mov eax, dword [ebp - 4]
lea eax, [eax + edi*4]
add eax, 0xfffffffc
cmp esi, eax
ja 0x1018da39
lea eax, [edi - 1]
lea eax, [esi + eax*4]
cmp eax, dword [ebp - 4]
jae 0x1018dacd
mov eax, dword [ebp - 0xc]
lea eax, [eax + edi*4]
add eax, 0xfffffffc
cmp esi, eax
ja 0x1018da51
lea eax, [edi - 1]
lea eax, [esi + eax*4]
cmp eax, dword [ebp - 0xc]
jae 0x1018dacd
mov eax, edi
and eax, reloc.WS2_32.dll_closesocket
jns 0x1018da5f
dec eax
or eax, 0xfffffffc
inc eax
mov edx, dword [ebp - 0xc]
sub edx, esi
mov dword [ebp - 0x30], edi
sub dword [ebp - 0x30], eax
mov eax, esi
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 4]
sub edx, esi
sub edi, esi
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x2c], edi
mov edi, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x2c]
jmp 0x1018da90
movdqu xmm0, xmmword [eax]
add ebx, 4
lea eax, [eax + 0x10]
movdqu xmm1, xmmword [edx + eax - 0x10]
pxor xmm1, xmm0
movdqu xmmword [eax - 0x10], xmm1
movdqu xmm1, xmmword [edi + eax - 0x10]
movdqu xmm0, xmmword [esi + eax - 0x10]
pxor xmm1, xmm0
movdqu xmmword [esi + eax - 0x10], xmm1
cmp ebx, dword [ebp - 0x30]
jl 0x1018da90
mov esi, dword [ebp - 0x20]
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 8]
cmp ebx, edi
jge 0x1018db10
mov eax, dword [ebp - 0xc]
lea ecx, [esi + ebx*4]
sub eax, esi
sub edx, esi
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 4]
sub eax, esi
mov dword [ebp - 0x30], edx
mov esi, dword [ebp - 0x40]
sub edi, ebx
mov dword [ebp - 0x3c], eax
mov ebx, eax
mov eax, dword [ecx + esi]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
mov eax, dword [ecx + ebx - 4]
xor dword [ecx + edx - 4], eax
dec edi
jne 0x1018daf0
mov esi, dword [ebp - 0x20]
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x24]
jne 0x1018d8a6
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 0x1018db3d
test edi, edi
je 0x1018db3d
mov eax, dword [esi + edi*4 - 4]
dec edi
test eax, eax
je 0x1018db30
push eax
call fcn.101258d0
mov edx, dword [ebp - 0x10]
add esp, 4
mov ebx, dword [ebp - 4]
shl edi, 5
lea ecx, [edi + eax]
mov edi, dword [ebp - 8]
mov dword [ebp - 0x14], ecx
jmp 0x1018d8a6
mov esi, dword [ebp - 0x28]
mov ecx, dword [esi + 4]
test ecx, ecx
jle 0x1018db81
mov eax, dword [esi]
lea edx, [ecx - 1]
lea edx, [eax + edx*4]
nop
mov eax, dword [edx]
lea edx, [edx - 4]
test eax, eax
jne 0x1018db7e
dec ecx
test ecx, ecx
jg 0x1018db70
mov dword [esi + 4], ecx
push esi
push dword [ebp + 8]
call fcn.10125610
xor ecx, ecx
add esp, 8
test eax, eax
mov edx, 1
cmovne ecx, edx
mov dword [ebp - 0x38], ecx
pop ebx
pop edi
push dword [ebp + 0x14]
call fcn.1012a380
mov eax, dword [ebp - 0x38]
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret