Function at 0x503330
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x38]
add edx, dword [ebp + 0x18]
adc ecx, 0
xor eax, eax
mov edi, 0xffffffe0
cmp edi, edx
mov edi, 0xf
sbb edi, ecx
jb 0x503a17
mov esi, dword [ebx + 0x168]
mov dword [ebx + 0x38], edx
mov dword [ebx + 0x3c], ecx
cmp dword [ebx + 0x174], 0
je 0x50340a
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 + 0x18], xmm0
lea ecx, [esp + 0x18]
call fcn.005048c0
movdqu xmm0, xmmword [esp + 0x18]
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 0x5034f8
cmp dword [ebp + 0x18], 0
je 0x503a09
mov dword [esp + 0x14], esi
mov esi, dword [ebp + 0x18]
nop
movzx ecx, byte [edx]
inc edx
mov dword [esp + 4], edx
mov ebx, dword [ebp + 8]
movzx edx, byte [ebx + eax + 0x10]
xor dl, cl
mov byte [edi], dl
mov edx, dword [esp + 4]
xor byte [ebx + eax + 0x40], cl
inc edi
lea ecx, [esi - 1]
inc eax
and eax, 0xf
je 0x50345d
cmp esi, 1
mov esi, ecx
jne 0x503430
test eax, eax
jne 0x503a09
mov eax, dword [ebp + 8]
lea edx, [eax + 0x60]
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 + 0x18], xmm0
mov esi, ecx
lea ecx, [esp + 0x18]
call fcn.005048c0
mov edx, dword [esp + 4]
mov ecx, esi
movdqu xmm0, xmmword [esp + 0x18]
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 0x5034ff
mov dword [esp + 0x14], esi
mov ecx, dword [ebp + 0x18]
mov dword [esp + 8], edi
mov esi, dword [ebx + 0xc]
bswap esi
cmp ecx, 0xc00
mov dword [esp + 0xc], esi
jb 0x5036c3
lea eax, [ebx + 0x60]
mov dword [esp + 0x2c], eax
lea edi, [ebx + 0x10]
mov dword [esp + 0x30], edi
pxor xmm2, xmm2
lea ebx, [esp + 0x18]
mov esi, dword [esp + 8]
nop word cs:[eax + eax]
mov dword [esp], ecx
mov dword [esp + 8], esi
mov eax, dword [ebp + 8]
movdqu xmm0, xmmword [eax + 0x40]
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 + 0x18], xmm0
mov edi, 0xfffff400
mov esi, dword [esp + 0x2c]
mov dword [esp + 4], edx
movdqu xmm0, xmmword [edx + edi + 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 + 0x18]
pxor xmm1, xmm0
movdqu xmmword [esp + 0x18], xmm1
mov ecx, ebx
mov edx, esi
call fcn.005048c0
mov edx, dword [esp + 4]
pxor xmm2, xmm2
add edi, 0x10
jne 0x503590
movdqu xmm0, xmmword [esp + 0x18]
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 esi, dword [ebp + 8]
movdqu xmmword [esi + 0x40], xmm0
xor edi, edi
mov ebx, dword [esp + 0xc]
nop
push dword [ebp + 0xc]
push dword [esp + 0x34]
mov esi, dword [ebp + 8]
push esi
call dword [esp + 0x20]
mov edx, dword [esp + 0x10]
add esp, 0xc
inc ebx
mov eax, ebx
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
xor eax, dword [edx + edi]
mov ecx, dword [esp + 8]
mov dword [ecx + edi], eax
mov eax, dword [esi + 0x14]
xor eax, dword [edx + edi + 4]
mov dword [ecx + edi + 4], eax
mov eax, dword [esi + 0x18]
xor eax, dword [edx + edi + 8]
mov dword [ecx + edi + 8], eax
mov eax, dword [esi + 0x1c]
xor eax, dword [edx + edi + 0xc]
mov dword [ecx + edi + 0xc], eax
add edi, 0x10
cmp edi, 0xc00
jne 0x503630
mov dword [esp + 0xc], ebx
mov ecx, dword [esp]
add ecx, 0xfffff400
mov eax, edx
add edx, edi
mov esi, dword [esp + 8]
add esi, edi
cmp ecx, 0xbff
pxor xmm2, xmm2
lea ebx, [esp + 0x18]
ja 0x503540
add eax, edi
mov edx, dword [esp + 8]
add edx, edi
mov esi, edx
mov edx, eax
mov ebx, dword [ebp + 8]
jmp 0x5036c7
mov esi, dword [esp + 8]
mov dword [esp + 8], esi
mov edi, ecx
and edi, 0xff0
je 0x503848
mov dword [esp], ecx
lea eax, [ebx + 0x60]
mov dword [esp + 4], eax
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 + 0x18], xmm0
xor ebx, ebx
nop word cs:[eax + eax]
movdqu xmm0, xmmword [edx + ebx]
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 + 0x18]
pxor xmm1, xmm0
movdqu xmmword [esp + 0x18], xmm1
lea ecx, [esp + 0x18]
mov esi, edx
mov edx, dword [esp + 4]
call fcn.005048c0
mov edx, esi
add ebx, 0x10
cmp edi, ebx
jne 0x503730
pxor xmm0, xmm0
movdqu xmm1, xmmword [esp + 0x18]
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 ebx, dword [ebp + 8]
movdqu xmmword [ebx + 0x40], xmm0
mov ecx, dword [esp]
cmp ecx, 0x10
jb 0x503848
lea eax, [ebx + 0x10]
mov dword [esp + 4], eax
mov esi, dword [esp + 8]
mov edi, dword [esp + 0xc]
mov eax, dword [ebp + 0xc]
nop dword [eax]
mov dword [esp], ecx
push eax
push dword [esp + 8]
push ebx
mov ebx, edx
call dword [esp + 0x20]
mov edx, ebx
mov ebx, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
add esp, 0xc
inc edi
mov eax, edi
bswap eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebx + 0x10]
xor eax, dword [edx]
mov dword [esi], eax
mov eax, dword [ebx + 0x14]
xor eax, dword [edx + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 0x18]
xor eax, dword [edx + 8]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0x1c]
xor eax, dword [edx + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 0xc]
add esi, 0x10
add edx, 0x10
add ecx, 0xfffffff0
cmp ecx, 0xf
ja 0x5037f0
jmp 0x503853
mov esi, dword [esp + 8]
mov edi, dword [esp + 0xc]
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], esi
test ecx, ecx
je 0x50388e
mov dword [esp + 4], edx
lea esi, [ebx + 0x10]
push eax
push esi
push ebx
mov dword [esp + 0xc], ecx
call dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
add esp, 0xc
inc edi
bswap edi
mov dword [ebx + 0xc], edi
xor eax, eax
cmp ecx, 8
jae 0x503895
mov esi, dword [esp + 8]
mov edx, dword [esp + 4]
jmp 0x5039a2
xor eax, eax
jmp 0x503a09
lea edx, [ecx + ebx]
add edx, 0x40
mov dword [esp + 0x2c], edx
mov edi, dword [esp + 8]
lea ebx, [edi + ecx]
mov dword [esp + 0x30], ebx
mov edx, dword [esp + 4]
add ecx, edx
cmp esi, ebx
setb byte [esp + 0x14]
mov ebx, dword [esp + 0x2c]
cmp edi, ebx
setb byte [esp + 0xc]
cmp esi, ecx
mov esi, edi
setb byte [esp + 0x13]
cmp edx, ebx
setb bl
cmp edi, ecx
setb bh
cmp edx, dword [esp + 0x30]
setb dl
movzx ecx, byte [esp + 0xc]
test byte [esp + 0x14], cl
jne 0x503949
and byte [esp + 0x13], bl
jne 0x503949
mov ecx, dword [esp]
and bh, dl
mov ebx, dword [ebp + 8]
mov edx, dword [esp + 4]
jne 0x5039a2
xor eax, eax
mov ecx, dword [esp]
cmp ecx, 0x10
jb 0x50395f
mov eax, ecx
and eax, 0xfffffff0
xor ecx, ecx
movdqu xmm0, xmmword [edx + ecx]
movdqu xmm1, xmmword [ebx + ecx + 0x10]
movdqu xmm2, xmmword [ebx + ecx + 0x40]
pxor xmm2, xmm0
movdqu xmmword [ebx + ecx + 0x40], xmm2
pxor xmm1, xmm0
movdqu xmmword [esi + ecx], xmm1
add ecx, 0x10
cmp eax, ecx
jne 0x503910
mov ecx, dword [esp]
cmp ecx, eax
jne 0x503955
mov eax, ecx
jmp 0x503a09
mov ecx, dword [esp]
mov ebx, dword [ebp + 8]
mov edx, dword [esp + 4]
jmp 0x5039a2
test cl, 8
jne 0x50395f
and ecx, 0xf
jmp 0x5039a2
mov edi, edx
mov edx, eax
mov eax, ecx
and eax, 0xfffffff8
and ecx, 7
nop dword [eax + eax]
movq xmm0, qword [edi + edx]
movq xmm1, qword [ebx + edx + 0x10]
movq xmm2, qword [ebx + edx + 0x40]
pxor xmm2, xmm0
movq qword [ebx + edx + 0x40], xmm2
pxor xmm1, xmm0
movq qword [esi + edx], xmm1
add edx, 8
cmp eax, edx
jne 0x503970
cmp dword [esp], eax
mov edx, edi
je 0x503a06
test cl, 1
jne 0x5039b0
mov edx, ecx
cmp ecx, 1
jne 0x5039ca
jmp 0x503a06
movzx edx, byte [edx + eax]
xor byte [ebx + eax + 0x40], dl
xor dl, byte [ebx + eax + 0x10]
mov byte [esi + eax], dl
lea edx, [ecx - 1]
or eax, 1
cmp ecx, 1
je 0x503a06
mov ecx, dword [esp + 4]
add ecx, eax
inc ecx
mov edi, esi
lea esi, [eax + ebx]
add esi, 0x41
add eax, edi
inc eax
xor edi, edi
nop
movzx ebx, byte [ecx + edi - 1]
xor byte [esi + edi - 1], bl
xor bl, byte [esi + edi - 0x31]
mov byte [eax + edi - 1], bl
movzx ebx, byte [ecx + edi]
xor byte [esi + edi], bl
xor bl, byte [esi + edi - 0x30]
mov byte [eax + edi], bl
add edi, 2
cmp edx, edi
jne 0x5039e0
mov eax, dword [esp]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x170], eax
mov eax, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret