Function at 0x407010
Capabilities:
Encode data using xor

Disassembly:
cmp dword [ecx + 0xc], 0
je 0x407188
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x50
movdqu xmm0, xmmword [ecx + 0x10]
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], edx
mov dword [esp + 0x30], ecx
pshufd xmm1, xmm0, 0x44
pshufd xmm0, xmm0, 0xee
mov ebx, eax
pxor xmm1, xmmword [0x457090]
pxor xmm0, xmmword [0x4570a0]
and ebx, 7
and eax, 0xfffffff8
je 0x40718b
mov ecx, eax
dec eax
mov dword [esp], ebx
and eax, 0xfffffff8
mov dword [esp + 4], eax
xor eax, eax
nop dword [eax]
mov edi, dword [edx + eax]
mov edx, dword [esp + 0xc]
pshufd xmm2, xmm0, 0xee
movdqa xmm4, xmm0
movd ebx, xmm2
pshufd xmm2, xmm0, 0xff
psrlq xmm4, 0x33
mov esi, dword [edx + eax + 4]
xor ebx, edi
mov edx, dword [esp + 0xc]
add eax, 8
movd xmm3, ebx
movd ebx, xmm2
xor ebx, esi
movd xmm2, ebx
punpcklqdq xmm2, xmm3
movdqa xmm3, xmm0
psllq xmm0, 0xd
shufps xmm3, xmm2, 0x24
movaps xmm2, xmm3
paddq xmm1, xmm3
psllq xmm3, 0x10
psrlq xmm2, 0x30
shufps xmm0, xmm3, 0xe4
shufps xmm4, xmm2, 0xe4
pshufd xmm2, xmm1, 0x1e
orps xmm0, xmm4
pxor xmm0, xmm1
paddq xmm2, xmm0
movdqa xmm4, xmm0
pshufd xmm3, xmm2, 0xee
pshufd xmm1, xmm2, 0xff
psrlq xmm4, 0x2b
movd ebx, xmm3
xor ebx, edi
movd edi, xmm1
movdqa xmm1, xmm0
psrlq xmm1, 0x2f
xor edi, esi
cmp eax, ecx
movsd xmm4, xmm1
movdqa xmm1, xmm0
psllq xmm0, 0x15
movd xmm3, edi
psllq xmm1, 0x11
movsd xmm0, xmm1
movdqa xmm1, xmm3
orpd xmm0, xmm4
movd xmm4, ebx
punpcklqdq xmm1, xmm4
xorpd xmm0, xmm2
shufps xmm1, xmm2, 0x12
jb 0x407070
pshufd xmm1, xmm2, 0x55
movd eax, xmm2
mov esi, dword [esp + 4]
movd ecx, xmm1
movd xmm1, eax
movd xmm2, ecx
punpckldq xmm2, xmm1
movd xmm1, ebx
mov ebx, dword [esp]
punpckldq xmm1, xmm3
add esi, 8
punpcklqdq xmm1, xmm2
cmp ebx, 4
mov ecx, 0
jb 0x407197
mov edi, dword [edx + esi]
mov ecx, 4
jmp 0x407199
xor eax, eax
ret
xor esi, esi
cmp ebx, 4
mov ecx, 0
jae 0x40717e
xor edi, edi
mov dword [esp], 0
mov eax, ecx
mov dword [esp + 4], esi
or eax, 1
cmp eax, ebx
jae 0x407201
lea eax, [edx + ecx]
mov edx, ecx
lea ecx, [ecx*8]
movzx eax, word [esi + eax]
mov esi, edi
xor edi, edi
shld edi, eax, cl
shl eax, cl
test cl, 0x20
mov ecx, edx
mov edx, 0
cmovne edi, eax
cmovne eax, edx
mov edx, dword [esp]
or ecx, 2
or edx, edi
mov edi, esi
or edi, eax
cmp ecx, ebx
mov dword [esp + 8], edi
jb 0x40720c
mov eax, dword [ebp + 8]
test ebx, ebx
lea edi, [eax + 1]
je 0x407334
mov esi, dword [esp + 8]
mov dword [esp], edx
jmp 0x407242
mov edx, dword [esp]
cmp ecx, ebx
mov dword [esp + 8], edi
jae 0x4071ea
mov esi, edx
mov edx, dword [esp + 4]
mov eax, dword [esp + 0xc]
xor edi, edi
add edx, ecx
shl ecx, 3
movzx eax, byte [eax + edx]
xor edx, edx
shld edi, eax, cl
shl eax, cl
test cl, 0x20
mov ecx, dword [ebp + 8]
cmovne edi, eax
cmovne eax, edx
or esi, edi
mov dword [esp], esi
mov esi, dword [esp + 8]
lea edi, [ecx + 1]
or esi, eax
lea ecx, [ebx*8]
mov eax, 0xff
xor edx, edx
shld edx, eax, cl
shl eax, cl
test cl, 0x20
mov ecx, 0
cmovne edx, eax
cmovne eax, ecx
or edx, dword [esp]
or eax, esi
cmp ebx, 7
jne 0x407330
pshufd xmm2, xmm0, 0xee
mov ebx, eax
movdqa xmm4, xmm0
movd eax, xmm2
pshufd xmm2, xmm0, 0xff
psrlq xmm4, 0x33
movd ecx, xmm2
xor eax, ebx
xor ecx, edx
movd xmm2, eax
movd xmm3, ecx
punpcklqdq xmm3, xmm2
movdqa xmm2, xmm0
psllq xmm0, 0xd
shufps xmm2, xmm3, 0x24
movaps xmm3, xmm2
paddq xmm1, xmm2
psllq xmm2, 0x10
psrlq xmm3, 0x30
shufps xmm0, xmm2, 0xe4
pshufd xmm2, xmm1, 0x1e
shufps xmm4, xmm3, 0xe4
orps xmm0, xmm4
pxor xmm0, xmm1
movdqa xmm1, xmm0
movdqa xmm3, xmm0
paddq xmm2, xmm0
psrlq xmm1, 0x2f
psrlq xmm3, 0x2b
movsd xmm3, xmm1
movdqa xmm1, xmm0
psllq xmm0, 0x15
psllq xmm1, 0x11
movsd xmm0, xmm1
pshufd xmm1, xmm2, 0xff
movd eax, xmm1
pshufd xmm1, xmm2, 0xee
orpd xmm0, xmm3
movd ecx, xmm1
xor eax, edx
xorpd xmm0, xmm2
xor ecx, ebx
movd xmm1, eax
xor eax, eax
movd xmm3, ecx
xor ecx, ecx
punpcklqdq xmm1, xmm3
shufps xmm1, xmm2, 0x12
jmp 0x40733b
mov ecx, edx
jmp 0x40733b
xor ecx, ecx
mov eax, 0xff
shl edi, 0x18
pshufd xmm4, xmm0, 0xee
pshufd xmm3, xmm1, 0xee
mov dword [esp + 0x28], eax
pshufd xmm2, xmm1, 0xff
movd edx, xmm4
or edi, ecx
pshufd xmm4, xmm0, 0xff
movd ebx, xmm2
xor edx, eax
mov ecx, edi
mov dword [esp + 0x2c], edi
movd edi, xmm4
movd eax, xmm3
pshufd xmm4, xmm0, 0x55
xor edi, ecx
add eax, edx
movd ecx, xmm0
paddq xmm0, xmm1
movd esi, xmm4
mov dword [esp], eax
mov eax, ecx
adc ebx, edi
pshufd xmm1, xmm0, 0x55
shld eax, esi, 0xd
shld esi, ecx, 0xd
mov ecx, edx
shrd edx, edi, 0x10
shld ecx, edi, 0x10
movd edi, xmm1
xor edx, ebx
mov dword [esp + 0x10], edi
xor esi, edi
movd edi, xmm0
mov dword [esp + 4], edi
xor eax, edi
mov edi, ebx
mov ebx, dword [esp]
xor ecx, ebx
add ebx, eax
mov dword [esp], ebx
mov ebx, dword [esp + 0x10]
adc edi, esi
mov dword [esp + 8], edi
mov edi, eax
add ebx, ecx
adc dword [esp + 4], edx
shld edi, esi, 0x11
shrd eax, esi, 0xf
mov esi, ecx
shrd ecx, edx, 0xb
shld esi, edx, 0x15
mov edx, dword [esp + 4]
xor edi, dword [esp]
xor esi, ebx
xor ebx, dword [esp + 0x28]
xor ecx, edx
xor edx, dword [esp + 0x2c]
mov dword [esp + 4], edx
mov edx, dword [esp + 8]
xor eax, edx
xor edx, 0xff
add ebx, edi
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 4]
adc ebx, eax
add edx, esi
mov dword [esp + 8], edx
mov edx, edi
adc dword [esp], ecx
shrd edi, eax, 0x13
mov dword [esp + 4], ebx
shld edx, eax, 0xd
mov eax, esi
xor edi, ebx
shrd esi, ecx, 0x10
mov ebx, dword [esp + 8]
shld eax, ecx, 0x10
mov ecx, dword [esp]
xor edx, dword [esp + 0x10]
xor eax, ebx
xor esi, ecx
add ebx, edx
adc ecx, edi
mov dword [esp + 8], ebx
add dword [esp + 4], eax
mov ebx, dword [esp + 0x10]
mov dword [esp], ecx
mov ecx, edx
adc ebx, esi
shld ecx, edi, 0x11
shrd edx, edi, 0xf
mov edi, eax
shrd eax, esi, 0xb
shld edi, esi, 0x15
mov esi, dword [esp + 4]
xor ecx, dword [esp + 8]
xor edx, dword [esp]
xor eax, ebx
xor edi, esi
add esi, ecx
adc ebx, edx
add dword [esp], edi
mov dword [esp + 4], esi
mov esi, edi
mov dword [esp + 0x10], ebx
mov ebx, ecx
adc dword [esp + 8], eax
shld ebx, edx, 0xd
shrd edi, eax, 0x10
shrd ecx, edx, 0x13
shld esi, eax, 0x10
mov edx, dword [esp + 0x10]
mov eax, dword [esp]
xor ebx, dword [esp + 4]
xor edi, dword [esp + 8]
xor ecx, edx
xor esi, eax
add eax, ebx
adc dword [esp + 8], ecx
add edx, esi
mov dword [esp], eax
mov eax, esi
mov dword [esp + 0x10], edx
mov edx, ebx
adc dword [esp + 4], edi
shrd ebx, ecx, 0xf
shld eax, edi, 0x15
shrd esi, edi, 0xb
shld edx, ecx, 0x11
mov edi, dword [esp + 4]
mov ecx, dword [esp + 0x10]
xor ebx, dword [esp + 8]
xor edx, dword [esp]
xor esi, edi
xor eax, ecx
add ecx, edx
adc edi, ebx
mov dword [esp + 0x10], ecx
mov ecx, edx
mov dword [esp + 4], edi
mov edi, dword [esp + 8]
add edi, eax
adc dword [esp], esi
shld ecx, ebx, 0xd
shrd edx, ebx, 0x13
shrd eax, esi, 0x10
shr esi, 0x10
mov ebx, dword [esp]
xor ecx, dword [esp + 0x10]
xor edx, dword [esp + 4]
xor esi, edi
xor eax, ebx
add edi, ecx
adc ebx, edx
shrd edx, ecx, 0xf
mov ecx, dword [esp + 0x30]
shrd eax, esi, 0xb
xor edx, ebx
xor eax, edx
xor eax, edi
mov edi, dword [ecx + 4]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
mov esi, edi
mov dword [esp + 4], edi
and esi, eax
shr eax, 0x19
movd xmm0, eax
xor eax, eax
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
movdqa xmmword [esp + 0x30], xmm0
movdqu xmm0, xmmword [edx + esi]
mov dword [esp + 8], eax
movdqa xmmword [esp + 0x10], xmm0
pcmpeqb xmm0, xmmword [esp + 0x30]
pmovmskb ebx, xmm0
test ebx, ebx
je 0x4075e0
mov dword [esp], esi
jmp 0x40759d
mov esi, dword [esp]
lea eax, [ebx - 1]
and ax, bx
mov ebx, eax
je 0x4075e0
tzcnt eax, ebx
add eax, esi
mov esi, edx
and eax, edi
shl eax, 5
sub esi, eax
cmp dword [esi - 0x18], ecx
jne 0x407590
push ecx
push dword [esi - 0x1c]
push dword [esp + 0x14]
mov edi, edx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
mov edx, edi
mov edi, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add esp, 0xc
test eax, eax
jne 0x407590
jmp 0x40760a
movdqa xmm1, xmmword [esp + 0x10]
pcmpeqd xmm0, xmm0
pcmpeqb xmm1, xmm0
pmovmskb eax, xmm1
test eax, eax
mov eax, dword [esp + 8]
jne 0x407608
lea esi, [eax + esi + 0x10]
add eax, 0x10
and esi, edi
jmp 0x40756e
xor esi, esi
lea eax, [esi - 0x20]
test esi, esi
cmove eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret