Function at 0x582c90
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x14
call fcn.004a0d90
cmp dword [esp + 0x2c], 0
push ebx
push ebp
push esi
push edi
je 0x582eda
mov ebx, dword [esp + 0x38]
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
inc ebx
movzx edx, byte [ebx + 1]
inc ebx
shl eax, 8
or ecx, eax
movzx eax, byte [ebx + 1]
inc ebx
shl edx, 0x10
or ecx, edx
shl eax, 0x18
inc ebx
movzx edx, byte [ebx + 1]
or ecx, eax
movzx eax, byte [ebx]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
inc ebx
shl edx, 8
or eax, edx
movzx edx, byte [ebx + 1]
inc ebx
shl edx, 0x10
or eax, edx
movzx edx, byte [ebx + 1]
inc ebx
shl edx, 0x18
or eax, edx
mov edx, dword [esp + 0x30]
sub ebx, 7
add edx, 0xfffffff8
mov dword [esp + 0x3c], eax
js 0x582dd8
lea eax, [edx + 8]
shr eax, 3
mov dword [esp + 0x14], eax
neg eax
lea eax, [edx + eax*8]
mov dword [esp + 0x30], eax
nop
movzx eax, byte [edi]
movzx edx, byte [edi + 1]
inc edi
shl edx, 8
or eax, edx
movzx edx, byte [edi + 1]
inc edi
shl edx, 0x10
or eax, edx
movzx edx, byte [edi + 1]
inc edi
movzx ebp, byte [edi + 1]
shl edx, 0x18
or eax, edx
inc edi
movzx edx, byte [edi + 1]
inc edi
shl edx, 8
or ebp, edx
movzx edx, byte [edi + 1]
inc edi
shl edx, 0x10
or ebp, edx
movzx edx, byte [edi + 1]
inc edi
xor eax, ecx
shl edx, 0x18
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
or ebp, edx
xor ebp, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x20]
push ecx
inc edi
mov dword [esp + 0x28], ebp
call fcn.005829f0
mov eax, dword [esp + 0x24]
mov byte [esi], al
inc esi
mov edx, eax
shr edx, 8
mov byte [esi], dl
inc esi
mov edx, eax
shr edx, 0x10
mov byte [esi], dl
inc esi
mov ecx, eax
shr eax, 0x18
mov byte [esi], al
mov eax, dword [esp + 0x28]
inc esi
mov byte [esi], al
inc esi
mov edx, eax
shr edx, 8
mov byte [esi], dl
inc esi
mov edx, eax
shr edx, 0x10
mov byte [esi], dl
inc esi
mov dword [esp + 0x44], eax
shr eax, 0x18
mov byte [esi], al
add esp, 8
inc esi
sub dword [esp + 0x14], 1
jne 0x582d20
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
cmp edx, 0xfffffff8
je 0x582ea1
lea edi, [edi + edx + 8]
add edx, 7
xor ebp, ebp
xor eax, eax
cmp edx, 7
ja case.default.0x582df1
jmp dword [edx*4 + 0x58312c]
movzx ebp, byte [edi - 1]
dec edi
shl ebp, 0x18
movzx eax, byte [edi - 1]
dec edi
shl eax, 0x10
or ebp, eax
movzx edx, byte [edi - 1]
dec edi
shl edx, 8
or ebp, edx
movzx eax, byte [edi - 1]
dec edi
or ebp, eax
movzx eax, byte [edi - 1]
dec edi
shl eax, 0x18
movzx edx, byte [edi - 1]
dec edi
shl edx, 0x10
or eax, edx
movzx edx, byte [edi - 1]
dec edi
shl edx, 8
or eax, edx
movzx edx, byte [edi - 1]
or eax, edx
xor ebp, dword [esp + 0x3c]
xor eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x28], ebp
call fcn.005829f0
mov eax, dword [esp + 0x24]
mov byte [esi], al
inc esi
mov edx, eax
shr edx, 8
mov byte [esi], dl
mov edx, eax
inc esi
shr edx, 0x10
mov byte [esi], dl
mov ecx, eax
inc esi
shr eax, 0x18
mov byte [esi], al
mov eax, dword [esp + 0x28]
mov byte [esi + 1], al
inc esi
mov edx, eax
shr edx, 8
inc esi
mov byte [esi], dl
mov edx, eax
inc esi
mov dword [esp + 0x44], eax
shr edx, 0x10
add esp, 8
shr eax, 0x18
mov byte [esi], dl
mov byte [esi + 1], al
mov eax, dword [esp + 0x3c]
mov byte [ebx], cl
inc ebx
mov edx, ecx
shr edx, 8
mov byte [ebx], dl
inc ebx
mov edx, ecx
shr edx, 0x10
mov byte [ebx], dl
inc ebx
shr ecx, 0x18
mov byte [ebx], cl
inc ebx
mov byte [ebx], al
inc ebx
mov ecx, eax
shr ecx, 8
mov byte [ebx], cl
pop edi
inc ebx
mov edx, eax
shr edx, 0x10
pop esi
mov byte [ebx], dl
shr eax, 0x18
pop ebp
mov byte [ebx + 1], al
pop ebx
add esp, 0x14
ret
mov ebp, dword [esp + 0x38]
movzx ebx, byte [ebp]
movzx eax, byte [ebp + 1]
inc ebp
movzx ecx, byte [ebp + 1]
inc ebp
movzx edx, byte [ebp + 1]
inc ebp
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
shl eax, 8
or ebx, eax
movzx eax, byte [ebp + 1]
inc ebp
shl ecx, 0x10
or ebx, ecx
movzx ecx, byte [ebp + 1]
inc ebp
shl edx, 0x18
inc ebp
shl ecx, 8
or ebx, edx
movzx edx, byte [ebp]
or eax, ecx
movzx ecx, byte [ebp + 1]
inc ebp
shl edx, 0x10
shl ecx, 0x18
or eax, edx
or eax, ecx
mov ecx, dword [esp + 0x30]
sub ebp, 7
add ecx, 0xfffffff8
mov dword [esp + 0x3c], eax
mov dword [esp + 0x30], ecx
js 0x583018
lea eax, [ecx + 8]
shr eax, 3
mov dword [esp + 0x18], eax
neg eax
lea edx, [ecx + eax*8]
mov dword [esp + 0x30], edx
movzx eax, byte [esi]
movzx ecx, byte [esi + 1]
inc esi
movzx edx, byte [esi + 1]
inc esi
shl ecx, 8
or eax, ecx
movzx ecx, byte [esi + 1]
inc esi
shl edx, 0x10
or eax, edx
shl ecx, 0x18
or eax, ecx
mov dword [esp + 0x10], eax
inc esi
movzx edx, byte [esi + 1]
mov dword [esp + 0x1c], eax
movzx eax, byte [esi]
inc esi
movzx ecx, byte [esi + 1]
inc esi
shl edx, 8
or eax, edx
movzx edx, byte [esi + 1]
inc esi
shl ecx, 0x10
or eax, ecx
shl edx, 0x18
or eax, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
push ecx
inc esi
call fcn.00582b30
mov ecx, dword [esp + 0x44]
xor ecx, dword [esp + 0x28]
mov eax, ebx
xor eax, dword [esp + 0x24]
inc edi
mov byte [edi - 1], al
mov ebx, dword [esp + 0x18]
mov edx, eax
shr edx, 8
mov byte [edi], dl
inc edi
mov edx, eax
shr edx, 0x10
mov byte [edi], dl
inc edi
shr eax, 0x18
mov byte [edi], al
inc edi
mov byte [edi], cl
inc edi
mov eax, ecx
shr eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x1c]
inc edi
mov edx, ecx
shr edx, 0x10
mov byte [edi], dl
inc edi
shr ecx, 0x18
mov byte [edi], cl
add esp, 8
inc edi
sub dword [esp + 0x18], 1
mov dword [esp + 0x3c], eax
jne 0x582f56
mov ecx, dword [esp + 0x30]
cmp ecx, 0xfffffff8
je 0x5830ea
movzx eax, byte [esi]
movzx ecx, byte [esi + 1]
inc esi
movzx edx, byte [esi + 1]
shl ecx, 8
or eax, ecx
inc esi
movzx ecx, byte [esi + 1]
inc esi
shl edx, 0x10
or eax, edx
shl ecx, 0x18
or eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
movzx eax, byte [esi + 1]
inc esi
movzx edx, byte [esi + 1]
inc esi
movzx ecx, byte [esi + 2]
shl edx, 8
inc esi
or eax, edx
movzx edx, byte [esi]
shl ecx, 8
or ecx, edx
shl ecx, 0x10
or eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00582b30
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x44]
xor ebx, dword [esp + 0x24]
xor eax, dword [esp + 0x28]
lea edi, [edi + ecx + 8]
add ecx, 7
add esp, 8
cmp ecx, 7
ja case.default.0x5830a1
jmp dword [ecx*4 + 0x58314c]
dec edi
mov edx, eax
shr edx, 0x18
mov byte [edi], dl
dec edi
mov ecx, eax
shr ecx, 0x10
mov byte [edi], cl
dec edi
mov edx, eax
shr edx, 8
mov byte [edi], dl
dec edi
mov byte [edi], al
dec edi
mov eax, ebx
shr eax, 0x18
mov byte [edi], al
dec edi
mov ecx, ebx
shr ecx, 0x10
mov byte [edi], cl
dec edi
mov edx, ebx
shr edx, 8
mov byte [edi], dl
mov byte [edi - 1], bl
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov byte [ebp], bl
inc ebp
mov ecx, ebx
shr ecx, 8
mov byte [ebp], cl
inc ebp
mov edx, ebx
shr edx, 0x10
mov byte [ebp], dl
inc ebp
shr ebx, 0x18
mov byte [ebp], bl
inc ebp
mov byte [ebp], al
inc ebp
mov ecx, eax
shr ecx, 8
mov byte [ebp], cl
inc ebp
mov edx, eax
pop edi
shr edx, 0x10
mov byte [ebp], dl
shr eax, 0x18
pop esi
mov byte [ebp + 1], al
pop ebp
pop ebx
add esp, 0x14
ret