Function at 0x503a20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x38
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 0x50404c
mov dword [ebx + 0x38], edx
mov dword [ebx + 0x3c], ecx
cmp dword [ebx + 0x174], 0
je 0x503af6
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 edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
mov eax, dword [ebx + 0x170]
test eax, eax
je 0x503bdb
test esi, esi
je 0x504041
nop word cs:[eax + eax]
movzx ecx, byte [ebx + eax + 0x10]
xor cl, byte [edi]
inc edi
mov byte [edx], cl
xor byte [ebx + eax + 0x40], cl
inc edx
lea ecx, [esi - 1]
inc eax
and eax, 0xf
je 0x503b3f
cmp esi, 1
mov esi, ecx
jne 0x503b20
test eax, eax
jne 0x504041
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 + 0x18], xmm0
mov esi, ecx
lea ecx, [esp + 0x18]
call fcn.005048c0
mov ecx, esi
mov edx, dword [esp + 8]
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 0x503bdd
mov ecx, esi
mov eax, dword [ebx + 0xc]
bswap eax
cmp ecx, 0xc00
mov dword [esp + 0xc], eax
jb 0x503d34
lea eax, [ebx + 0x60]
mov dword [esp + 8], eax
mov esi, dword [esp + 8]
nop dword [eax]
mov dword [esp + 4], ecx
push ebx
push dword [ebp + 0xc]
push 0xc0
push edx
mov dword [esp + 0x24], edi
push edi
mov edi, edx
call dword [ebp + 0x1c]
add esp, 0x14
mov eax, dword [esp + 0xc]
add eax, 0xc0
mov dword [esp + 0xc], eax
bswap eax
mov dword [ebx + 0xc], 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 + 0x18], xmm0
mov ebx, 0xfffff400
nop
movdqu xmm0, xmmword [edi + ebx + 0xc00]
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 edx, esi
call fcn.005048c0
add ebx, 0x10
jne 0x503c70
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
mov ebx, dword [ebp + 8]
movdqu xmmword [ebx + 0x40], xmm0
add edi, 0xc00
mov eax, dword [esp + 0x14]
add eax, 0xc00
mov ecx, dword [esp + 4]
add ecx, 0xfffff400
cmp ecx, 0xbff
mov edx, edi
mov edi, eax
ja 0x503c00
mov eax, ecx
and eax, 0xff0
mov dword [esp + 0x10], eax
je 0x503e6f
mov dword [esp + 4], ecx
mov esi, ecx
shr esi, 4
push ebx
push dword [ebp + 0xc]
push esi
push edx
push edi
mov dword [esp + 0x1c], edx
call dword [ebp + 0x1c]
add esp, 0x14
mov eax, dword [esp + 0xc]
add eax, esi
mov dword [esp + 0xc], eax
bswap eax
mov dword [ebx + 0xc], eax
add edi, dword [esp + 0x10]
mov dword [esp + 0x14], edi
lea esi, [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
xor edi, edi
nop dword [eax + eax]
mov eax, dword [esp + 8]
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 + 0x18]
pxor xmm1, xmm0
movdqu xmmword [esp + 0x18], xmm1
lea ecx, [esp + 0x18]
mov edx, esi
call fcn.005048c0
add edi, 0x10
cmp dword [esp + 0x10], edi
jne 0x503dc0
mov ecx, dword [esp + 4]
and ecx, 0xf
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
movdqu xmmword [ebx + 0x40], xmm0
mov edx, dword [esp + 8]
add edx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
test ecx, ecx
je 0x503f6a
mov dword [esp + 8], edx
lea esi, [ebx + 0x10]
push dword [ebp + 0xc]
push esi
push ebx
mov dword [esp + 0x10], ecx
call dword [ebx + 0x168]
mov ecx, dword [esp + 0x10]
add esp, 0xc
mov eax, dword [esp + 0xc]
inc eax
bswap eax
mov dword [ebx + 0xc], eax
xor eax, eax
cmp ecx, 8
jb 0x503fd1
mov edx, dword [esp + 8]
mov dword [esp + 0x2c], esi
lea esi, [edx + ecx]
mov dword [esp + 0x30], esi
add ebx, ecx
add ebx, 0x40
mov dword [esp + 0x14], ebx
add ecx, edi
cmp edx, ebx
setb byte [esp + 0xc]
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
cmp esi, ebx
setb byte [esp + 0x10]
cmp edx, ecx
setb dh
cmp edi, ebx
setb bh
cmp esi, ecx
setb dl
cmp edi, dword [esp + 0x14]
setb bl
movzx ecx, byte [esp + 0x10]
test byte [esp + 0xc], cl
jne 0x503f71
and dh, bh
jne 0x503f71
mov ecx, dword [esp + 4]
and dl, bl
mov ebx, dword [ebp + 8]
jne 0x503fd1
xor eax, eax
mov ecx, dword [esp + 4]
cmp ecx, 0x10
jb 0x503f84
mov eax, ecx
and eax, 0xfffffff0
xor ecx, ecx
mov edx, dword [esp + 8]
nop word cs:[eax + eax]
movdqu xmm0, xmmword [edi + ecx]
movdqu xmm1, xmmword [ebx + ecx + 0x10]
pxor xmm1, xmm0
movdqu xmmword [edx + ecx], xmm1
movdqu xmm0, xmmword [ebx + ecx + 0x40]
pxor xmm0, xmm1
movdqu xmmword [ebx + ecx + 0x40], xmm0
add ecx, 0x10
cmp eax, ecx
jne 0x503f30
mov ecx, dword [esp + 4]
cmp ecx, eax
jne 0x503f7a
mov eax, ecx
jmp 0x504041
xor eax, eax
jmp 0x504041
mov ecx, dword [esp + 4]
mov ebx, dword [ebp + 8]
jmp 0x503fd1
test cl, 8
jne 0x503f84
and ecx, 0xf
jmp 0x503fd1
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 [edi + edx]
movq xmm1, qword [ebx + edx + 0x10]
pxor xmm1, xmm0
movq qword [esi + edx], xmm1
movq xmm0, qword [ebx + edx + 0x40]
pxor xmm0, xmm1
movq qword [ebx + edx + 0x40], xmm0
add edx, 8
cmp eax, edx
jne 0x503fa0
cmp dword [esp + 4], eax
je 0x50403d
test cl, 1
jne 0x50401f
mov edx, ecx
cmp ecx, 1
je 0x50403d
lea ecx, [edi + eax]
inc ecx
lea esi, [eax + ebx]
add esi, 0x41
mov edi, dword [esp + 8]
add eax, edi
inc eax
xor edi, edi
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 0x503ff0
mov eax, dword [esp + 4]
mov ebx, dword [ebp + 8]
jmp 0x504041
movzx edx, byte [ebx + eax + 0x10]
xor dl, byte [edi + eax]
mov esi, dword [esp + 8]
mov byte [esi + eax], dl
xor byte [ebx + eax + 0x40], dl
lea edx, [ecx - 1]
or eax, 1
cmp ecx, 1
jne 0x503fdd
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