Function at 0x59fed0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
cmp dword [eax + 0xc], 0
mov ecx, dword [edx + 0xc]
je 0x59fef4
test ecx, ecx
je 0x59ff6f
mov ecx, eax
jmp 0x59fefe
xor esi, esi
test ecx, ecx
jne 0x59ff74
mov ecx, edx
mov edx, eax
mov eax, dword [edx]
mov dword [esp], eax
mov edi, dword [edx + 4]
mov ebp, dword [ecx]
mov eax, dword [ecx + 4]
cmp edi, eax
mov esi, eax
mov dword [esp + 0x10], eax
cmovb eax, edi
test eax, eax
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edx
mov dword [esp + 4], ecx
mov dword [esp + 0x1c], edi
je 0x59ffbd
xor edx, edx
xor esi, esi
mov edi, dword [esp]
nop word cs:[eax + eax]
mov ebx, dword [edi + esi*4]
mov ecx, dword [ebp + esi*4]
mov ebp, ebx
sub ebp, ecx
xor ecx, ebx
xor ebp, ebx
or ebp, ecx
xor ebp, ebx
mov ebx, ebp
sar ebx, 0x1f
not ebp
shr ebp, 0x1f
or ebp, ebx
test ecx, ecx
cmovne edx, ebp
mov ebp, dword [esp + 8]
inc esi
cmp eax, esi
jne 0x59ff40
jmp 0x59ffbf
mov esi, 1
push edx
push eax
push ebx
call fcn.0059f350
add esp, 0xc
test eax, eax
je 0x5a02f7
mov ecx, dword [ebx + 4]
mov eax, ecx
sar eax, 0x1f
and eax, ecx
nop word cs:[eax + eax]
test ecx, ecx
jle 0x59ffb5
mov edi, dword [ebx]
lea edx, [ecx - 1]
cmp dword [edi + ecx*4 - 4], 0
mov ecx, edx
je 0x59ffa0
inc edx
mov eax, edx
mov dword [ebx + 4], eax
jmp 0x5a02ed
xor edx, edx
mov edi, dword [esp + 0x1c]
mov ebx, edi
mov ecx, dword [esp + 0x10]
sub ebx, ecx
jae 0x59ffe1
mov ebx, ecx
sub ebx, edi
xor eax, eax
cmp ebx, 8
jae 0x59fff7
mov ebx, dword [esp + 0x34]
jmp 0x5a0135
jbe 0x5a0028
xor eax, eax
cmp ebx, 8
jae 0x5a0035
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0xc]
jmp 0x5a0286
lea esi, [ebx - 8]
mov dword [esp + 0x14], esi
shr esi, 3
inc esi
mov eax, esi
and eax, 3
mov dword [esp + 0x18], eax
cmp dword [esp + 0x14], 0x18
mov dword [esp], ebx
jae 0x5a005b
pxor xmm0, xmm0
xor eax, eax
pxor xmm1, xmm1
mov ebx, dword [esp + 0x34]
jmp 0x5a00c8
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp + 0xc]
jmp 0x5a02a8
lea eax, [ebx - 8]
mov ecx, eax
shr ecx, 3
inc ecx
mov ebp, ecx
and ebp, 3
cmp eax, 0x18
jae 0x5a019f
pxor xmm0, xmm0
xor esi, esi
pxor xmm1, xmm1
jmp 0x5a0217
and esi, 0xfffffffc
lea ebp, [ebp + edi*4 + 0x70]
pxor xmm0, xmm0
xor eax, eax
pxor xmm1, xmm1
mov ebx, dword [esp + 0x34]
movdqu xmm2, xmmword [ebp + eax*4 - 0x70]
por xmm2, xmm0
movdqu xmm0, xmmword [ebp + eax*4 - 0x60]
por xmm0, xmm1
movdqu xmm1, xmmword [ebp + eax*4 - 0x50]
movdqu xmm3, xmmword [ebp + eax*4 - 0x40]
movdqu xmm4, xmmword [ebp + eax*4 - 0x30]
por xmm4, xmm1
por xmm4, xmm2
movdqu xmm2, xmmword [ebp + eax*4 - 0x20]
por xmm2, xmm3
por xmm2, xmm0
movdqu xmm0, xmmword [ebp + eax*4 - 0x10]
por xmm0, xmm4
movdqu xmm1, xmmword [ebp + eax*4]
por xmm1, xmm2
add eax, 0x20
add esi, 0xfffffffc
jne 0x5a0070
mov esi, dword [esp]
and esi, 0xfffffff8
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x18]
test esi, esi
je 0x5a010a
add eax, edi
mov ebp, dword [esp + 8]
lea eax, [eax*4 + 0x10]
add eax, ebp
shl esi, 5
xor ebp, ebp
nop
movdqu xmm2, xmmword [eax + ebp - 0x10]
por xmm0, xmm2
movdqu xmm2, xmmword [eax + ebp]
por xmm1, xmm2
add ebp, 0x20
cmp esi, ebp
jne 0x5a00f0
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
pshufd xmm0, xmm1, 0x55
por xmm0, xmm1
movd eax, xmm0
mov esi, dword [esp + 0x14]
cmp dword [esp], esi
jne 0x5a0133
mov esi, dword [esp + 4]
jmp 0x5a0149
add edi, esi
mov esi, dword [esp + 4]
mov ebp, dword [esp + 8]
nop dword [eax]
or eax, dword [ebp + edi*4]
inc edi
cmp ecx, edi
jne 0x5a0140
mov ecx, eax
not ecx
dec eax
and eax, ecx
sar eax, 0x1f
not eax
or edx, eax
mov ebp, dword [esp + 0xc]
test edx, edx
js 0x5a02b4
push esi
push ebp
push ebx
call fcn.005a0310
add esp, 0xc
test eax, eax
je 0x5a02f7
mov ecx, dword [ebx + 4]
mov eax, ecx
sar eax, 0x1f
and eax, ecx
test ecx, ecx
jle 0x5a0195
mov esi, dword [ebx]
lea edx, [ecx - 1]
cmp dword [esi + ecx*4 - 4], 0
mov ecx, edx
je 0x5a0180
inc edx
mov eax, edx
mov dword [ebx + 4], eax
xor esi, esi
jmp 0x5a02ed
and ecx, 0xfffffffc
mov eax, dword [esp + 0x10]
mov esi, dword [esp]
lea eax, [esi + eax*4]
add eax, 0x70
pxor xmm0, xmm0
xor esi, esi
pxor xmm1, xmm1
nop dword [eax]
movdqu xmm2, xmmword [eax + esi*4 - 0x70]
por xmm2, xmm0
movdqu xmm0, xmmword [eax + esi*4 - 0x60]
por xmm0, xmm1
movdqu xmm1, xmmword [eax + esi*4 - 0x50]
movdqu xmm3, xmmword [eax + esi*4 - 0x40]
movdqu xmm4, xmmword [eax + esi*4 - 0x30]
por xmm4, xmm1
por xmm4, xmm2
movdqu xmm2, xmmword [eax + esi*4 - 0x20]
por xmm2, xmm3
por xmm2, xmm0
movdqu xmm0, xmmword [eax + esi*4 - 0x10]
por xmm0, xmm4
movdqu xmm1, xmmword [eax + esi*4]
por xmm1, xmm2
add esi, 0x20
add ecx, 0xfffffffc
jne 0x5a01c0
mov dword [esp + 8], ebx
mov ecx, ebx
and ecx, 0xfffffff8
test ebp, ebp
mov ebx, dword [esp + 0x34]
je 0x5a025a
add esi, dword [esp + 0x10]
mov eax, dword [esp]
lea eax, [eax + esi*4]
add eax, 0x10
shl ebp, 5
xor esi, esi
nop word [eax + eax]
movdqu xmm2, xmmword [eax + esi - 0x10]
por xmm0, xmm2
movdqu xmm2, xmmword [eax + esi]
por xmm1, xmm2
add esi, 0x20
cmp ebp, esi
jne 0x5a0240
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
pshufd xmm0, xmm1, 0x55
por xmm0, xmm1
movd eax, xmm0
cmp dword [esp + 8], ecx
mov ebp, dword [esp + 0xc]
je 0x5a0298
mov esi, dword [esp + 0x10]
add esi, ecx
mov ecx, esi
mov esi, dword [esp]
nop dword [eax]
or eax, dword [esi + ecx*4]
inc ecx
cmp edi, ecx
jne 0x5a0290
xor esi, esi
xor ecx, ecx
test eax, eax
cmove esi, edx
setne cl
or ecx, esi
mov edx, ecx
mov esi, dword [esp + 4]
test edx, edx
jns 0x5a0163
push ebp
push esi
push ebx
call fcn.005a0310
add esp, 0xc
test eax, eax
je 0x5a02f7
mov ecx, dword [ebx + 4]
mov eax, ecx
sar eax, 0x1f
and eax, ecx
nop dword [eax]
test ecx, ecx
jle 0x5a02e5
mov esi, dword [ebx]
lea edx, [ecx - 1]
cmp dword [esi + ecx*4 - 4], 0
mov ecx, edx
je 0x5a02d0
inc edx
mov eax, edx
mov dword [ebx + 4], eax
mov esi, 1
mov dword [ebx + 0xc], esi
mov eax, 1
jmp 0x5a02f9
xor eax, eax
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret