Function at 0x562530
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov esi, edx
mov edi, dword [esp + 0x28]
mov eax, dword [edx]
lea eax, [eax*4 + 4]
test edi, edi
je 0x562680
mov dword [esp], eax
mov dword [esp + 0xc], esi
mov dword [esp + 4], ecx
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x24]
lea eax, [ebx + edi]
mov dword [esp + 8], eax
push 0x1000
push 0
push ebp
call sub.msvcrt.dll_memset
add esp, 0xc
cmp edi, 0x14
jl 0x562699
add edi, ebx
add edi, 0xfffffff1
mov ecx, dword [ebx]
mov eax, ebx
nop word [eax + eax]
mov edx, dword [ebx + 4]
movzx esi, cl
add dword [ebp + esi*4], 1
movzx esi, ch
add dword [ebp + esi*4 + 0x400], 1
mov esi, ecx
shr esi, 0xe
and esi, 0x3fc
add dword [ebp + esi + 0x800], 1
shr ecx, 0x18
add dword [ebp + ecx*4 + 0xc00], 1
mov ecx, dword [ebx + 8]
movzx esi, dl
add dword [ebp + esi*4], 1
movzx esi, dh
add dword [ebp + esi*4 + 0x400], 1
mov esi, edx
shr esi, 0xe
and esi, 0x3fc
add dword [ebp + esi + 0x800], 1
shr edx, 0x18
add dword [ebp + edx*4 + 0xc00], 1
mov edx, dword [ebx + 0xc]
movzx esi, cl
add dword [ebp + esi*4], 1
movzx esi, ch
add dword [ebp + esi*4 + 0x400], 1
mov esi, ecx
shr esi, 0xe
and esi, 0x3fc
add dword [ebp + esi + 0x800], 1
shr ecx, 0x18
add dword [ebp + ecx*4 + 0xc00], 1
mov ecx, dword [ebx + 0x10]
movzx esi, dl
add dword [ebp + esi*4], 1
movzx esi, dh
add dword [ebp + esi*4 + 0x400], 1
mov esi, edx
shr esi, 0xe
and esi, 0x3fc
add dword [ebp + esi + 0x800], 1
shr edx, 0x18
add dword [ebp + edx*4 + 0xc00], 1
lea edx, [ebx + 0x10]
add eax, 0x10
add ebx, 0x14
cmp ebx, edi
mov ebx, edx
jb 0x562590
mov ecx, dword [esp + 8]
cmp edx, ecx
jb 0x5626a5
jmp 0x56270a
push eax
push 0
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [esi], 0
xor eax, eax
jmp 0x56287b
mov eax, ebx
mov edx, ebx
mov ecx, dword [esp + 8]
cmp edx, ecx
jae 0x56270a
mov edi, ecx
sub edi, eax
not eax
add eax, ecx
mov esi, edi
mov ecx, edx
and esi, 3
je 0x5626d0
mov ecx, edx
nop dword [eax + eax]
movzx ebx, byte [ecx]
add ecx, 1
add dword [ebp + ebx*4], 1
add esi, 0xffffffff
jne 0x5626c0
cmp eax, 3
jb 0x56270a
add edx, edi
nop word [eax + eax]
movzx eax, byte [ecx]
add dword [ebp + eax*4], 1
movzx eax, byte [ecx + 1]
add dword [ebp + eax*4], 1
movzx eax, byte [ecx + 2]
add dword [ebp + eax*4], 1
movzx eax, byte [ecx + 3]
add dword [ebp + eax*4], 1
add ecx, 4
cmp ecx, edx
jne 0x5626e0
mov eax, dword [esp + 0x2c]
pxor xmm1, xmm1
xor ecx, ecx
movdqa xmm0, xmmword [0x688410]
pxor xmm2, xmm2
movdqu xmm3, xmmword [ebp + ecx*4 + 0x400]
movdqu xmm4, xmmword [ebp + ecx*4 + 0x410]
movdqu xmm5, xmmword [ebp + ecx*4 + 0x800]
paddd xmm5, xmm3
movdqu xmm6, xmmword [ebp + ecx*4 + 0x810]
paddd xmm6, xmm4
movdqu xmm3, xmmword [ebp + ecx*4 + 0xc00]
movdqu xmm7, xmmword [ebp + ecx*4 + 0xc10]
movdqu xmm4, xmmword [ebp + ecx*4]
paddd xmm4, xmm3
paddd xmm4, xmm5
movdqu xmm3, xmmword [ebp + ecx*4 + 0x10]
paddd xmm3, xmm7
paddd xmm3, xmm6
movdqu xmmword [ebp + ecx*4], xmm4
movdqu xmmword [ebp + ecx*4 + 0x10], xmm3
movdqa xmm5, xmm4
pxor xmm5, xmm0
movdqa xmm6, xmm1
pxor xmm6, xmm0
pcmpgtd xmm5, xmm6
pand xmm4, xmm5
pandn xmm5, xmm1
movdqa xmm1, xmm5
por xmm1, xmm4
movdqa xmm4, xmm3
pxor xmm4, xmm0
movdqa xmm5, xmm2
pxor xmm5, xmm0
pcmpgtd xmm4, xmm5
pand xmm3, xmm4
pandn xmm4, xmm2
movdqa xmm2, xmm4
por xmm2, xmm3
add ecx, 8
cmp ecx, 0x100
jne 0x562720
movdqa xmm4, xmm2
pxor xmm4, xmm0
movdqa xmm3, xmm1
pxor xmm3, xmm0
pcmpgtd xmm3, xmm4
pand xmm1, xmm3
pandn xmm3, xmm2
por xmm3, xmm1
pshufd xmm2, xmm3, 0xee
movdqa xmm1, xmm3
pxor xmm1, xmm0
movdqa xmm4, xmm2
pxor xmm4, xmm0
pcmpgtd xmm1, xmm4
pand xmm3, xmm1
pandn xmm1, xmm2
por xmm1, xmm3
pshufd xmm2, xmm1, 0x55
movdqa xmm3, xmm1
pxor xmm3, xmm0
pxor xmm0, xmm2
pcmpgtd xmm3, xmm0
pand xmm1, xmm3
pandn xmm3, xmm2
por xmm3, xmm1
movd esi, xmm3
mov ecx, pe_nt_image_headers32
mov edx, dword [esp + 0xc]
cmp dword [ebp + ecx*4 - 4], 0
lea ecx, [ecx - 1]
je 0x562850
test eax, eax
je 0x562867
mov eax, 0xffffffd0
cmp ecx, dword [edx]
ja 0x56287b
mov dword [edx], ecx
push dword [esp]
push ebp
push dword [esp + 0xc]
call sub.msvcrt.dll_memmove
add esp, 0xc
mov eax, esi
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret