Function at 0x565410
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x798
mov edi, dword [esp + 0x7b4]
mov ebx, dword [esp + 0x7b0]
mov ebp, ecx
dec ebp
je 0x565866
mov dword [esp], edx
mov ebx, dword [ebx]
mov dword [esp + 0xc], ebx
mov eax, ebx
lea edx, [ebx + 1]
mov dword [esp + 8], ecx
mov ecx, ebx
shr ecx, 3
movzx esi, byte [edi + ecx]
and al, 7
bts esi, eax
bsr ebx, ebp
mov dword [edi + ecx], esi
mov dword [edi + ecx + 4], 0
mov eax, dword [esp + 0x7b0]
mov dword [eax], edx
mov esi, edx
mov dword [esp + 4], ebp
mov ebp, ebx
shr ebp, 1
and dl, 7
mov ecx, edx
xor cl, 0x1f
shr ebp, cl
mov eax, ebx
mov ecx, edx
shl eax, cl
shr esi, 3
movzx ecx, byte [edi + esi]
or eax, ecx
mov ecx, dword [esp + 0xc]
lea edx, [ecx + 4]
mov dword [edi + esi + 4], ebp
mov dword [edi + esi], eax
mov eax, dword [esp + 0x7b0]
mov dword [eax], edx
mov esi, 0xffffffff
mov ecx, ebx
shl esi, cl
add esi, dword [esp + 4]
mov ebp, edx
shr ebp, 3
mov eax, esi
shr eax, 1
and dl, 7
mov ecx, edx
xor cl, 0x1f
shr eax, cl
mov ecx, edx
shl esi, cl
movzx ecx, byte [edi + ebp]
or esi, ecx
mov dword [edi + ebp + 4], eax
mov dword [edi + ebp], esi
mov eax, dword [esp + 0xc]
add ebx, eax
add ebx, 4
mov esi, dword [esp + 0x7b0]
mov eax, 0xffffffff
mov dword [esi], ebx
mov ecx, dword [esp + 8]
cmp ecx, 2
jb 0x56587f
mov edi, dword [esp]
lea ecx, [edi - 1]
mov dword [esp + 0xc], ecx
shl eax, cl
not eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 8]
lea ebp, [edi + eax]
dec ebp
mov dword [esp + 0x14], ebp
lea eax, [esp + 0x13c]
push 0x43c
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea eax, [esp + 0x28]
push 0x110
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea eax, [esp + 0x578]
push 0x220
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea eax, [ebp*4]
lea ecx, [esp + 0x138]
push eax
push 0
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov eax, ebx
shr eax, 3
mov ebp, dword [esp + 0x7b4]
movzx ecx, byte [ebp + eax]
mov edx, ebx
and dl, 7
bts ecx, edx
mov dword [ebp + eax], ecx
mov dword [ebp + eax + 4], 0
mov ecx, ebp
lea eax, [ebx + 1]
mov dword [esi], eax
lea ebp, [edi - 2]
mov esi, eax
shr esi, 3
movzx edx, byte [ecx + esi]
mov dword [esp + 0x10], ebx
mov ebx, ebp
shr ebx, 1
and al, 7
mov ecx, eax
xor cl, 0x1f
shr ebx, cl
mov ecx, eax
shl ebp, cl
or ebp, edx
mov eax, dword [esp + 0x7b0]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x7b4]
mov dword [ecx + esi + 4], ebx
mov ecx, edi
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0x7b4]
mov dword [ebx + esi], ebp
mov esi, dword [esp + 0x10]
add esi, 5
mov dword [eax], esi
mov dword [esp + ecx*4 + 0x134], edi
mov dword [esp + 0x138], 1
cmp edx, ecx
jbe 0x5656f0
mov ecx, dword [esp]
cmp edi, 9
jb 0x5656e0
mov ebp, edx
lea esi, [edi - 9]
mov ecx, esi
shr ecx, 3
inc ecx
mov eax, ecx
and eax, 3
xor edx, edx
cmp esi, 0x18
jb 0x56567f
and ecx, 0xfffffffc
mov edx, dword [esp]
lea esi, [esp + edx*4]
add esi, 0x1a8
xor edx, edx
movaps xmm0, xmmword [0x8b6090]
nop word cs:[eax + eax]
movups xmmword [esi + edx*4 - 0x70], xmm0
movups xmmword [esi + edx*4 - 0x60], xmm0
movups xmmword [esi + edx*4 - 0x50], xmm0
movups xmmword [esi + edx*4 - 0x40], xmm0
movups xmmword [esi + edx*4 - 0x30], xmm0
movups xmmword [esi + edx*4 - 0x20], xmm0
movups xmmword [esi + edx*4 - 0x10], xmm0
movups xmmword [esi + edx*4], xmm0
add edx, 0x20
add ecx, 0xfffffffc
jne 0x565650
mov ecx, dword [esp + 4]
and ecx, 0xfffffff8
test eax, eax
je 0x5656c0
add edx, dword [esp]
lea edx, [esp + edx*4]
add edx, 0x148
shl eax, 5
xor esi, esi
movaps xmm0, xmmword [0x8b6090]
nop word cs:[eax + eax]
movups xmmword [edx + esi - 0x10], xmm0
movups xmmword [edx + esi], xmm0
add esi, 0x20
cmp eax, esi
jne 0x5656b0
cmp dword [esp + 4], ecx
mov edx, ebp
mov eax, dword [esp + 0x7b0]
je 0x5656f0
add ecx, dword [esp]
nop word cs:[eax + eax]
mov dword [esp + ecx*4 + 0x138], 1
inc ecx
cmp edx, ecx
jne 0x5656e0
lea ecx, [esp + 0x138]
push ebx
push eax
mov esi, eax
lea eax, [esp + 0x580]
push eax
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x7bc]
push edx
call fcn.005669d0
add esp, 0x18
cmp edi, 2
mov eax, 1
cmovae eax, edi
mov dword [esp + 0x14], eax
mov eax, dword [esp]
movzx ecx, byte [esp + eax + 0x27]
mov dword [esp + 0x10], ecx
mov ecx, dword [esi]
xor edx, edx
movzx eax, word [esp + eax*2 + 0x576]
mov dword [esp + 0x24], eax
shr eax, 1
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
shr eax, 1
mov dword [esp + 0x1c], eax
nop word cs:[eax + eax]
mov dword [esp + 8], edx
mov eax, dword [esp + 0xc]
add eax, edx
test edx, edx
cmove eax, edx
movzx ebx, byte [esp + eax + 0x28]
movzx edi, word [esp + eax*2 + 0x578]
mov eax, ecx
add ebx, ecx
mov edx, ecx
mov ebp, edi
shr ebp, 1
and al, 7
mov ecx, eax
xor cl, 0x1f
shr ebp, cl
mov ecx, eax
shl edi, cl
shr edx, 3
mov esi, dword [esp + 0x7b4]
movzx eax, byte [esi + edx]
or edi, eax
mov dword [esi + edx + 4], ebp
mov dword [esi + edx], edi
mov eax, dword [esp + 0x7b0]
mov dword [eax], ebx
mov edx, ebx
mov eax, ebx
and al, 7
mov ecx, eax
xor cl, 0x1f
mov edi, dword [esp + 0x20]
shr edi, cl
shr edx, 3
movzx ecx, byte [esi + edx]
mov dword [esp + 4], ecx
mov ebp, dword [esp + 0x24]
mov ecx, eax
shl ebp, cl
or ebp, dword [esp + 4]
mov dword [esi + edx + 4], edi
mov dword [esi + edx], ebp
add ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x7b0]
mov dword [eax], ebx
mov ebp, ebx
shr ebp, 3
mov eax, ebx
and al, 7
mov ecx, eax
xor cl, 0x1f
mov edx, dword [esp + 0x1c]
shr edx, cl
mov edi, dword [esp + 0x18]
mov ecx, eax
shl edi, cl
movzx eax, byte [esi + ebp]
or edi, eax
mov dword [esi + ebp + 4], edx
mov edx, dword [esp + 8]
mov dword [esi + ebp], edi
mov eax, dword [esp + 0xc]
lea ecx, [ebx + eax]
mov eax, dword [esp + 0x7b0]
mov dword [eax], ecx
inc edx
cmp dword [esp + 0x14], edx
jne 0x565760
mov eax, ecx
shr eax, 3
mov esi, dword [esp + 0x7b4]
movzx edx, byte [esi + eax]
and cl, 7
bts edx, ecx
mov dword [esi + eax], edx
mov dword [esi + eax + 4], 0
add ebx, dword [esp]
mov eax, dword [esp + 0x7b0]
mov dword [eax], ebx
jmp 0x56587f
mov eax, dword [ebx]
mov ecx, eax
shr ecx, 3
movzx edx, byte [edi + ecx]
mov dword [edi + ecx], edx
mov dword [edi + ecx + 4], 0
inc eax
mov dword [ebx], eax
add esp, 0x798
pop esi
pop edi
pop ebx
pop ebp
ret