Function at 0x59eb10
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov esi, dword [ecx + 0xc]
cmp esi, dword [eax + 0xc]
jne 0x59eb6d
push eax
push ecx
push ebx
call fcn.0059f350
add esp, 0xc
test eax, eax
je 0x59ebe3
mov ecx, dword [ebx + 4]
mov eax, ecx
sar eax, 0x1f
and eax, ecx
nop dword [eax + eax]
test ecx, ecx
jle 0x59eb65
mov edi, dword [ebx]
lea edx, [ecx - 1]
cmp dword [edi + ecx*4 - 4], 0
mov ecx, edx
je 0x59eb50
inc edx
mov eax, edx
mov dword [ebx + 4], eax
jmp 0x59ef4d
test esi, esi
mov edx, eax
cmove edx, ecx
cmove ecx, eax
mov eax, dword [edx]
mov dword [esp + 4], eax
mov edi, dword [edx + 4]
mov ebp, dword [ecx]
mov eax, dword [ecx + 4]
cmp edi, eax
mov esi, eax
mov dword [esp + 0xc], eax
cmovb eax, edi
test eax, eax
mov dword [esp], ecx
mov dword [esp + 8], edx
mov dword [esp + 0x1c], edi
je 0x59ebea
xor edi, edi
xor esi, esi
nop word cs:[eax + eax]
mov ecx, dword [esp + 4]
mov ebx, dword [ecx + esi*4]
mov ecx, dword [ebp + esi*4]
mov edx, ebp
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 edi, ebp
mov ebp, edx
inc esi
cmp eax, esi
jne 0x59ebb0
jmp 0x59ebec
xor eax, eax
jmp 0x59ef52
xor edi, edi
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x1c]
mov edx, edi
mov ecx, dword [esp + 0xc]
sub edx, ecx
jae 0x59ec16
mov edx, ecx
sub edx, edi
xor eax, eax
cmp edx, 8
mov dword [esp + 0x14], ebp
jae 0x59ec2f
mov ebx, dword [esp + 0x34]
jmp 0x59ed89
jbe 0x59ec59
xor ecx, ecx
cmp edx, 8
jae 0x59ec75
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp]
mov edx, dword [esp + 0x10]
jmp 0x59eee7
lea eax, [edx - 8]
mov ebp, eax
shr ebp, 3
inc ebp
mov esi, ebp
and esi, 3
cmp eax, 0x18
mov dword [esp + 4], esi
jae 0x59ec9b
pxor xmm0, xmm0
xor esi, esi
pxor xmm1, xmm1
mov ebx, dword [esp + 0x34]
jmp 0x59ed17
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp]
mov esi, dword [esp + 8]
mov ecx, dword [esp + 0x10]
test ecx, ecx
jns 0x59edc2
jmp 0x59ef14
lea ecx, [edx - 8]
mov eax, ecx
shr eax, 3
inc eax
mov ebx, eax
and ebx, 3
cmp ecx, 0x18
jae 0x59ee04
pxor xmm0, xmm0
xor esi, esi
pxor xmm1, xmm1
jmp 0x59ee77
and ebp, 0xfffffffc
mov eax, dword [esp + 0x14]
lea eax, [eax + edi*4]
add eax, 0x70
pxor xmm0, xmm0
xor esi, esi
pxor xmm1, xmm1
mov ebx, dword [esp + 0x34]
nop word cs:[eax + 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 ebp, 0xfffffffc
jne 0x59ecc0
mov eax, edx
and eax, 0xfffffff8
mov dword [esp + 0x18], eax
mov ebp, dword [esp + 4]
test ebp, ebp
je 0x59ed5a
add esi, edi
mov eax, dword [esp + 0x14]
lea eax, [eax + esi*4]
add eax, 0x10
shl ebp, 5
xor esi, esi
nop dword [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 0x59ed40
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
pshufd xmm0, xmm1, 0x55
por xmm0, xmm1
movd eax, xmm0
mov esi, dword [esp + 0x18]
cmp edx, esi
jne 0x59ed85
mov ebp, dword [esp]
mov esi, dword [esp + 8]
jmp 0x59eda8
mov edx, esi
add edi, esi
mov ebp, dword [esp]
mov esi, dword [esp + 8]
mov edx, dword [esp + 0x14]
nop word cs:[eax + eax]
or eax, dword [edx + edi*4]
inc edi
cmp ecx, edi
jne 0x59eda0
mov ecx, eax
not ecx
dec eax
and eax, ecx
sar eax, 0x1f
not eax
mov ecx, dword [esp + 0x10]
or ecx, eax
test ecx, ecx
js 0x59ef14
push ebp
push esi
push ebx
call fcn.005a0310
add esp, 0xc
test eax, eax
je 0x59ef5d
mov ecx, dword [ebx + 4]
mov eax, ecx
sar eax, 0x1f
and eax, ecx
nop
test ecx, ecx
jle 0x59edf5
mov esi, dword [ebx]
lea edx, [ecx - 1]
cmp dword [esi + ecx*4 - 4], 0
mov ecx, edx
je 0x59ede0
inc edx
mov eax, edx
mov dword [ebx + 4], eax
mov eax, 1
xor esi, esi
jmp 0x59ef52
and eax, 0xfffffffc
mov ecx, dword [esp + 0xc]
mov esi, dword [esp + 4]
lea ecx, [esi + ecx*4]
add ecx, 0x70
pxor xmm0, xmm0
xor esi, esi
pxor xmm1, xmm1
nop
movdqu xmm2, xmmword [ecx + esi*4 - 0x70]
por xmm2, xmm0
movdqu xmm0, xmmword [ecx + esi*4 - 0x60]
por xmm0, xmm1
movdqu xmm1, xmmword [ecx + esi*4 - 0x50]
movdqu xmm3, xmmword [ecx + esi*4 - 0x40]
movdqu xmm4, xmmword [ecx + esi*4 - 0x30]
por xmm4, xmm1
por xmm4, xmm2
movdqu xmm2, xmmword [ecx + esi*4 - 0x20]
por xmm2, xmm3
por xmm2, xmm0
movdqu xmm0, xmmword [ecx + esi*4 - 0x10]
por xmm0, xmm4
movdqu xmm1, xmmword [ecx + esi*4]
por xmm1, xmm2
add esi, 0x20
add eax, 0xfffffffc
jne 0x59ee20
mov eax, edx
and eax, 0xfffffff8
test ebx, ebx
je 0x59eeba
add esi, dword [esp + 0xc]
mov ecx, dword [esp + 4]
lea ecx, [ecx + esi*4]
add ecx, 0x10
shl ebx, 5
xor esi, esi
nop word cs:[eax + eax]
movdqu xmm2, xmmword [ecx + esi - 0x10]
por xmm0, xmm2
movdqu xmm2, xmmword [ecx + esi]
por xmm1, xmm2
add esi, 0x20
cmp ebx, esi
jne 0x59eea0
por xmm0, xmm1
pshufd xmm1, xmm0, 0xee
por xmm1, xmm0
pshufd xmm0, xmm1, 0x55
por xmm0, xmm1
movd ecx, xmm0
cmp edx, eax
mov ebx, dword [esp + 0x34]
mov ebp, dword [esp]
mov edx, dword [esp + 0x10]
je 0x59eef8
add dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 4]
nop
or ecx, dword [esi + eax*4]
inc eax
cmp edi, eax
jne 0x59eef0
xor esi, esi
xor eax, eax
test ecx, ecx
cmove esi, edx
setne al
or eax, esi
mov ecx, eax
mov esi, dword [esp + 8]
test ecx, ecx
jns 0x59edc2
push esi
push ebp
push ebx
call fcn.005a0310
add esp, 0xc
test eax, eax
je 0x59ef5d
mov ecx, dword [ebx + 4]
mov eax, ecx
sar eax, 0x1f
and eax, ecx
nop dword [eax]
test ecx, ecx
jle 0x59ef45
mov esi, dword [ebx]
lea edx, [ecx - 1]
cmp dword [esi + ecx*4 - 4], 0
mov ecx, edx
je 0x59ef30
inc edx
mov eax, edx
mov dword [ebx + 4], eax
mov esi, 1
mov eax, 1
mov dword [ebx + 0xc], esi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
jmp 0x59ef55