Function at 0x502c00
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov esi, dword [ebp + 0x18]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x38]
add edx, esi
adc ecx, 0
xor eax, eax
mov edi, 0xffffffe0
cmp edi, edx
mov edi, 0xf
sbb edi, ecx
jb 0x50331c
mov eax, dword [ebx + 0x168]
mov dword [esp + 0x10], eax
mov dword [ebx + 0x38], edx
mov dword [ebx + 0x3c], ecx
cmp dword [ebx + 0x174], 0
je 0x502ce0
lea edx, [ebx + 0x60]
movdqu xmm0, xmmword [ebx + 0x40]
pxor xmm2, xmm2
movdqa xmm1, xmm0
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [esp + 0x20], xmm0
lea ecx, [esp + 0x20]
call fcn.005048c0
movdqu xmm0, xmmword [esp + 0x20]
movdqa xmm1, xmm0
pxor xmm2, xmm2
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [ebx + 0x40], xmm0
mov dword [ebx + 0x174], 0
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x170]
test eax, eax
je 0x502dbb
test esi, esi
je 0x503311
nop dword [eax]
movzx ecx, byte [ebx + eax + 0x10]
xor cl, byte [edx]
inc edx
mov byte [edi], cl
xor byte [ebx + eax + 0x40], cl
inc edi
lea ecx, [esi - 1]
inc eax
and eax, 0xf
je 0x502d1f
cmp esi, 1
mov esi, ecx
jne 0x502d00
test eax, eax
jne 0x503311
mov dword [esp + 8], edx
lea edx, [ebx + 0x60]
movdqu xmm0, xmmword [ebx + 0x40]
pxor xmm2, xmm2
movdqa xmm1, xmm0
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [esp + 0x20], xmm0
mov esi, ecx
lea ecx, [esp + 0x20]
call fcn.005048c0
mov edx, dword [esp + 8]
mov eax, esi
movdqu xmm0, xmmword [esp + 0x20]
movdqa xmm1, xmm0
pxor xmm2, xmm2
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [ebx + 0x40], xmm0
jmp 0x502dbd
mov eax, esi
mov esi, dword [ebx + 0xc]
bswap esi
cmp eax, 0xc00
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], edi
jb 0x502fb8
mov dword [esp + 0x1c], esi
lea ecx, [ebx + 0x10]
mov dword [esp + 0x30], ecx
lea ecx, [ebx + 0x60]
mov dword [esp + 0x38], ecx
nop word [eax + eax]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0xc]
mov edi, 0xfffff400
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
nop dword [eax]
push dword [ebp + 0xc]
push dword [esp + 0x34]
push ebx
call dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
add esp, 0xc
inc esi
mov eax, esi
bswap eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0x10]
xor eax, dword [edx + edi + 0xc00]
mov dword [ecx + edi + 0xc00], eax
mov eax, dword [ebx + 0x14]
xor eax, dword [edx + edi + 0xc04]
mov dword [ecx + edi + 0xc04], eax
mov eax, dword [ebx + 0x18]
xor eax, dword [edx + edi + 0xc08]
mov dword [ecx + edi + 0xc08], eax
mov eax, dword [ebx + 0x1c]
xor eax, dword [edx + edi + 0xc0c]
mov dword [ecx + edi + 0xc0c], eax
add edi, 0x10
jne 0x502e10
mov dword [esp + 0x1c], esi
lea eax, [ecx + edi]
mov dword [esp + 0x34], eax
movdqu xmm0, xmmword [ebx + 0x40]
movdqa xmm1, xmm0
pxor xmm2, xmm2
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [esp + 0x20], xmm0
lea eax, [ecx + edi + 0xc00]
mov dword [esp + 0xc], eax
lea eax, [edx + edi]
add eax, 0xc00
mov dword [esp + 8], eax
mov ebx, 0xfffff400
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
movdqu xmm0, xmmword [eax + ebx + 0xc00]
movdqa xmm1, xmm0
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmm1, xmmword [esp + 0x20]
pxor xmm1, xmm0
movdqu xmmword [esp + 0x20], xmm1
lea ecx, [esp + 0x20]
mov edx, esi
call fcn.005048c0
pxor xmm2, xmm2
add ebx, 0x10
jne 0x502ee0
movdqu xmm0, xmmword [esp + 0x20]
movdqa xmm1, xmm0
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
mov ebx, dword [ebp + 8]
movdqu xmmword [ebx + 0x40], xmm0
mov eax, dword [esp + 4]
add eax, 0xfffff400
cmp eax, 0xbff
mov edx, dword [esp + 8]
ja 0x502df0
mov ecx, dword [esp + 0x14]
add ecx, edi
add ecx, 0xc00
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x18]
lea edx, [ecx + edi]
add edx, 0xc00
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x1c]
mov edi, eax
and edi, 0xff0
je 0x503139
mov dword [esp + 0x14], edi
lea edi, [ebx + 0x10]
mov dword [esp + 0x18], edi
mov ebx, esi
mov esi, eax
mov edi, edx
nop word [eax + eax]
mov dword [esp + 4], esi
push dword [ebp + 0xc]
push dword [esp + 0x1c]
mov esi, dword [ebp + 8]
push esi
call dword [esp + 0x1c]
add esp, 0xc
inc ebx
mov eax, ebx
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
xor eax, dword [edi]
mov ecx, dword [esp + 0xc]
mov dword [ecx], eax
mov eax, dword [esi + 0x14]
xor eax, dword [edi + 4]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x18]
xor eax, dword [edi + 8]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x1c]
mov esi, dword [esp + 4]
xor eax, dword [edi + 0xc]
mov dword [ecx + 0xc], eax
add ecx, 0x10
mov dword [esp + 0xc], ecx
add edi, 0x10
add esi, 0xfffffff0
cmp esi, 0xf
ja 0x502fe0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov eax, dword [ebp + 8]
lea esi, [eax + 0x60]
mov edi, dword [esp + 0x14]
neg edi
movdqu xmm0, xmmword [eax + 0x40]
pxor xmm2, xmm2
movdqa xmm1, xmm0
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [esp + 0x20], xmm0
nop dword [eax + eax]
mov eax, dword [esp + 0xc]
movdqu xmm0, xmmword [eax + edi]
movdqa xmm1, xmm0
pxor xmm2, xmm2
punpcklbw xmm1, xmm2
pshufd xmm1, xmm1, 0x4e
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpckhbw xmm0, xmm2
pshufd xmm0, xmm0, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmm1, xmmword [esp + 0x20]
pxor xmm1, xmm0
movdqu xmmword [esp + 0x20], xmm1
lea ecx, [esp + 0x20]
mov edx, esi
call fcn.005048c0
add edi, 0x10
jne 0x503090
pxor xmm0, xmm0
movdqu xmm1, xmmword [esp + 0x20]
movdqa xmm2, xmm1
punpcklbw xmm2, xmm0
pshufd xmm2, xmm2, 0x4e
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpckhbw xmm1, xmm0
pshufd xmm0, xmm1, 0x4e
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm2
mov eax, dword [ebp + 8]
movdqu xmmword [eax + 0x40], xmm0
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0x10]
mov esi, ebx
test eax, eax
mov edi, dword [esp + 0xc]
je 0x50323a
mov dword [esp + 8], edx
mov ebx, esi
mov esi, dword [ebp + 8]
lea edx, [esi + 0x10]
push dword [ebp + 0xc]
mov dword [esp + 0x1c], edx
push edx
push esi
mov dword [esp + 0x10], eax
call ecx
mov ecx, dword [esp + 0x10]
add esp, 0xc
inc ebx
bswap ebx
mov dword [esi + 0xc], ebx
mov ebx, esi
xor eax, eax
cmp ecx, 8
jb 0x5032a1
lea edx, [edi + ecx]
mov dword [esp + 0x30], edx
lea esi, [ecx + ebx]
add esi, 0x40
mov dword [esp + 0x14], esi
mov edx, dword [esp + 8]
lea ebx, [edx + ecx]
cmp edi, esi
setb byte [esp + 0x10]
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
cmp esi, ecx
setb byte [esp + 0x34]
cmp edi, ebx
setb byte [esp + 0x1c]
cmp edx, ecx
setb ch
cmp esi, ebx
setb bh
cmp edx, dword [esp + 0x14]
setb bl
mov cl, byte [esp + 0x34]
test byte [esp + 0x10], cl
jne 0x503241
and byte [esp + 0x1c], ch
jne 0x503241
mov ecx, dword [esp + 4]
and bh, bl
mov ebx, dword [ebp + 8]
mov edi, dword [esp + 0xc]
jne 0x5032a1
xor eax, eax
mov ecx, dword [esp + 4]
cmp ecx, 0x10
jb 0x503258
mov eax, ecx
and eax, 0xfffffff0
xor ecx, ecx
mov edx, dword [esp + 8]
nop dword [eax]
movdqu xmm0, xmmword [edx + ecx]
movdqu xmm1, xmmword [ebx + ecx + 0x10]
pxor xmm1, xmm0
movdqu xmmword [edi + ecx], xmm1
movdqu xmm0, xmmword [ebx + ecx + 0x40]
pxor xmm0, xmm1
movdqu xmmword [ebx + ecx + 0x40], xmm0
add ecx, 0x10
cmp eax, ecx
jne 0x503200
mov ecx, dword [esp + 4]
cmp ecx, eax
jne 0x50324e
mov eax, ecx
jmp 0x503311
xor eax, eax
jmp 0x5032ea
mov ecx, dword [esp + 4]
mov ebx, dword [ebp + 8]
mov edi, dword [esp + 0xc]
jmp 0x5032a1
test cl, 8
jne 0x503258
and ecx, 0xf
jmp 0x5032a1
mov edx, eax
mov eax, ecx
and eax, 0xfffffff8
and ecx, 7
mov esi, dword [esp + 8]
nop word cs:[eax + eax]
movq xmm0, qword [esi + edx]
movq xmm1, qword [ebx + edx + 0x10]
pxor xmm1, xmm0
movq qword [edi + edx], xmm1
movq xmm0, qword [ebx + edx + 0x40]
pxor xmm0, xmm1
movq qword [ebx + edx + 0x40], xmm0
add edx, 8
cmp eax, edx
jne 0x503270
cmp dword [esp + 4], eax
je 0x50330d
test cl, 1
jne 0x5032ef
mov edx, ecx
cmp ecx, 1
je 0x50330d
mov ecx, dword [esp + 8]
add ecx, eax
inc ecx
lea esi, [eax + ebx]
add esi, 0x41
add eax, edi
inc eax
xor edi, edi
nop
movzx ebx, byte [esi + edi - 0x31]
xor bl, byte [ecx + edi - 1]
mov byte [eax + edi - 1], bl
xor byte [esi + edi - 1], bl
movzx ebx, byte [esi + edi - 0x30]
xor bl, byte [ecx + edi]
mov byte [eax + edi], bl
xor byte [esi + edi], bl
add edi, 2
cmp edx, edi
jne 0x5032c0
mov eax, dword [esp + 4]
mov ebx, dword [ebp + 8]
jmp 0x503311
movzx edx, byte [ebx + eax + 0x10]
mov esi, dword [esp + 8]
xor dl, byte [esi + eax]
mov byte [edi + eax], dl
xor byte [ebx + eax + 0x40], dl
lea edx, [ecx - 1]
or eax, 1
cmp ecx, 1
jne 0x5032ad
mov eax, dword [esp + 4]
mov dword [ebx + 0x170], eax
mov eax, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret