Function at 0x551d20
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x44]
mov edi, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
mov eax, dword [edx + 0x40]
cmp eax, 1
je 0x551da7
cmp eax, 2
jne 0x551d63
push 0x408
push dword [esp + 0x4c]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor ecx, ecx
mov edx, dword [esp + 0x58]
jmp 0x551f7e
cmp dword [edx + 0x1c], 1
jne 0x551da7
mov ebx, dword [edx + 0x18]
mov eax, dword [esp + 0x48]
mov edx, dword [eax + 0x404]
mov dword [esp + 8], edx
push 0x408
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor ecx, ecx
test ebx, ebx
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x58]
jne 0x551f7e
mov eax, dword [esp + 0x48]
lea ebx, [eax + 0x404]
jmp 0x551dce
mov eax, dword [esp + 0x48]
lea ebx, [eax + 0x404]
mov edx, dword [eax + 0x404]
mov dword [esp + 8], edx
push 0x408
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov edx, dword [esp + 0x58]
sub esi, edi
cmp dword [ebx], 2
mov eax, 6
mov ecx, 0x3f
cmove ecx, eax
cmp ecx, esi
jae 0x551f78
mov eax, 0xffffffff
test dl, 3
jne 0x5524b2
mov eax, 0xffffffbe
cmp dword [esp + 0x5c], 0x1000
jb 0x5524b2
mov dword [esp + 0x1c], 0xff
cmp esi, 0x5db
mov dword [esp + 4], esi
ja 0x552082
lea ebx, [edi + esi]
push 0x400
push 0
push edx
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x64]
add esp, 0xc
nop dword [eax + eax]
movzx eax, byte [edi]
add edi, 1
add dword [edx + eax*4], 1
cmp edi, ebx
jb 0x551e40
mov ecx, 0x101
nop word cs:[eax + eax]
nop dword [eax]
cmp dword [edx + ecx*4 - 8], 0
lea ecx, [ecx - 1]
je 0x551e60
lea eax, [ecx - 1]
mov dword [esp + 0x1c], eax
xor edx, edx
mov esi, 0
mov eax, 0
cmp ecx, 8
jb 0x55217b
mov esi, ecx
and esi, 0xfffffff8
lea eax, [esi - 8]
mov edi, eax
shr edi, 3
add edi, 1
mov dword [esp], edi
test eax, eax
je 0x55209a
mov eax, ecx
and eax, 0xfffffff8
add eax, 0xfffffff8
shr eax, 3
add eax, 1
and eax, 0xfffffffe
pxor xmm0, xmm0
xor edi, edi
movdqa xmm2, xmmword [0x6881e0]
pxor xmm1, xmm1
mov ebx, dword [esp + 0x58]
nop dword [eax + eax]
movdqu xmm4, xmmword [ebx + edi*4]
movdqu xmm5, xmmword [ebx + edi*4 + 0x10]
movdqa xmm6, xmm0
pxor xmm6, xmm2
movdqa xmm3, xmm4
pxor xmm3, xmm2
pcmpgtd xmm3, xmm6
pand xmm4, xmm3
pandn xmm3, xmm0
por xmm3, xmm4
movdqa xmm0, xmm1
pxor xmm0, xmm2
movdqa xmm4, xmm5
pxor xmm4, xmm2
pcmpgtd xmm4, xmm0
pand xmm5, xmm4
pandn xmm4, xmm1
por xmm4, xmm5
movdqu xmm1, xmmword [ebx + edi*4 + 0x20]
movdqu xmm5, xmmword [ebx + edi*4 + 0x30]
movdqa xmm6, xmm3
pxor xmm6, xmm2
movdqa xmm0, xmm1
pxor xmm0, xmm2
pcmpgtd xmm0, xmm6
pand xmm1, xmm0
pandn xmm0, xmm3
por xmm0, xmm1
movdqa xmm3, xmm4
pxor xmm3, xmm2
movdqa xmm1, xmm5
pxor xmm1, xmm2
pcmpgtd xmm1, xmm3
pand xmm5, xmm1
pandn xmm1, xmm4
por xmm1, xmm5
add edi, 0x10
add eax, 0xfffffffe
jne 0x551ed0
jmp 0x5520a4
xor ecx, ecx
mov ebx, dword [esp + 0x44]
mov eax, dword [esp + 0x54]
mov dword [eax], ecx
mov dword [eax + 0x84], 0
mov ecx, dword [esp + 0x4c]
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
je 0x552027
add ecx, 0x408
mov dword [esp], ecx
mov ebx, edx
mov edx, dword [esp + 0x48]
add edx, 0x408
mov dword [esp + 8], edx
sar eax, 3
mov esi, dword [esp + 0x5c]
add esi, 0xffffff2c
lea ecx, [ebx + 0xd4]
mov dword [esp + 0xc], ecx
mov ebp, dword [esp + 0x54]
lea edx, [ebp + 0x94]
mov dword [esp + 4], edx
add ebp, 0x119
lea ecx, [esp + 0x1c]
mov edx, dword [esp + 0x44]
push esi
push dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x5c]
push dword [ebx + 0x1c]
push ebp
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esp + 0x24]
push eax
call fcn.0057e880
add esp, 0x24
mov ecx, dword [esp + 0x28]
cmp ecx, 0xffffff88
ja 0x55206b
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
jmp 0x55204f
mov dword [ecx + 0x11e4], 0
mov dword [ecx + 0x11dc], 0
mov dword [ecx + 0x11e0], 0
xor eax, eax
xor edx, edx
xor esi, esi
xor ecx, ecx
xor edi, edi
mov ebx, dword [esp + 0x54]
mov dword [ebx + 0x88], eax
mov dword [ebx + 0x8c], edx
mov dword [ebx + 0x90], esi
mov dword [ebx + 0x120], edi
mov eax, dword [esp + 0x54]
mov dword [eax + 0x11c], ecx
xor eax, eax
cmp ecx, 0xffffff89
cmovae eax, ecx
jmp 0x5524bc
mov ecx, edx
lea edx, [esp + 0x1c]
push ecx
push 0
push esi
push edi
call fcn.00562530
add esp, 0x10
jmp 0x55219f
pxor xmm0, xmm0
xor edi, edi
pxor xmm1, xmm1
test byte [esp], 1
je 0x552105
mov eax, dword [esp + 0x58]
movdqu xmm5, xmmword [eax + edi*4]
movdqu xmm3, xmmword [eax + edi*4 + 0x10]
movdqa xmm2, xmmword [0x6881e0]
movdqa xmm6, xmm0
pxor xmm6, xmm2
movdqa xmm4, xmm5
pxor xmm4, xmm2
pcmpgtd xmm4, xmm6
pand xmm5, xmm4
pandn xmm4, xmm0
por xmm4, xmm5
movdqa xmm0, xmm1
pxor xmm0, xmm2
pxor xmm2, xmm3
pcmpgtd xmm2, xmm0
pand xmm3, xmm2
pandn xmm2, xmm1
por xmm2, xmm3
movdqa xmm0, xmm4
movdqa xmm1, xmm2
movdqa xmm2, xmmword [0x6881e0]
movdqa xmm4, xmm1
pxor xmm4, xmm2
movdqa xmm3, xmm0
pxor xmm3, xmm2
pcmpgtd xmm3, xmm4
pand xmm0, xmm3
pandn xmm3, xmm1
por xmm3, xmm0
pshufd xmm1, xmm3, 0xee
movdqa xmm0, xmm3
pxor xmm0, xmm2
movdqa xmm4, xmm1
pxor xmm4, xmm2
pcmpgtd xmm0, xmm4
pand xmm3, xmm0
pandn xmm0, xmm1
por xmm0, xmm3
pshufd xmm1, xmm0, 0x55
movdqa xmm3, xmm0
pxor xmm3, xmm2
pxor xmm2, xmm1
pcmpgtd xmm3, xmm2
pand xmm0, xmm3
pandn xmm3, xmm1
por xmm3, xmm0
movd eax, xmm3
cmp ecx, esi
je 0x55219f
sub ecx, esi
mov edi, dword [esp + 0x58]
lea edi, [edi + esi*4]
nop word cs:[eax + eax]
nop
mov ebx, dword [edi + edx*4]
cmp ebx, eax
cmova eax, ebx
add edx, 1
cmp ecx, edx
jne 0x552190
cmp eax, 0xffffff88
ja 0x5524b2
mov ecx, 1
cmp eax, dword [esp + 4]
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x44]
je 0x551f7e
mov ecx, dword [esp + 4]
shr ecx, 7
add ecx, 4
cmp eax, ecx
jbe 0x5522ab
lea eax, [edx + 0x400]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c]
add eax, 0xfffffc00
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x1c]
cmp dword [esp + 8], 1
mov edi, dword [esp + 0x4c]
jne 0x5522f4
test esi, esi
js 0x5522b2
mov eax, esi
mov dword [esp + 0x14], esi
lea eax, [esi + 1]
xor ecx, ecx
mov edx, 0
cmp eax, 8
mov esi, dword [esp + 0x58]
jb 0x5522bc
mov ecx, eax
and ecx, 0xfffffff8
pxor xmm1, xmm1
xor edx, edx
movdqa xmm3, xmmword [0x6881f0]
pxor xmm2, xmm2
pxor xmm0, xmm0
movdqu xmm5, xmmword [esi + edx*4]
movdqu xmm4, xmmword [esi + edx*4 + 0x10]
pcmpeqd xmm5, xmm1
pcmpeqd xmm4, xmm1
mov edi, dword [esp + 0x48]
movdqu xmm6, xmmword [edi + edx*4 + 4]
movdqu xmm7, xmmword [edi + edx*4 + 0x14]
pand xmm6, xmm3
pand xmm7, xmm3
pcmpeqd xmm6, xmm1
pandn xmm5, xmm6
pcmpeqd xmm7, xmm1
pandn xmm4, xmm7
psrld xmm5, 0x1f
por xmm2, xmm5
psrld xmm4, 0x1f
por xmm0, xmm4
add edx, 8
cmp ecx, edx
jne 0x55223b
por xmm0, xmm2
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
pshufd xmm0, xmm1, 0x55
por xmm0, xmm1
movd edx, xmm0
jmp 0x5522d9
xor ecx, ecx
jmp 0x551f7e
mov dword [esp + 8], 1
jmp 0x5522f4
cmp dword [esi + ecx*4], 0
setne bl
mov edi, dword [esp + 0x48]
cmp byte [edi + ecx*4 + 4], 0
sete bh
and bh, bl
movzx edi, bh
or edx, edi
add ecx, 1
cmp eax, ecx
jne 0x5522bc
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], eax
mov edi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x14]
push 0x404
push 0
push edi
call sub.msvcrt.dll_memset
add esp, 0xc
mov ecx, dword [esp + 4]
lea eax, [ecx - 1]
bsr eax, eax
xor eax, 0xffffffe0
add eax, 0x1f
bsr ecx, ecx
xor ecx, 0xffffffe0
add ecx, 0x21
bsr edx, esi
xor edx, 0xffffffe0
add edx, 0x22
cmp ecx, edx
cmovb edx, ecx
cmp eax, 0xb
mov ecx, 0xb
cmovb ecx, eax
cmp edx, ecx
cmova ecx, edx
cmp ecx, 6
mov eax, 5
cmovae eax, ecx
cmp eax, 0xc
mov ecx, 0xc
cmovb ecx, eax
push dword [esp + 0x18]
push dword [esp + 0x10]
push ecx
push esi
push dword [esp + 0x68]
push edi
call fcn.005662b0
add esp, 0x18
cmp eax, 0xffffff88
ja 0x5524b2
test esi, esi
js 0x5524c4
mov dword [esp + 0x14], esi
add esi, 1
xor ecx, ecx
mov edx, 0
mov dword [esp], esi
cmp esi, 8
mov edi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x58]
jb 0x5525b1
mov ecx, dword [esp]
and ecx, 0xfffffff8
lea edx, [ecx - 8]
mov ebx, edx
shr ebx, 3
add ebx, 1
test edx, edx
je 0x552504
mov edi, ebx
and edi, 0xfffffffe
pxor xmm0, xmm0
xor edx, edx
movdqa xmm2, xmmword [0x6881f0]
pxor xmm1, xmm1
mov esi, ebx
mov ebp, dword [esp + 0x4c]
mov esi, dword [esp + 0x58]
movdqu xmm3, xmmword [ebp + edx*4 + 4]
movdqu xmm4, xmmword [ebp + edx*4 + 0x14]
pand xmm3, xmm2
pand xmm4, xmm2
movdqu xmm6, xmmword [esi + edx*4]
movdqu xmm5, xmmword [esi + edx*4 + 0x10]
pshufd xmm7, xmm3, 0xf5
pmuludq xmm3, xmm6
pshufd xmm3, xmm3, 0xe8
pshufd xmm6, xmm6, 0xf5
pmuludq xmm6, xmm7
pshufd xmm6, xmm6, 0xe8
punpckldq xmm3, xmm6
paddd xmm3, xmm0
pshufd xmm0, xmm4, 0xf5
pmuludq xmm4, xmm5
pshufd xmm4, xmm4, 0xe8
pshufd xmm5, xmm5, 0xf5
pmuludq xmm5, xmm0
pshufd xmm0, xmm5, 0xe8
punpckldq xmm4, xmm0
paddd xmm4, xmm1
movdqu xmm0, xmmword [ebp + edx*4 + 0x24]
movdqu xmm1, xmmword [ebp + edx*4 + 0x34]
pand xmm0, xmm2
pand xmm1, xmm2
movdqu xmm6, xmmword [esi + edx*4 + 0x20]
movdqu xmm5, xmmword [esi + edx*4 + 0x30]
pshufd xmm7, xmm0, 0xf5
pmuludq xmm0, xmm6
pshufd xmm0, xmm0, 0xe8
pshufd xmm6, xmm6, 0xf5
pmuludq xmm6, xmm7
pshufd xmm6, xmm6, 0xe8
punpckldq xmm0, xmm6
paddd xmm0, xmm3
pshufd xmm3, xmm1, 0xf5
pmuludq xmm1, xmm5
pshufd xmm1, xmm1, 0xe8
pshufd xmm5, xmm5, 0xf5
pmuludq xmm5, xmm3
pshufd xmm3, xmm5, 0xe8
punpckldq xmm1, xmm3
paddd xmm1, xmm4
add edx, 0x10
add edi, 0xfffffffe
jne 0x5523d5
jmp 0x55250e
mov ecx, dword [esp + 0x54]
mov dword [ecx + 0x84], eax
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x54]
add ecx, 4
push dword [esp + 0x18]
push dword [esp + 0x10]
push eax
push esi
push dword [esp + 0x5c]
push 0x80
push ecx
call fcn.00565530
add esp, 0x1c
mov dword [esp + 0x10], 0
mov edx, 0
cmp dword [esp + 8], 0
jne 0x5527ff
jmp 0x552818
pxor xmm0, xmm0
xor edx, edx
pxor xmm1, xmm1
test bl, 1
je 0x55258a
mov esi, dword [esp + 0x4c]
movdqu xmm4, xmmword [esi + edx*4 + 4]
movdqu xmm2, xmmword [esi + edx*4 + 0x14]
movdqa xmm3, xmmword [0x6881f0]
pand xmm4, xmm3
pand xmm2, xmm3
mov edi, dword [esp + 0x58]
movdqu xmm5, xmmword [edi + edx*4]
movdqu xmm3, xmmword [edi + edx*4 + 0x10]
pshufd xmm6, xmm4, 0xf5
pmuludq xmm4, xmm5
pshufd xmm4, xmm4, 0xe8
pshufd xmm5, xmm5, 0xf5
pmuludq xmm5, xmm6
pshufd xmm5, xmm5, 0xe8
punpckldq xmm4, xmm5
paddd xmm0, xmm4
pshufd xmm4, xmm2, 0xf5
pmuludq xmm2, xmm3
pshufd xmm2, xmm2, 0xe8
pshufd xmm3, xmm3, 0xf5
pmuludq xmm3, xmm4
pshufd xmm3, xmm3, 0xe8
punpckldq xmm2, xmm3
paddd xmm1, xmm2
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0xee
paddd xmm1, xmm0
pshufd xmm0, xmm1, 0x55
paddd xmm0, xmm1
movd edx, xmm0
cmp dword [esp], ecx
mov edi, dword [esp + 0x4c]
mov ebx, dword [esp + 0x58]
je 0x5525c8
mov esi, edx
movzx edx, byte [edi + ecx*4 + 4]
imul edx, dword [ebx + ecx*4]
add esi, edx
mov edx, esi
add ecx, 1
cmp dword [esp], ecx
jne 0x5525b1
shr edx, 3
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x54]
add ecx, 4
push dword [esp + 0x18]
push dword [esp + 0x10]
push eax
push dword [esp + 0x20]
push edi
push 0x80
push ecx
call fcn.00565530
add esp, 0x1c
cmp dword [esp + 8], 0
je 0x552728
xor ecx, ecx
mov edx, 0
cmp dword [esp], 8
mov ebp, dword [esp + 0x58]
jb 0x5527de
mov ecx, dword [esp]
and ecx, 0xfffffff8
lea edx, [ecx - 8]
mov edi, edx
shr edi, 3
add edi, 1
test edx, edx
je 0x552731
mov esi, edi
and edi, 0xfffffffe
pxor xmm0, xmm0
xor edx, edx
movdqa xmm2, xmmword [0x6881f0]
pxor xmm1, xmm1
mov ebp, dword [esp + 0x58]
mov ebx, dword [esp + 0x48]
movdqu xmm3, xmmword [ebx + edx*4 + 4]
movdqu xmm4, xmmword [ebx + edx*4 + 0x14]
pand xmm3, xmm2
pand xmm4, xmm2
movdqu xmm6, xmmword [ebp + edx*4]
movdqu xmm5, xmmword [ebp + edx*4 + 0x10]
pshufd xmm7, xmm3, 0xf5
pmuludq xmm3, xmm6
pshufd xmm3, xmm3, 0xe8
pshufd xmm6, xmm6, 0xf5
pmuludq xmm6, xmm7
pshufd xmm6, xmm6, 0xe8
punpckldq xmm3, xmm6
paddd xmm3, xmm0
pshufd xmm0, xmm4, 0xf5
pmuludq xmm4, xmm5
pshufd xmm4, xmm4, 0xe8
pshufd xmm5, xmm5, 0xf5
pmuludq xmm5, xmm0
pshufd xmm0, xmm5, 0xe8
punpckldq xmm4, xmm0
paddd xmm4, xmm1
movdqu xmm0, xmmword [ebx + edx*4 + 0x24]
movdqu xmm1, xmmword [ebx + edx*4 + 0x34]
pand xmm0, xmm2
pand xmm1, xmm2
movdqu xmm6, xmmword [ebp + edx*4 + 0x20]
movdqu xmm5, xmmword [ebp + edx*4 + 0x30]
pshufd xmm7, xmm0, 0xf5
pmuludq xmm0, xmm6
pshufd xmm0, xmm0, 0xe8
pshufd xmm6, xmm6, 0xf5
pmuludq xmm6, xmm7
pshufd xmm6, xmm6, 0xe8
punpckldq xmm0, xmm6
paddd xmm0, xmm3
pshufd xmm3, xmm1, 0xf5
pmuludq xmm1, xmm5
pshufd xmm1, xmm1, 0xe8
pshufd xmm5, xmm5, 0xf5
pmuludq xmm5, xmm3
pshufd xmm3, xmm5, 0xe8
punpckldq xmm1, xmm3
paddd xmm1, xmm4
add edx, 0x10
add edi, 0xfffffffe
jne 0x552646
jmp 0x55273d
mov ebx, dword [esp + 0x44]
jmp 0x552818
mov esi, edi
pxor xmm0, xmm0
xor edx, edx
pxor xmm1, xmm1
mov ebx, esi
test bl, 1
je 0x5527bb
mov edi, dword [esp + 0x48]
movdqu xmm4, xmmword [edi + edx*4 + 4]
movdqu xmm2, xmmword [edi + edx*4 + 0x14]
movdqa xmm3, xmmword [0x6881f0]
pand xmm4, xmm3
pand xmm2, xmm3
mov edi, dword [esp + 0x58]
movdqu xmm5, xmmword [edi + edx*4]
movdqu xmm3, xmmword [edi + edx*4 + 0x10]
pshufd xmm6, xmm4, 0xf5
pmuludq xmm4, xmm5
pshufd xmm4, xmm4, 0xe8
pshufd xmm5, xmm5, 0xf5
pmuludq xmm5, xmm6
pshufd xmm5, xmm5, 0xe8
punpckldq xmm4, xmm5
paddd xmm0, xmm4
pshufd xmm4, xmm2, 0xf5
pmuludq xmm2, xmm3
pshufd xmm2, xmm2, 0xe8
pshufd xmm3, xmm3, 0xf5
pmuludq xmm3, xmm4
pshufd xmm3, xmm3, 0xe8
punpckldq xmm2, xmm3
paddd xmm1, xmm2
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0xee
paddd xmm1, xmm0
pshufd xmm0, xmm1, 0x55
paddd xmm0, xmm1
movd edx, xmm0
cmp dword [esp], ecx
mov ebp, dword [esp + 0x58]
je 0x5527f8
mov ebx, dword [esp]
mov esi, dword [esp + 0x48]
movzx edi, byte [esi + ecx*4 + 4]
imul edi, dword [ebp + ecx*4]
add edx, edi
add ecx, 1
cmp ebx, ecx
jne 0x5527e1
shr edx, 3
mov ebx, dword [esp + 0x44]
cmp edx, dword [esp + 4]
jae 0x552818
mov ecx, dword [esp + 0x10]
add ecx, eax
cmp edx, ecx
jbe 0x552866
lea ecx, [eax + 0xc]
cmp ecx, dword [esp + 4]
jae 0x552866
mov ecx, dword [esp + 0x10]
add ecx, eax
cmp ecx, dword [esp + 4]
jae 0x552854
mov edx, dword [esp + 0x54]
mov dword [edx], 2
mov ecx, dword [esp + 0x4c]
mov dword [ecx + 0x404], 1
mov dword [edx + 0x84], eax
cmp eax, 0xffffff88
mov edx, dword [esp + 0x58]
jbe 0x551f92
jmp 0x5524bc
push 0x408
push dword [esp + 0x4c]
push dword [esp + 0x54]
jmp 0x551d50
push 0x408
push dword [esp + 0x4c]
push dword [esp + 0x54]
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, 3
jmp 0x551d5a