Function at 0x582f60
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 - 0x14], eax
mov eax, ebx
add eax, dword [esi + 0x38]
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x583248
jb 0x582f95
cmp eax, 0xffffffe0
ja 0x583248
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 0x58300a
test ebx, ebx
jne 0x582fd1
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00584110
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, dword [ebp + 0x10]
mov dword [ebp - 0xc], ecx
mov ecx, edi
and ecx, 0xf
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], ecx
je 0x58309c
mov edx, dword [ebp + 0xc]
mov dword [ebp + 0x14], edx
test ebx, ebx
je 0x583075
mov cl, byte [edx]
dec ebx
mov eax, dword [ebp - 0x10]
inc edx
mov byte [edi + esi + 0x178], cl
inc edi
mov dword [ebp + 0x14], edx
mov al, byte [eax + esi + 0x10]
xor al, cl
mov ecx, dword [ebp - 4]
mov byte [ecx], al
inc ecx
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x10]
inc ecx
and ecx, 0xf
mov dword [ebp - 0x10], ecx
jne 0x583042
jmp 0x58307d
test ecx, ecx
jne 0x583239
push edi
lea eax, [esi + 0x178]
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00583ee0
add esp, 0x10
xor edi, edi
mov dword [ebp - 8], edi
jmp 0x5830a2
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0x14], eax
cmp ebx, 0x10
jb 0x5830c8
test edi, edi
je 0x5830c8
push edi
lea eax, [esi + 0x178]
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.00583ee0
add esp, 0x10
xor edi, edi
mov dword [ebp - 8], edi
cmp ebx, 0xc00
jb 0x583154
mov edi, dword [ebp + 0x14]
lea ecx, [esi + 0x60]
mov eax, 0xaaaaaaab
mul ebx
shr edx, 0xb
mov dword [ebp - 0x18], edx
push 0xc00
push edi
push ecx
lea eax, [esi + 0x40]
push eax
call fcn.00583ee0
mov eax, dword [ebp - 4]
push esi
push dword [ebp - 0x14]
push 0xc0
push eax
push edi
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
add esp, 0x24
add dword [ebp - 4], 0xc00
add ecx, 0xc0
mov eax, ecx
mov dword [ebp - 0xc], ecx
shr eax, 0x18
add edi, 0xc00
mov byte [esi + 0xc], al
sub ebx, 0xc00
mov eax, ecx
mov byte [esi + 0xf], cl
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
lea ecx, [esi + 0x60]
sub dword [ebp - 0x18], 1
mov byte [esi + 0xe], al
jne 0x5830e7
mov dword [ebp + 0x14], edi
mov edi, dword [ebp - 8]
mov eax, ebx
and eax, 0xfffffff0
mov dword [ebp - 0x18], eax
je 0x5831b7
push eax
push dword [ebp + 0x14]
mov edi, eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
shr edi, 4
push eax
call fcn.00583ee0
mov eax, dword [ebp - 4]
push esi
push dword [ebp - 0x14]
push edi
push eax
push dword [ebp + 0x14]
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
add esp, 0x24
add ecx, edi
mov edi, dword [ebp - 8]
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]
add dword [ebp - 4], eax
add dword [ebp + 0x14], eax
sub ebx, eax
mov byte [esi + 0xf], cl
test ebx, ebx
je 0x583239
push dword [ebp - 0x14]
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 - 0x10]
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [ebp - 4]
lea edx, [ecx + eax]
add ecx, 0x10
add ecx, esi
sub dword [ebp + 0x14], eax
lea eax, [esi + 0x178]
mov dword [ebp - 0x14], ecx
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x18], eax
mov eax, ecx
mov cl, byte [esi + edx]
lea edx, [edx + 1]
mov esi, dword [ebp - 0x18]
mov byte [esi + edi], cl
inc edi
mov al, byte [eax]
mov esi, dword [ebp + 0x14]
xor al, cl
mov byte [edx - 1], al
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
sub ebx, 1
jne 0x583213
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