Function at 0x565510
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x1f0
mov eax, dword [0x808040]
xor eax, ebp
mov dword [esp + 0x1e8], eax
cmp dword [ebp + 0xc], 0
je 0x565993
call fcn.0055de10
mov edi, eax
pxor xmm0, xmm0
movdqa xmmword [esp + 0x1a0], xmm0
movdqa xmmword [esp + 0x190], xmm0
lea eax, [esp + 0x60]
push 0x130
push 0xff
push eax
call fcn.005c9b00
add esp, 0xc
push 1
call fcn.0057f960
add esp, 4
test eax, eax
je 0x565a43
mov esi, eax
add eax, 0x120
mov dword [esp + 0x14], eax
cmp dword [esi + 0x120], 0xfff
ja 0x565b15
mov eax, 0xc0ffee
xor eax, dword [esi + 0x118]
or eax, dword [esi + 0x11c]
jne 0x565b15
cmp dword [esi + 0x128], edi
jne 0x565b15
mov ecx, dword [esi + 0x110]
mov eax, dword [esi + 0x114]
mov edx, dword [ebp + 8]
mov dword [esp + 0x24], edx
lea edx, [esi + 0xfc]
mov dword [esp + 0x10], edx
mov ebx, 0x20
mov dword [esp + 0x28], 0
mov edi, dword [ebp + 0xc]
cmp edi, 0x10000
mov edx, 0x10000
cmovb edx, edi
mov dword [esp + 0x20], edx
neg ecx
mov ecx, 0x10000
sbb ecx, eax
jb 0x565bdb
test byte [esp + 0x28], 1
mov dword [esp + 0x1c], edi
jne 0x565749
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x1d0], xmm0
movdqa xmmword [esp + 0x1c0], xmm0
movdqa xmmword [esp + 0x1b0], xmm0
mov ecx, dword [esi + 0xf4]
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
call dword [0x8010bc]
push esi
lea eax, [esp + 0x1b4]
push eax
mov edi, dword [esp + 0x18]
push edi
call ecx
add esp, 0xc
mov ecx, dword [esi + 0xf4]
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
call dword [0x8010bc]
push esi
lea eax, [esp + 0x1c4]
push eax
push edi
call ecx
add esp, 0xc
mov ecx, dword [esi + 0xf4]
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
call dword [0x8010bc]
push esi
lea eax, [esp + 0x1d4]
push eax
push edi
call ecx
add esp, 0xc
xor eax, eax
nop word cs:[eax + eax]
movzx ecx, byte [esp + eax + 0x190]
xor byte [esp + eax + 0x1b0], cl
inc eax
cmp ebx, eax
jne 0x5656d0
push 1
call fcn.0057fa20
add esp, 4
test eax, 0x2000000
je 0x565c23
not eax
test eax, 0x12000000
mov edi, dword [esp + 0x1c]
jne 0x565bf3
push esi
push 0x100
lea eax, [esp + 0x1b8]
push eax
call fcn.00403290
add esp, 0xc
mov eax, 0x401cd0
mov ecx, 0x401140
mov dword [esi + 0xf4], ecx
mov dword [esi + 0xf8], eax
lea eax, [esp + 0x1d0]
movdqu xmm0, xmmword [eax]
mov eax, dword [esp + 0x10]
movdqu xmmword [eax], xmm0
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp edi, 0x10
jb 0x5657fe
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
cmp eax, 0x2000
mov edi, 0x2000
cmovb edi, eax
mov ecx, edi
and ecx, 0x3ff0
cmp dword [esi + 0xf8], 0
mov dword [esp + 0x18], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
je 0x565b8d
cmp ecx, 0x10
jne 0x565a11
pxor xmm0, xmm0
movdqu xmmword [edx], xmm0
shr edi, 4
mov ecx, dword [esi + 0xf8]
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
call dword [0x8010bc]
push dword [esp + 0x10]
push esi
push edi
mov eax, dword [esp + 0x18]
push eax
push eax
call ecx
add esp, 0x14
mov eax, dword [esi + 0x108]
bswap eax
add eax, edi
dec eax
bswap eax
mov dword [esi + 0x108], eax
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0xc]
add edx, ecx
mov eax, dword [esp + 0x18]
sub eax, ecx
cmp eax, 0xf
ja 0x565762
mov dword [esp + 0xc], edx
mov ecx, dword [esi + 0xf4]
mov edx, eax
mov dword [esp + 8], esi
mov eax, dword [esi + 0x108]
mov dword [esp + 0x18], edx
test edx, edx
jne 0x5659ae
mov esi, dword [esp + 8]
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x1d0], xmm0
movdqa xmmword [esp + 0x1c0], xmm0
movdqa xmmword [esp + 0x1b0], xmm0
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
call dword [0x8010bc]
push esi
lea eax, [esp + 0x1b4]
push eax
mov edi, dword [esp + 0x18]
push edi
call ecx
add esp, 0xc
mov ecx, dword [esi + 0xf4]
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
call dword [0x8010bc]
push esi
lea eax, [esp + 0x1c4]
push eax
push edi
call ecx
add esp, 0xc
mov ecx, dword [esi + 0xf4]
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
call dword [0x8010bc]
push esi
lea eax, [esp + 0x1d4]
push eax
push edi
call ecx
add esp, 0xc
test byte [esp + 0x28], 1
jne 0x5658e4
xor eax, eax
nop dword [eax + eax]
movzx ecx, byte [esp + eax + 0x190]
xor byte [esp + eax + 0x1b0], cl
inc eax
cmp ebx, eax
jne 0x5658d0
push 1
call fcn.0057fa20
add esp, 4
test eax, 0x2000000
je 0x565c74
not eax
test eax, 0x12000000
jne 0x565c0b
push esi
push 0x100
lea eax, [esp + 0x1b8]
push eax
call fcn.00403290
add esp, 0xc
mov eax, 0x401cd0
mov ecx, 0x401140
mov dword [esi + 0xf4], ecx
mov dword [esi + 0xf8], eax
lea eax, [esp + 0x1d0]
movdqu xmm0, xmmword [eax]
mov eax, dword [esp + 0x10]
movdqu xmmword [eax], xmm0
mov ecx, dword [esi + 0x110]
mov eax, dword [esi + 0x114]
add ecx, 1
adc eax, 0
mov dword [esi + 0x110], ecx
mov dword [esi + 0x114], eax
mov edx, dword [esp + 0x14]
inc dword [edx]
mov edi, dword [esp + 0x20]
add dword [esp + 0x24], edi
xor ebx, ebx
mov dl, 1
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x1c]
sub edx, edi
mov edi, edx
jne 0x5655e8
lea eax, [esp + 0x60]
cmp esi, eax
je 0x565be0
mov ecx, dword [esp + 0x1e8]
xor ecx, ebp
call fcn.005c6b46
mov eax, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
pcmpeqd xmm0, xmm0
movdqa xmmword [esp + 0x1b0], xmm0
bswap eax
inc eax
bswap eax
mov esi, dword [esp + 8]
mov dword [esi + 0x108], eax
call dword [0x8010bc]
push esi
lea eax, [esp + 0x1b4]
push eax
push dword [esp + 0x18]
call ecx
add esp, 0xc
mov eax, dword [esp + 0x18]
cmp eax, 8
jne 0x565afb
movq xmm0, qword [esp + 0x1b0]
mov eax, dword [esp + 0xc]
movq qword [eax], xmm0
mov ecx, dword [esi + 0xf4]
mov eax, dword [esi + 0x108]
jmp 0x565824
cmp ecx, 0x20
jne 0x565a24
pxor xmm0, xmm0
movdqu xmmword [edx + 0x10], xmm0
jmp 0x56579d
test ecx, ecx
je 0x5657a1
push dword [esp + 8]
push 0
push dword [esp + 0x14]
call fcn.005c9b00
add esp, 0xc
jmp 0x5657a1
push 0x130
call fcn.00564640
add esp, 4
test eax, eax
je 0x565cc9
mov esi, eax
push 0x4c3150
push eax
push 1
call fcn.004eff80
add esp, 0xc
test eax, eax
je 0x565cc9
xor eax, eax
mov dword [esi + 0x124], eax
pcmpeqd xmm0, xmm0
lea ebx, [esp + 0x1b0]
movdqa xmmword [ebx + 0x20], xmm0
movdqa xmmword [ebx + 0x10], xmm0
movdqa xmmword [ebx], xmm0
pxor xmm0, xmm0
lea eax, [esp + 0x30]
movdqa xmmword [eax + 0x20], xmm0
movdqa xmmword [eax + 0x10], xmm0
movdqa xmmword [eax], xmm0
push 0x30
push ebx
call fcn.004f04c0
add esp, 8
xor eax, eax
push eax
lea eax, [esp + 0x34]
push eax
push ebx
push esi
call fcn.004c2dc0
add esp, 0x10
test eax, eax
je 0x565bdb
lea eax, [esi + 0x120]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esi + 0x120], eax
mov dword [esi + 0x11c], eax
mov dword [esi + 0x118], 0xc0ffee
mov dword [esi + 0x128], edi
jmp 0x5655af
push eax
lea eax, [esp + 0x1b4]
push eax
push dword [esp + 0x14]
call fcn.005c9580
add esp, 0xc
jmp 0x565a00
pcmpeqd xmm0, xmm0
lea eax, [esp + 0x1b0]
movdqa xmmword [eax + 0x20], xmm0
movdqa xmmword [eax + 0x10], xmm0
movdqa xmmword [eax], xmm0
mov ebx, 0x30
push ebx
push eax
call fcn.004f04c0
add esp, 8
mov ecx, esi
lea edx, [esp + 0x1b0]
push ebx
call fcn.004c2fc0
add esp, 4
test eax, eax
je 0x565bdb
xor eax, eax
mov dword [esi + 0x114], eax
mov dword [esi + 0x110], 1
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
mov dword [esi + 0x11c], eax
mov dword [esi + 0x118], 0xc0ffee
mov dword [esi + 0x128], edi
xor ecx, ecx
inc ecx
jmp 0x5655c7
test ecx, ecx
je 0x5657e5
xor edi, edi
mov ecx, dword [esi + 0xf4]
mov eax, dword [esi + 0x108]
bswap eax
inc eax
bswap eax
mov dword [esi + 0x108], eax
mov eax, dword [esp + 0xc]
add eax, edi
mov dword [esp + 0x2c], eax
call dword [0x8010bc]
push esi
push dword [esp + 0x30]
push dword [esp + 0x18]
call ecx
add esp, 0xc
add edi, 0x10
cmp edi, dword [esp + 8]
jae 0x5657e5
jmp 0x565b97
call fcn.005dae09
push 0x118
push esi
call fcn.005646e0
add esp, 8
jmp 0x565993
push esi
push 0x100
lea eax, [esp + 0x1b8]
push eax
call fcn.00402f80
jmp 0x56571d
push esi
push 0x100
lea eax, [esp + 0x1b8]
push eax
call fcn.00402f80
jmp 0x565919
mov edi, dword [esp + 0x1c]
bt eax, 9
jae 0x565c4f
push esi
push 0x100
lea eax, [esp + 0x1b8]
push eax
call fcn.00404020
add esp, 0xc
xor eax, eax
mov ecx, 0x4040d0
jmp 0x56572a
push esi
push 0x100
lea eax, [esp + 0x1b8]
push eax
call fcn.00646080
add esp, 0xc
mov eax, 0x646c10
mov ecx, 0x645f90
jmp 0x56572a
bt eax, 9
jae 0x565ca0
mov esi, dword [esp + 8]
push esi
push 0x100
lea eax, [esp + 0x1b8]
push eax
call fcn.00404020
add esp, 0xc
xor eax, eax
mov ecx, 0x4040d0
jmp 0x565926
mov esi, dword [esp + 8]
push esi
push 0x100
lea eax, [esp + 0x1b8]
push eax
call fcn.00646080
add esp, 0xc
mov eax, 0x646c10
mov ecx, 0x645f90
jmp 0x565926
lea esi, [esp + 0x60]
jmp 0x565a72