Function at 0x582380
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov al, byte [esi]
mov ecx, dword [esi + 0x28]
mov ebx, dword [esi + 0x2c]
mov byte [ebp - 1], al
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ebx
test al, 0x40
jne 0x5823b7
push ebx
lea eax, [esi + 0x10]
push eax
push esi
call ecx
mov al, byte [ebp - 1]
add esp, 0xc
add dword [esi + 0x20], 1
adc dword [esi + 0x24], 0
movzx eax, al
mov edx, 0xf
and eax, 7
xor ecx, ecx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x30], edx
cmp edx, 0xf
jae 0x5823e3
movzx eax, byte [edx + esi]
or ecx, eax
mov byte [edx + esi], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x5823d0
movzx eax, byte [esi + 0xf]
mov edi, dword [ebp + 0x14]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, edi
je 0x5823fe
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0xf]
or eax, 8
shr eax, 3
add dword [esi + 0x20], eax
adc dword [esi + 0x24], 0
cmp dword [esi + 0x24], 0x20000000
jb 0x58242b
ja 0x58241f
cmp dword [esi + 0x20], 0
jbe 0x58242b
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
shr eax, 4
mov dword [ebp - 0x18], eax
test eax, eax
je 0x582480
lea ecx, [esi + 0x10]
push ecx
push esi
push ebx
mov ebx, dword [ebp + 0x10]
push eax
push ebx
push dword [ebp + 0xc]
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0x18]
add esp, 0x18
mov eax, dword [ebp + 0xc]
shl ecx, 4
add eax, ecx
add ebx, ecx
sub edi, ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp + 0x14], edi
je 0x5825ea
shr ecx, 4
push ecx
push esi
call fcn.00582740
mov eax, dword [ebp - 0x10]
lea edx, [esi + 0x10]
add esp, 8
mov ecx, edx
jmp 0x582499
lea edx, [esi + 0x10]
mov ecx, edx
test edi, edi
je 0x5825ed
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], eax
test edi, edi
je 0x5824ce
mov edx, eax
mov esi, edi
mov al, byte [edx]
lea edx, [edx + 1]
xor byte [ecx], al
lea ecx, [ecx + 1]
sub esi, 1
jne 0x5824a1
mov esi, dword [ebp + 8]
push dword [ebp - 8]
lea ecx, [esi + 0x10]
push ecx
push ecx
call dword [ebp - 0xc]
push dword [ebp - 8]
lea eax, [ebp - 0x40]
push eax
push esi
call dword [ebp - 0xc]
add esp, 0x18
jmp 0x5824ec
push dword [ebp - 8]
push edx
push edx
call dword [ebp - 0xc]
push dword [ebp - 8]
lea eax, [ebp - 0x40]
push eax
push esi
call dword [ebp - 0xc]
add esp, 0x18
test edi, edi
je 0x5825ea
xor edx, edx
cmp edi, 0x40
jb 0x5825cb
lea ecx, [ebx - 1]
lea eax, [ebp + edi - 0x41]
add ecx, edi
cmp ebx, eax
ja 0x58250f
lea eax, [ebp - 0x40]
cmp ecx, eax
jae 0x5825cb
mov ecx, dword [ebp - 0x10]
lea eax, [ecx - 1]
add eax, edi
cmp ebx, eax
ja 0x582528
lea eax, [ebx - 1]
add eax, edi
cmp eax, ecx
jae 0x5825cb
mov eax, edi
and eax, 0xffffffc0
mov dword [ebp - 0x2c], eax
lea eax, [ecx + 0x30]
sub ecx, ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
lea eax, [ebx + 0x10]
mov esi, dword [ebp - 0x20]
lea ecx, [ebp - 0x40]
sub ecx, ebx
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x30]
mov edi, dword [ebp - 0x14]
sub ecx, ebx
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x20]
sub ecx, ebx
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x1c]
movups xmm0, xmmword [ecx - 0x30]
lea ecx, [ecx + 0x40]
movups xmm1, xmmword [ebp + edx - 0x40]
add edx, 0x40
lea eax, [eax + 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [esi + eax - 0x40]
movups xmmword [eax - 0x50], xmm1
movups xmm1, xmmword [edi + eax - 0x40]
mov edi, dword [ebp - 0x28]
pxor xmm1, xmm0
movups xmm0, xmmword [ecx - 0x50]
movups xmmword [eax - 0x40], xmm1
movups xmm1, xmmword [ebx + eax - 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [ecx - 0x40]
movups xmmword [eax - 0x30], xmm1
movups xmm1, xmmword [edi + eax - 0x40]
mov edi, dword [ebp - 0x14]
pxor xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
cmp edx, dword [ebp - 0x2c]
jb 0x582562
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], edx
cmp edx, edi
jae 0x5825ea
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x40]
sub esi, eax
sub ebx, eax
lea ecx, [ebp - 0x40]
add ecx, edx
inc edx
mov al, byte [ecx + esi]
xor al, byte [ecx]
mov byte [ecx + ebx], al
cmp edx, edi
jb 0x5825d5
mov esi, dword [ebp + 8]
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x10
jae 0x58260b
mov eax, 0x10
sub eax, ecx
push eax
lea eax, [ecx + esi]
push 0
push eax
call fcn.005d6d60
add esp, 0xc
push ebx
lea eax, [ebp - 0x40]
push eax
push esi
call dword [ebp - 0xc]
mov eax, dword [ebp - 0x40]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x3c]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0x38]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 0x34]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 1]
pop edi
mov byte [esi], al
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret