Function at 0x582f90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0x14]
xor ecx, ecx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x174]
mov dword [ebp - 0x10], eax
mov eax, ebx
add eax, dword [esi + 0x38]
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x583285
jb 0x582fc5
cmp eax, 0xffffffe0
ja 0x583285
cmp dword [esi + 0x16c], 0
push edi
mov edi, dword [esi + 0x168]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
mov dword [ebp - 8], edi
je 0x58303a
test ebx, ebx
jne 0x583001
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00583ac0
add esp, 8
mov dword [esi + 0x16c], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movups xmm0, xmmword [esi + 0x40]
mov edi, 0x10
mov dword [ebp - 8], edi
movups xmmword [esi + 0x178], xmm0
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0
mov dword [esi + 0x16c], 0
movzx ecx, byte [esi + 0xc]
movzx eax, byte [esi + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xf]
shl ecx, 8
or ecx, eax
mov eax, edi
and eax, 0xf
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x14], eax
je 0x5830c4
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov dword [ebp + 0x14], edx
mov dword [ebp - 4], ecx
test ebx, ebx
je 0x58309d
mov al, byte [eax + esi + 0x10]
dec ebx
xor al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
mov byte [edi + esi + 0x178], al
inc edi
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp + 0x14], edx
and eax, 0xf
mov dword [ebp - 4], ecx
mov dword [ebp - 0x14], eax
jne 0x583072
jmp 0x5830a5
test eax, eax
jne 0x583276
push edi
lea eax, [esi + 0x178]
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00583890
add esp, 0x10
xor edi, edi
mov dword [ebp - 8], edi
jmp 0x5830d0
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
cmp ebx, 0x10
jb 0x5830f6
test edi, edi
je 0x5830f6
push edi
lea eax, [esi + 0x178]
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00583890
add esp, 0x10
xor edi, edi
mov dword [ebp - 8], edi
cmp ebx, 0xc00
jb 0x583188
mov edi, dword [ebp - 4]
mov eax, 0xaaaaaaab
mul ebx
mov eax, dword [ebp + 0x14]
shr edx, 0xb
mov dword [ebp - 0x18], edx
push esi
push dword [ebp - 0x10]
push 0xc0
push eax
push edi
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
add ecx, 0xc0
mov eax, ecx
mov dword [ebp - 0xc], ecx
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [ebp + 0x14]
push 0xc00
push eax
lea eax, [esi + 0x60]
mov byte [esi + 0xf], cl
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00583890
mov eax, dword [ebp + 0x14]
add esp, 0x24
add eax, 0xc00
add edi, 0xc00
sub ebx, 0xc00
mov dword [ebp + 0x14], eax
sub dword [ebp - 0x18], 1
jne 0x583115
mov dword [ebp - 4], edi
mov edi, dword [ebp - 8]
jmp 0x58318b
mov eax, dword [ebp + 0x14]
mov ecx, ebx
and ecx, 0xfffffff0
mov dword [ebp - 0x18], ecx
je 0x5831ef
push esi
push dword [ebp - 0x10]
mov edi, ecx
shr edi, 4
push edi
push eax
push dword [ebp - 4]
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
add ecx, edi
mov edi, dword [ebp + 0x14]
mov eax, ecx
mov dword [ebp - 0xc], ecx
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [ebp - 0x18]
sub ebx, eax
add dword [ebp - 4], eax
push eax
push edi
lea eax, [esi + 0x60]
mov byte [esi + 0xf], cl
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00583890
add esp, 0x24
add edi, dword [ebp - 0x18]
mov dword [ebp + 0x14], edi
mov edi, dword [ebp - 8]
test ebx, ebx
je 0x583276
push dword [ebp - 0x10]
lea eax, [esi + 0x10]
push eax
mov eax, dword [esi + 0x170]
push esi
call eax
mov ecx, dword [ebp - 0xc]
add esp, 0xc
inc ecx
mov eax, ecx
mov byte [esi + 0xf], cl
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
mov ecx, dword [ebp - 0x14]
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [ebp + 0x14]
lea edx, [ecx + eax]
add ecx, 0x10
add ecx, esi
sub dword [ebp - 4], eax
lea eax, [esi + 0x178]
mov dword [ebp + 0x14], ecx
mov esi, dword [ebp - 4]
mov dword [ebp - 0x18], eax
mov eax, ecx
nop dword [eax + eax]
movzx eax, byte [eax]
lea edx, [edx + 1]
movzx ecx, byte [esi + edx - 1]
xor ecx, eax
mov eax, dword [ebp - 0x18]
mov byte [edx - 1], cl
mov byte [eax + edi], cl
inc edi
mov eax, dword [ebp + 0x14]
inc eax
mov dword [ebp + 0x14], eax
sub ebx, 1
jne 0x583250
mov esi, dword [ebp + 8]
mov dword [esi + 0x168], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret