Function at 0x402a50
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa0
mov ebx, dword [ecx + 8]
mov eax, dword [ecx + 0x10]
mov edi, dword [esp + 0xb4]
mov esi, ebx
or esi, eax
je 0x402bf5
test eax, eax
mov dword [esp + 4], ecx
je 0x402bb3
mov eax, edi
mov edi, dword [ecx + 0x14]
xor ebp, ebp
mov dword [esp + 0xc], ebx
mov dword [esp], edx
lea esi, [edx + eax]
mov dword [esp + 0x20], esi
inc edi
jmp 0x402ab5
lea eax, [edx + 1]
sub ebp, edx
mov edx, eax
add ebp, eax
cmp ebx, 0x110000
je 0x402b79
dec edi
je 0x402b31
cmp edx, esi
je 0x402b79
movzx ebx, byte [edx]
test bl, bl
jns 0x402aa0
movzx esi, byte [edx + 1]
mov ecx, ebx
and ecx, 0x1f
and esi, 0x3f
cmp bl, 0xdf
jbe 0x402b0e
movzx eax, byte [edx + 2]
shl esi, 6
and eax, 0x3f
or eax, esi
cmp bl, 0xf0
jb 0x402b1a
movzx ebx, byte [edx + 3]
and ecx, 7
shl eax, 6
shl ecx, 0x12
and ebx, 0x3f
or ebx, eax
or ebx, ecx
cmp ebx, 0x110000
je 0x4031e2
lea eax, [edx + 4]
jmp 0x402b24
shl ecx, 6
lea eax, [edx + 2]
or ecx, esi
mov ebx, ecx
jmp 0x402b24
mov ebx, eax
shl ecx, 0xc
lea eax, [edx + 3]
or ebx, ecx
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0x20]
jmp 0x402aa3
cmp edx, esi
je 0x402b79
movzx ebx, byte [edx]
test bl, bl
jns 0x402b85
cmp bl, 0xe0
jb 0x402b85
cmp bl, 0xf0
jb 0x402b85
movzx esi, byte [edx + 1]
movzx eax, byte [edx + 2]
movzx edx, byte [edx + 3]
and ebx, 7
mov ecx, dword [esp + 4]
shl ebx, 0x12
and esi, 0x3f
and eax, 0x3f
and edx, 0x3f
shl esi, 0xc
shl eax, 6
or eax, esi
or edx, eax
or edx, ebx
cmp edx, 0x110000
jne 0x402b85
mov edx, dword [esp]
mov edi, dword [esp + 0xb4]
jmp 0x402baf
mov edx, dword [esp]
mov edi, dword [esp + 0xb4]
test ebp, ebp
je 0x402ba5
xor eax, eax
cmp ebp, edi
jae 0x402ba1
cmp byte [edx + ebp], 0xc0
jge 0x402ba5
jmp 0x402ba7
cmp ebp, edi
jne 0x402ba7
mov eax, edx
test eax, eax
cmovne edi, ebp
cmovne edx, eax
mov ebx, dword [esp + 0xc]
test ebx, ebx
je 0x402bf5
mov eax, dword [ecx + 0xc]
cmp edi, 0x10
mov dword [esp], edx
mov dword [esp + 0x34], eax
jae 0x402c0a
xor eax, eax
test edi, edi
je 0x403116
mov ecx, edi
nop word cs:[eax + eax]
nop dword [eax]
xor ebx, ebx
cmp byte [edx], 0xc0
lea edx, [edx + 1]
setge bl
add eax, ebx
dec ecx
jne 0x402be0
jmp 0x403116
mov eax, dword [ecx + 4]
push edi
push edx
push dword [ecx]
call dword [eax + 0xc]
add esp, 0xac
pop esi
pop edi
pop ebx
pop ebp
ret
lea ebp, [edx + 3]
mov ecx, edi
and ebp, 0xfffffffc
mov ebx, ebp
sub ebx, edx
sub ecx, ebx
jae 0x402cc5
mov eax, dword [esp]
movdqa xmm2, xmmword [0x407190]
movdqa xmm3, xmmword [0x4071a0]
mov edx, edi
pxor xmm0, xmm0
pxor xmm1, xmm1
and edx, 0xfffffff8
mov esi, edx
lea ecx, [eax + edx]
add eax, 4
nop word cs:[eax + eax]
movd xmm5, dword [eax - 4]
movd xmm4, dword [eax]
add eax, 8
add esi, 0xfffffff8
pcmpgtb xmm5, xmm2
pcmpgtb xmm4, xmm2
punpcklbw xmm5, xmm5
punpcklwd xmm5, xmm5
pand xmm5, xmm3
paddd xmm0, xmm5
punpcklbw xmm4, xmm4
punpcklwd xmm4, xmm4
pand xmm4, xmm3
paddd xmm1, xmm4
jne 0x402c50
paddd xmm1, xmm0
mov esi, edi
pshufd xmm0, xmm1, 0xee
sub esi, edx
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd eax, xmm1
je 0x403116
nop dword [eax]
xor edx, edx
cmp byte [ecx], 0xc0
lea ecx, [ecx + 1]
setge dl
add eax, edx
dec esi
jne 0x402cb0
jmp 0x403116
cmp ebx, 4
ja 0x402c1e
mov esi, ecx
shr esi, 2
je 0x402c1e
mov dword [esp + 8], edi
mov edi, ecx
mov dword [esp + 0x40], ebp
mov dword [esp + 0xc], ecx
xor ecx, ecx
mov ebp, 0
mov dword [esp + 0x20], ebx
and edi, 3
test ebx, ebx
je 0x402d20
mov ebx, dword [esp]
xor ebp, ebp
mov edx, ebx
sub edx, dword [esp + 0x40]
nop word cs:[eax + eax]
nop
xor eax, eax
cmp byte [ebx], 0xc0
lea ebx, [ebx + 1]
setge al
add ebp, eax
inc edx
jne 0x402d10
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0xc]
add eax, dword [esp]
test edi, edi
mov dword [esp + 0x20], eax
je 0x402d50
and edx, 0xfffffffc
xor ecx, ecx
add edx, dword [esp + 0x20]
nop dword [eax]
xor eax, eax
cmp byte [edx], 0xc0
lea edx, [edx + 1]
setge al
add ecx, eax
dec edi
jne 0x402d40
add ecx, ebp
movdqa xmm3, xmmword [0x4071b0]
mov ebp, dword [esp + 0x20]
pcmpeqd xmm2, xmm2
jmp 0x402da9
xor edi, edi
mov ecx, edi
shr edi, 8
mov edx, dword [esp + 0x3c]
mov esi, ebx
and ecx, 0xff00ff
and edi, 0xff00ff
add edi, ecx
mov ecx, edi
shl ecx, 0x10
sub esi, edx
add ecx, edi
shr ecx, 0x10
add ecx, eax
mov eax, dword [esp + 0x1c]
test dl, 3
lea ebp, [eax + edx*4]
jne 0x4030b3
mov eax, ecx
test esi, esi
je 0x403112
cmp esi, 0xc0
mov edx, 0xc0
mov ebx, esi
mov dword [esp + 0x1c], ebp
cmovb edx, esi
mov ecx, edx
mov dword [esp + 0x3c], edx
and ecx, 0xfc
mov dword [esp + 0x38], ecx
je 0x402d70
shr edx, 2
xor edi, edi
lea esi, [edx - 1]
and esi, 0xfffffff
cmp esi, 7
jb 0x403069
inc esi
mov ecx, dword [esp + 0x1c]
pxor xmm3, xmm3
pxor xmm2, xmm2
mov dword [esp + 0x30], esi
and esi, 0xfffffff8
mov ebp, esi
shl ebp, 4
add ebp, ecx
lea edi, [ecx + 0x40]
xor ecx, ecx
movdqu xmm5, xmmword [edi - 0x20]
movdqu xmmword [esp + 0x80], xmm2
movdqu xmm1, xmmword [edi - 0x40]
movdqu xmm2, xmmword [edi - 0x10]
movdqu xmmword [esp + 0x90], xmm3
movdqu xmm3, xmmword [edi - 0x30]
movdqu xmm7, xmmword [edi + 0x10]
movdqu xmm4, xmmword [edi + 0x30]
add ecx, 8
movdqa xmm0, xmm5
movdqu xmmword [esp + 0x40], xmm2
movdqu xmmword [esp + 0x60], xmm3
movdqu xmmword [esp + 0x20], xmm1
movdqu xmmword [esp + 0x50], xmm7
punpckldq xmm0, xmm2
movdqa xmm2, xmm1
movdqu xmm1, xmmword [edi + 0x20]
punpckldq xmm2, xmm3
movdqu xmm3, xmmword [edi]
sub edi, 0xffffff80
cmp esi, ecx
movdqa xmm6, xmm2
punpckhqdq xmm2, xmm0
movdqu xmmword [esp + 0x70], xmm2
punpcklqdq xmm6, xmm0
movdqa xmm0, xmm1
punpckhdq xmm1, xmm4
movdqa xmm2, xmm3
punpckldq xmm0, xmm4
movdqu xmm4, xmmword [esp + 0x50]
punpckldq xmm2, xmm7
movdqa xmm7, xmm2
punpckhqdq xmm2, xmm0
punpcklqdq xmm7, xmm0
movdqu xmm0, xmmword [esp + 0x40]
movdqu xmmword [esp + 0xc], xmm7
movdqu xmm7, xmmword [esp + 0x60]
punpckhdq xmm3, xmm4
punpckhdq xmm5, xmm0
movdqu xmm0, xmmword [esp + 0x20]
punpckhdq xmm0, xmm7
movdqu xmm7, xmmword [esp + 0x70]
movdqa xmm4, xmm0
punpckhqdq xmm0, xmm5
punpcklqdq xmm4, xmm5
movdqa xmm5, xmm3
punpckhqdq xmm3, xmm1
movdqu xmmword [esp + 0x20], xmm0
movdqa xmm0, xmm6
psrld xmm6, 6
movdqu xmmword [esp + 0x40], xmm3
movdqu xmm3, xmmword [esp + 0xc]
punpcklqdq xmm5, xmm1
pcmpeqd xmm1, xmm1
pxor xmm0, xmm1
psrld xmm0, 7
por xmm6, xmm0
movdqa xmm0, xmm3
psrld xmm3, 6
pxor xmm0, xmm1
movdqa xmm1, xmmword [0x4071b0]
psrld xmm0, 7
por xmm3, xmm0
movdqu xmm0, xmmword [esp + 0x90]
pand xmm6, xmm1
pand xmm3, xmm1
paddd xmm6, xmm0
movdqu xmm0, xmmword [esp + 0x80]
paddd xmm3, xmm0
movdqa xmm0, xmm7
psrld xmm7, 6
movdqu xmmword [esp + 0xc], xmm3
pcmpeqd xmm3, xmm3
pxor xmm0, xmm3
psrld xmm0, 7
por xmm7, xmm0
movdqa xmm0, xmm2
psrld xmm2, 6
pxor xmm0, xmm3
pand xmm7, xmm1
psrld xmm0, 7
por xmm2, xmm0
movdqa xmm0, xmm4
psrld xmm4, 6
pxor xmm0, xmm3
pand xmm2, xmm1
psrld xmm0, 7
por xmm4, xmm0
movdqa xmm0, xmm5
psrld xmm5, 6
pxor xmm0, xmm3
movdqu xmm3, xmmword [esp + 0xc]
pand xmm4, xmm1
psrld xmm0, 7
paddd xmm4, xmm7
por xmm5, xmm0
paddd xmm4, xmm6
pcmpeqd xmm6, xmm6
pand xmm5, xmm1
paddd xmm5, xmm2
paddd xmm5, xmm3
movdqu xmm3, xmmword [esp + 0x20]
movdqa xmm2, xmm3
psrld xmm3, 6
pxor xmm2, xmm6
psrld xmm2, 7
por xmm3, xmm2
movdqu xmm2, xmmword [esp + 0x40]
pand xmm3, xmm1
paddd xmm3, xmm4
movdqa xmm7, xmm2
psrld xmm2, 6
pxor xmm7, xmm6
psrld xmm7, 7
por xmm2, xmm7
pand xmm2, xmm1
paddd xmm2, xmm5
jne 0x402e10
paddd xmm2, xmm3
cmp dword [esp + 0x30], esi
movdqa xmm3, xmmword [0x4071b0]
pshufd xmm0, xmm2, 0xee
paddd xmm0, xmm2
pcmpeqd xmm2, xmm2
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd edi, xmm1
je 0x402d72
shl edx, 4
add edx, dword [esp + 0x1c]
movdqu xmm0, xmmword [ebp]
add ebp, 0x10
movdqa xmm1, xmm0
psrld xmm0, 6
pxor xmm1, xmm2
psrld xmm1, 7
por xmm0, xmm1
pand xmm0, xmm3
pshufd xmm1, xmm0, 0xee
paddd xmm1, xmm0
pshufd xmm0, xmm1, 0x55
paddd xmm0, xmm1
movd ecx, xmm0
add edi, ecx
cmp ebp, edx
jne 0x403070
jmp 0x402d72
mov edx, dword [esp + 0x38]
cmp ebx, 0xc0
mov esi, 0xc0
cmovb esi, ebx
and esi, 3
shl esi, 2
lea eax, [eax + edx*4]
xor edx, edx
mov edi, dword [eax]
add eax, 4
mov ebx, edi
shr edi, 6
not ebx
shr ebx, 7
or edi, ebx
and edi, 0x1010101
add edx, edi
add esi, 0xfffffffc
jne 0x4030d0
mov eax, edx
shr edx, 8
mov edi, dword [esp + 8]
and eax, 0xff00ff
and edx, 0xff00ff
add edx, eax
mov eax, edx
shl eax, 0x10
add eax, edx
shr eax, 0x10
add eax, ecx
jmp 0x403116
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0x34]
sub ebx, eax
jbe 0x403146
mov edx, dword [esp + 4]
xor ecx, ecx
mov dword [esp + 8], edi
mov eax, dword [edx + 0x20]
cmp al, 3
cmovne ecx, eax
movzx eax, cl
test cl, cl
je 0x40315e
cmp eax, 1
jne 0x403157
mov dword [esp + 0xc], 0
jmp 0x403164
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 4]
push edi
push dword [esp + 4]
jmp 0x402bfa
mov eax, ebx
inc ebx
shr eax, 1
shr ebx, 1
mov dword [esp + 0xc], ebx
mov ebx, eax
mov edi, dword [edx]
mov ebp, dword [edx + 4]
mov esi, dword [edx + 0x1c]
inc ebx
nop dword [eax]
dec ebx
je 0x403183
push esi
push edi
call dword [ebp + 0x10]
add esp, 8
test al, al
je 0x403170
mov bl, 1
jmp 0x4031d5
mov bl, 1
cmp esi, 0x110000
je 0x4031d5
push dword [esp + 8]
push dword [esp + 4]
push edi
call dword [ebp + 0xc]
add esp, 0xc
test al, al
jne 0x4031d5
mov eax, dword [esp + 0xc]
mov ebx, 0xffffffff
neg eax
mov dword [esp + 0x20], eax
nop
mov eax, dword [esp + 0x20]
add eax, ebx
cmp eax, 0xffffffff
je 0x4031ca
push esi
push edi
call dword [ebp + 0x10]
add esp, 8
inc ebx
test al, al
je 0x4031b0
jmp 0x4031ce
mov ebx, dword [esp + 0xc]
cmp ebx, dword [esp + 0xc]
setb bl
mov eax, ebx
add esp, 0xa0
jmp 0x402c05
mov edx, dword [esp]
mov edi, dword [esp + 0xb4]
mov ecx, dword [esp + 4]
jmp 0x402baf