Function at 0x5820a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, dword [ebp + 8]
mov bl, byte [esi]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 1], bl
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
test bl, 0x40
jne 0x5820d4
push eax
lea eax, [esi + 0x10]
push eax
push esi
call ecx
add esp, 0xc
add dword [esi + 0x20], 1
adc dword [esi + 0x24], 0
movzx eax, bl
mov edx, 0xf
and eax, 7
xor ecx, ecx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x28], edx
cmp edx, 0xf
jae 0x582103
nop dword [eax]
movzx eax, byte [edx + esi]
or ecx, eax
mov byte [edx + esi], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x5820f0
movzx eax, byte [esi + 0xf]
mov edx, dword [ebp + 0x14]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, edx
je 0x58211d
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [edx + 0xf]
or eax, 8
shr eax, 3
add dword [esi + 0x20], eax
adc dword [esi + 0x24], 0
cmp dword [esi + 0x24], 0x20000000
jb 0x582149
ja 0x58213e
cmp dword [esi + 0x20], 0
jbe 0x582149
pop esi
mov eax, 0xfffffffe
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
cmp edx, 0x10
jb 0x5821d9
shr edx, 4
lea ecx, [esi + 0x10]
mov dword [ebp - 0x10], edx
mov eax, dword [edi]
xor dword [ecx], eax
mov eax, dword [edi + 4]
xor dword [ecx + 4], eax
push dword [ebp - 8]
mov eax, dword [edi + 8]
xor dword [esi + 0x18], eax
mov eax, dword [edi + 0xc]
xor dword [esi + 0x1c], eax
push ecx
push ecx
call dword [ebp - 0xc]
push dword [ebp - 8]
lea eax, [ebp - 0x38]
push eax
push esi
call dword [ebp - 0xc]
add esp, 0x18
mov eax, 8
dec eax
add byte [eax + esi + 8], 1
jne 0x58219f
test eax, eax
jne 0x582193
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x38]
xor ecx, dword [edi]
xor eax, dword [ebp - 0x34]
mov edx, dword [ebp + 0x14]
mov dword [ebx], ecx
sub edx, 0x10
mov ecx, dword [ebp - 0x30]
mov dword [ebx + 4], eax
xor ecx, dword [edi + 8]
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [ebp - 0x2c]
mov dword [ebx + 8], ecx
lea ecx, [esi + 0x10]
mov dword [ebx + 0xc], eax
add ebx, 0x10
sub dword [ebp - 0x10], 1
mov dword [ebp + 0x14], edx
jne 0x582162
mov dword [ebp - 0x14], ebx
test edx, edx
je 0x58232b
lea ecx, [esi + 0x10]
mov esi, edi
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
xor byte [ecx], al
lea ecx, [ecx + 1]
sub edx, 1
jne 0x5821f0
mov esi, dword [ebp + 8]
push dword [ebp - 8]
lea eax, [esi + 0x10]
push eax
push eax
call dword [ebp - 0xc]
push dword [ebp - 8]
lea eax, [ebp - 0x38]
push eax
push esi
call dword [ebp - 0xc]
mov ecx, dword [ebp + 0x14]
add esp, 0x18
xor edx, edx
test ecx, ecx
je 0x58232b
cmp ecx, 0x40
jb 0x58230c
lea eax, [ebp + ecx - 0x39]
cmp ebx, eax
ja 0x58224d
lea eax, [ebp - 0x38]
mov dword [ebp - 0x10], eax
lea eax, [ecx - 1]
add eax, ebx
cmp eax, dword [ebp - 0x10]
jae 0x58230c
lea eax, [ecx - 1]
add eax, edi
cmp ebx, eax
ja 0x582263
lea eax, [ecx - 1]
add eax, ebx
cmp eax, edi
jae 0x58230c
mov eax, ecx
mov esi, edi
lea ecx, [ebp - 0x38]
sub esi, ebx
sub ecx, ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], ecx
lea esi, [edi + 0x30]
lea ecx, [ebp - 0x28]
and eax, 0xffffffc0
sub ecx, ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], ecx
lea eax, [ebx + 0x10]
lea ecx, [ebp - 0x18]
sub ecx, ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x18]
nop word [eax + eax]
movups xmm0, xmmword [esi - 0x30]
lea esi, [esi + 0x40]
movups xmm1, xmmword [ebp + edx - 0x38]
add edx, 0x40
lea eax, [eax + 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [ecx + eax - 0x40]
movups xmmword [eax - 0x50], xmm1
movups xmm1, xmmword [ebx + eax - 0x40]
mov ebx, dword [ebp - 0x1c]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x50]
movups xmmword [eax - 0x40], xmm1
movups xmm1, xmmword [ebx + eax - 0x40]
mov ebx, dword [ebp - 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [esi - 0x40]
movups xmmword [eax - 0x30], xmm1
movups xmm1, xmmword [ebx + eax - 0x40]
mov ebx, dword [ebp - 0x10]
pxor xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
cmp edx, dword [ebp - 0x24]
jb 0x5822a0
mov esi, dword [ebp + 8]
mov eax, edx
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x24], edx
cmp eax, dword [ebp + 0x14]
jae 0x58232b
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0x38]
sub edi, eax
sub ebx, eax
lea ecx, [ebp - 0x38]
add ecx, edx
inc edx
mov al, byte [ecx + edi]
xor al, byte [ecx]
mov byte [ecx + ebx], al
cmp edx, esi
jb 0x582316
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
pop edi
cmp ecx, 0x10
jae 0x58234a
mov eax, 0x10
sub eax, ecx
push eax
lea eax, [ecx + esi]
push 0
push eax
call fcn.005d6d60
add esp, 0xc
push dword [ebp - 8]
lea eax, [ebp - 0x38]
push eax
push esi
call dword [ebp - 0xc]
mov eax, dword [ebp - 0x38]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x34]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0x30]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 0x2c]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 1]
mov byte [esi], al
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret