Function at 0x5082f0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1c
call fcn.0059cab0
push ebx
mov ebx, dword [esp + 0x24]
xor ecx, ecx
push edi
mov edi, dword [esp + 0x34]
mov eax, dword [ebx + 0x178]
mov dword [esp + 0x20], eax
mov eax, edi
add eax, dword [ebx + 0x38]
adc ecx, dword [ebx + 0x3c]
cmp ecx, 0xf
ja 0x508622
jb 0x50832c
cmp eax, 0xffffffe0
ja 0x508622
cmp dword [ebx + 0x170], 0
lea edx, [ebx + 0x40]
push ebp
mov dword [ebx + 0x3c], ecx
mov ecx, dword [ebx + 0x16c]
push esi
mov dword [ebx + 0x38], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x1c], edx
je 0x508544
test edi, edi
jne 0x508376
lea eax, [ebx + 0x60]
push eax
mov eax, dword [ebx + 0x168]
push edx
call eax
add esp, 8
mov dword [ebx + 0x170], edi
xor eax, eax
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x1c
ret
movups xmm0, xmmword [edx]
lea eax, [ebx + 0x17c]
mov ecx, 0x10
mov dword [esp + 0x24], eax
movups xmmword [eax], xmm0
mov dword [edx], 0
lea eax, [ebx + 0xc]
mov dword [edx + 4], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], 0
mov esi, dword [eax]
mov dword [esp + 0x20], eax
xor eax, eax
bswap esi
mov dword [esp + 0x3c], ecx
mov dword [ebx + 0x170], 0
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x10], eax
cmp edi, 0x10
jb 0x5083fb
test ecx, ecx
je 0x5083fb
push ecx
push dword [esp + 0x28]
lea eax, [ebx + 0x60]
push eax
mov eax, dword [ebx + 0x164]
push edx
call eax
add esp, 0x10
mov dword [esp + 0x3c], 0
cmp edi, 0xc00
jb 0x50846d
mov eax, 0xaaaaaaab
mul edi
shr edx, 0xb
mov dword [esp + 0x24], edx
push 0xc00
push ebp
lea eax, [ebx + 0x60]
push eax
push dword [esp + 0x28]
mov eax, dword [ebx + 0x164]
call eax
mov ecx, dword [esp + 0x20]
push ebx
push dword [esp + 0x3c]
push 0xc0
push ecx
push ebp
call dword [esp + 0x64]
mov ecx, dword [esp + 0x44]
add esi, 0xc0
add dword [esp + 0x34], 0xc00
mov eax, esi
add esp, 0x24
add ebp, 0xc00
bswap eax
sub edi, 0xc00
mov dword [ecx], eax
sub dword [esp + 0x24], 1
jne 0x508411
mov dword [esp + 0x14], esi
mov eax, edi
and eax, 0xfffffff0
mov dword [esp + 0x24], eax
je 0x5084c0
push eax
mov esi, eax
lea eax, [ebx + 0x60]
push ebp
push eax
push dword [esp + 0x28]
mov eax, dword [ebx + 0x164]
shr esi, 4
call eax
mov ecx, dword [esp + 0x20]
push ebx
push dword [esp + 0x3c]
push esi
push ecx
push ebp
call dword [esp + 0x64]
add dword [esp + 0x38], esi
add esp, 0x24
mov esi, dword [esp + 0x14]
mov eax, esi
mov ecx, dword [esp + 0x20]
bswap eax
mov dword [ecx], eax
mov eax, dword [esp + 0x24]
add ebp, eax
add dword [esp + 0x10], eax
sub edi, eax
test edi, edi
je 0x508530
push dword [esp + 0x28]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 0x174]
push ebx
call eax
mov eax, dword [esp + 0x2c]
inc esi
mov ecx, dword [esp + 0x1c]
add esp, 0xc
bswap esi
sub ebp, ecx
mov dword [eax], esi
mov eax, dword [esp + 0x18]
lea esi, [eax + 0x10]
add esi, ebx
lea edx, [eax + ecx]
mov eax, dword [esp + 0x3c]
add ebx, 0x17c
add eax, ebx
add dword [esp + 0x3c], edi
mov dword [esp + 0x28], eax
mov ebx, eax
nop dword [eax]
mov cl, byte [edx + ebp]
lea ebx, [ebx + 1]
mov byte [ebx - 1], cl
lea esi, [esi + 1]
mov al, byte [esi - 1]
lea edx, [edx + 1]
xor al, cl
mov byte [edx - 1], al
sub edi, 1
jne 0x508510
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
pop esi
pop ebp
mov dword [ebx + 0x16c], eax
xor eax, eax
pop edi
pop ebx
add esp, 0x1c
ret
mov esi, dword [ebx + 0xc]
lea eax, [ebx + 0x17c]
mov dword [esp + 0x24], eax
lea eax, [ebx + 0xc]
mov dword [esp + 0x20], eax
mov eax, ecx
bswap esi
and eax, 0xf
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
je 0x5083c9
mov ebp, dword [esp + 0x34]
lea edx, [ebx + 0x17c]
add edx, ecx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x38]
test edi, edi
je 0x508612
mov esi, dword [esp + 0x20]
dec edi
mov cl, byte [ebp]
inc ebp
inc dword [esp + 0x20]
mov byte [esi], cl
mov al, byte [eax + ebx + 0x10]
mov esi, dword [esp + 0x14]
xor al, cl
mov ecx, dword [esp + 0x3c]
mov byte [edx], al
inc ecx
mov eax, dword [esp + 0x18]
inc edx
inc eax
mov dword [esp + 0x10], edx
and eax, 0xf
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], eax
jne 0x508585
push dword [esp + 0x3c]
lea eax, [ebx + 0x17c]
push eax
mov eax, dword [ebx + 0x164]
lea edx, [ebx + 0x60]
lea ecx, [ebx + 0x40]
push edx
push ecx
call eax
mov eax, dword [esp + 0x28]
add esp, 0x10
mov edx, dword [esp + 0x1c]
xor ecx, ecx
mov dword [esp + 0x18], eax
lea eax, [ebx + 0x17c]
mov dword [esp + 0x24], eax
lea eax, [ebx + 0xc]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], esi
jmp 0x5083d5
pop esi
pop ebp
pop edi
mov dword [ebx + 0x16c], ecx
xor eax, eax
pop ebx
add esp, 0x1c
ret
pop edi
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret