Function at 0x439580
Capabilities:
Encode data using xor
Encrypt data using chaskey

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x38
mov eax, dword [0x4d9164]
xor eax, esp
mov dword [esp + 0x34], eax
push esi
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
mov dword [esp + 8], ecx
xor eax, eax
mov ecx, edx
movaps xmmword [esp + 0x1c], xmm0
mov dword [esp + 0xc], edx
mov dword [esp + 0x20], esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x2c], edi
test ecx, ecx
je 0x439738
mov edx, 4
cmp ecx, edx
cmovb edx, ecx
xor eax, eax
mov dword [esp + 0x14], edx
test edx, edx
jle 0x4396c0
mov esi, dword [esp + 0xc]
cmp edx, 0x40
jb 0x439696
lea ecx, [esi - 1]
lea edi, [esp + 0x20]
add ecx, edx
cmp edi, ecx
lea edi, [esp + edx + 0x1f]
ja 0x4395fe
cmp edi, esi
jae 0x439696
mov ecx, edx
and ecx, 0x8000003f
jns 0x43960d
dec ecx
or ecx, 0xffffffc0
inc ecx
mov edi, edx
lea edx, [esp + 0x20]
sub edx, esi
sub edi, ecx
mov dword [esp + 0x1c], edx
lea ecx, [esi + 0x20]
lea edx, [esp + 0x30]
sub edx, esi
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x14]
movups xmm0, xmmword [esp + eax + 0x20]
lea ecx, [ecx + 0x40]
movups xmm1, xmmword [ecx - 0x60]
pxor xmm1, xmm0
movups xmmword [esp + eax + 0x20], xmm1
movups xmm0, xmmword [esp + eax + 0x30]
movups xmm1, xmmword [ecx - 0x50]
pxor xmm1, xmm0
movups xmm0, xmmword [ecx - 0x40]
movups xmmword [esp + eax + 0x30], xmm1
add eax, 0x40
movups xmm1, xmmword [esi + ecx - 0x40]
pxor xmm1, xmm0
movups xmmword [esi + ecx - 0x40], xmm1
mov esi, dword [esp + 0x18]
movups xmm1, xmmword [ecx - 0x30]
movups xmm0, xmmword [esi + ecx - 0x40]
pxor xmm1, xmm0
movups xmmword [esi + ecx - 0x40], xmm1
mov esi, dword [esp + 0x1c]
cmp eax, edi
jl 0x439630
mov esi, dword [esp + 0xc]
mov dword [esp + 0x18], eax
cmp eax, edx
jge 0x4396b4
lea ecx, [esp + 0x20]
sub esi, ecx
nop dword [eax]
lea edx, [esp + 0x20]
add edx, eax
inc eax
mov cl, byte [edx + esi]
xor byte [edx], cl
mov edx, dword [esp + 0x14]
cmp eax, edx
jl 0x4396a0
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
add dword [esp + 0xc], edx
sub ecx, edx
mov edx, dword [esp + 0x20]
add edx, esi
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x28]
add ecx, edi
rol esi, 5
xor esi, edx
rol edi, 8
xor edi, ecx
rol edx, 0x10
add ecx, esi
rol esi, 7
xor esi, ecx
rol ecx, 0x10
lea eax, [edx + edi]
rol edi, 0xd
xor edi, eax
add eax, esi
add ecx, edi
rol esi, 5
xor esi, eax
rol edi, 8
xor edi, ecx
rol eax, 0x10
add eax, edi
rol edi, 0xd
xor edi, eax
mov dword [esp + 0x20], eax
lea eax, [ecx + esi]
mov dword [esp + 0x2c], edi
mov ecx, dword [esp + 0x10]
rol esi, 7
xor esi, eax
rol eax, 0x10
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], eax
test ecx, ecx
jne 0x4395c0
mov eax, dword [esp + 0x14]
xor byte [esp + eax + 0x20], 0x1f
xor byte [esp + 0x23], 0x80
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x2c]
add edx, edi
mov ecx, dword [esp + 0x28]
add ecx, esi
rol edi, 5
xor edi, edx
rol esi, 8
xor esi, ecx
rol edx, 0x10
add ecx, edi
rol edi, 7
xor edi, ecx
rol ecx, 0x10
lea eax, [edx + esi]
rol esi, 0xd
xor esi, eax
add eax, edi
add ecx, esi
rol edi, 5
xor edi, eax
rol esi, 8
xor esi, ecx
rol eax, 0x10
add ecx, edi
add eax, esi
rol edi, 7
xor edi, ecx
rol esi, 0xd
xor esi, eax
rol ecx, 0x10
add ecx, esi
add eax, edi
rol edi, 5
xor edi, eax
rol esi, 8
xor esi, ecx
rol eax, 0x10
add ecx, edi
add eax, esi
rol edi, 7
xor edi, ecx
rol esi, 0xd
xor esi, eax
rol ecx, 0x10
add ecx, esi
rol esi, 8
xor esi, ecx
lea edx, [edi + eax]
rol edi, 5
xor edi, edx
rol edx, 0x10
add ecx, edi
lea eax, [edx + esi]
mov edx, edi
rol edx, 7
xor edx, ecx
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
xor ecx, esp
call fcn.004810ea
mov esp, ebp
pop ebp
ret