Function at 0x583970
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov edx, dword [ebp + 0x14]
xor ecx, ecx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x170]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x174]
mov dword [ebp - 0xc], eax
mov eax, edx
add eax, dword [esi + 0x38]
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x583cdc
jb 0x5839ad
cmp eax, 0xffffffe0
ja 0x583cdc
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], eax
mov eax, dword [esi + 0x168]
mov dword [esi + 0x3c], ecx
mov dword [ebp - 4], eax
je 0x583a22
test edx, edx
jne 0x5839ea
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00584820
add esp, 8
mov dword [esi + 0x16c], 0
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
movups xmm0, xmmword [esi + 0x40]
mov dword [ebp - 4], 0x10
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 dword [ebp - 8], ecx
mov ecx, dword [ebp - 4]
mov eax, ecx
push ebx
mov ebx, dword [ebp + 0x10]
and eax, 0xf
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
je 0x583ab0
nop dword [eax]
test edx, edx
je 0x583a88
mov al, byte [eax + esi + 0x10]
dec edx
xor al, byte [edi]
inc edi
mov byte [ebx], al
inc ebx
mov byte [ecx + esi + 0x178], al
inc ecx
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp + 0x14], edx
and eax, 0xf
mov dword [ebp - 0x14], eax
jne 0x583a60
jmp 0x583a90
test eax, eax
jne 0x583ccd
push ecx
lea eax, [esi + 0x178]
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.005845f0
mov edx, dword [ebp + 0x14]
add esp, 0x10
xor ecx, ecx
mov dword [ebp - 4], ecx
cmp edx, 0x10
jb 0x583adb
test ecx, ecx
je 0x583adb
push ecx
lea eax, [esi + 0x178]
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.005845f0
mov edx, dword [ebp + 0x14]
add esp, 0x10
mov dword [ebp - 4], 0
cmp edx, 0xc00
jb 0x583b9a
mov eax, 0xaaaaaaab
lea ecx, [esi + 0x10]
mul edx
shr edx, 0xb
mov dword [ebp - 0x1c], edx
nop word [eax + eax]
mov dword [ebp - 0x18], 0xc0
push dword [ebp - 0xc]
push ecx
push esi
call dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
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
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [esi + 0x10]
xor eax, dword [edi]
mov dword [ebp - 8], ecx
lea ecx, [esi + 0x10]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esi + 0x1c]
mov dword [ebx + 0xc], eax
add ebx, 0x10
sub dword [ebp - 0x18], 1
jne 0x583b07
push 0xc00
lea eax, [ebx - 0xc00]
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.005845f0
mov edx, dword [ebp + 0x14]
lea ecx, [esi + 0x10]
sub edx, 0xc00
add esp, 0x10
sub dword [ebp - 0x1c], 1
mov dword [ebp + 0x14], edx
jne 0x583b00
mov ecx, edx
and ecx, 0xfffffff0
mov dword [ebp - 0x18], ecx
je 0x583c34
cmp edx, 0x10
jb 0x583c1b
shr edx, 4
lea eax, [esi + 0x10]
mov dword [ebp - 0x1c], edx
push dword [ebp - 0xc]
push eax
push esi
call dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
add esp, 0xc
inc ecx
sub dword [ebp + 0x14], 0x10
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
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [esi + 0x10]
xor eax, dword [edi]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esi + 0x1c]
mov dword [ebx + 0xc], eax
add ebx, 0x10
sub dword [ebp - 0x1c], 1
lea eax, [esi + 0x10]
mov dword [ebp - 8], ecx
jne 0x583bb6
mov ecx, dword [ebp - 0x18]
push ecx
mov eax, ebx
sub eax, ecx
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.005845f0
mov edx, dword [ebp + 0x14]
add esp, 0x10
test edx, edx
je 0x583cbb
push dword [ebp - 0xc]
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
add esp, 0xc
inc ecx
mov edx, dword [ebp + 0x14]
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
lea eax, [ecx + ebx]
add ecx, 0x10
add ecx, esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], ecx
sub edi, ebx
mov ebx, dword [ebp - 0x1c]
lea ecx, [esi + 0x178]
mov esi, dword [ebp - 4]
mov dword [ebp - 0x18], ecx
nop
movzx ecx, byte [edi + eax]
lea ebx, [ebx + 1]
movzx eax, byte [ebx - 1]
xor ecx, eax
mov eax, dword [ebp - 0x14]
mov byte [eax], cl
mov eax, dword [ebp - 0x18]
mov byte [eax + esi], cl
inc esi
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
sub edx, 1
jne 0x583c90
mov dword [ebp - 4], esi
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 4]
pop edi
mov dword [esi + 0x168], eax
xor eax, eax
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
pop edi
pop ebx
mov dword [esi + 0x168], ecx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret