Function at 0x407370
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x479bf0]
xor eax, ebp
mov dword [ebp - 4], eax
movups xmm0, xmmword [str.qpie7r4fl3nb54fy879w8s6d508273h4gfd87aytsdb]
mov ecx, dword [ebp + 0x14]
test ecx, ecx
mov eax, dword [0x456020]
mov edx, dword [ebp + 8]
movups xmmword [ebp - 0x38], xmm0
push ebx
movups xmm0, xmmword [0x456008]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x38]
push esi
mov esi, dword [ebp + 0xc]
cmovne eax, ecx
test byte [ebp + 0x18], 4
movups xmmword [ebp - 0x28], xmm0
push edi
movq xmm0, qword [0x456018]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x3c], esi
movq qword [ebp - 0x18], xmm0
mov dword [ebp - 0x40], eax
je 0x407459
test edx, edx
mov esi, 0x46183c
cmovne esi, edx
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4073e4
sub ecx, edx
je 0x407446
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4073f4
xor eax, eax
sub ecx, edx
add ecx, 1
setb al
neg eax
or eax, ecx
push eax
call fcn.00442d35
mov ecx, dword [ebp + 0x18]
mov edi, eax
and ecx, 1
mov dword [ebp - 0x48], edi
push ecx
push edi
push esi
call fcn.00407260
mov edx, eax
add esp, 0x10
mov dword [ebp - 0x3c], edx
test edx, edx
jne 0x40747a
test edi, edi
je 0x407446
lea eax, [ebp - 0x48]
push eax
call fcn.00407f10
push dword [ebp - 0x48]
call fcn.0043d146
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004380f8
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x407446
push esi
call fcn.00442d35
push dword [ebp - 0x3c]
mov edi, eax
push dword [ebp - 0x44]
mov dword [ebp - 0x48], edi
push edi
call fcn.004394d0
mov edx, dword [ebp - 0x3c]
add esp, 0x10
and dword [ebp + 0x18], 8
mov eax, 0x19
mov ecx, 1
cmovne eax, ecx
cmp edx, eax
jle 0x4076b3
mov esi, dword [ebp - 0x40]
mov ecx, esi
lea eax, [ecx + 1]
mov dword [ebp - 0x40], eax
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4074a0
sub ecx, dword [ebp - 0x40]
push 0
push 0x6801
push 1
push ecx
push esi
push edx
push edi
call fcn.00405c10
add esp, 0x1c
test eax, eax
je 0x4076b3
mov eax, dword [ebp - 0x3c]
lea ecx, [eax - 1]
test ecx, ecx
jle 0x4074e0
mov al, byte [ecx + edi - 1]
xor byte [ecx + edi], al
dec ecx
test ecx, ecx
jg 0x4074d1
mov eax, dword [ebp - 0x3c]
cmp dword [ebp + 0x18], 0
je 0x407528
lea ecx, [eax - 1]
mov dword [ebp - 0x3c], ecx
test ebx, ebx
je 0x4076ba
xor eax, eax
add ecx, 1
setb al
neg eax
or eax, ecx
push eax
push dword [ebx]
call fcn.0043bbd4
push dword [ebp - 0x3c]
lea ecx, [edi + 1]
mov dword [ebx], eax
push ecx
push eax
call fcn.004394d0
mov ecx, dword [ebx]
add esp, 0x14
mov eax, dword [ebp - 0x3c]
mov byte [eax + ecx], 0
jmp 0x4076ba
xorps xmm3, xmm3
lea eax, [edi + 5]
xorps xmm2, xmm2
mov ecx, 2
nop word [eax + eax]
movd xmm1, dword [eax - 4]
xorps xmm0, xmm0
punpcklbw xmm1, xmm0
lea eax, [eax + 8]
punpcklwd xmm1, xmm0
pxor xmm3, xmm1
movd xmm1, dword [eax - 8]
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
pxor xmm2, xmm1
sub ecx, 1
jne 0x407540
pxor xmm2, xmm3
lea esi, [edi + 0x11]
movaps xmm0, xmm2
mov eax, 0x66666667
psrldq xmm0, 8
pxor xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
pxor xmm2, xmm0
movd ecx, xmm2
push 0
push 0x6801
imul ecx
push 1
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
add eax, eax
sub ecx, eax
lea eax, [edi + 1]
add ecx, 6
push ecx
push eax
mov eax, dword [ebp - 0x3c]
add eax, 0xffffffef
push eax
push esi
call fcn.00405c10
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
lea ecx, [eax - 0x19]
push ecx
lea eax, [edi + 0x19]
mov dword [ebp - 0x40], ecx
push eax
push 0
call fcn.0040aef0
add esp, 0x28
cmp eax, dword [esi]
jne 0x4076b3
test ebx, ebx
mov dword [ebp - 0xc], 0x5d
lea eax, [ebp - 0x44]
mov byte [ebp - 8], 1
cmovne eax, ebx
mov dword [ebp - 0x44], 0
mov ebx, eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
xor eax, eax
mov ecx, dword [edi + 0x15]
mov dword [ebp - 0x3c], ecx
add ecx, 0x3e9
setb al
neg eax
or eax, ecx
push eax
push dword [ebx]
call fcn.0043bbd4
add esp, 8
mov dword [ebx], eax
lea ecx, [ebp - 0xc]
lea esi, [edi + 0x19]
push 5
push ecx
lea ecx, [ebp - 0x40]
push ecx
push esi
lea ecx, [ebp - 0x3c]
push ecx
push eax
call fcn.0041ee50
test eax, eax
jne 0x407659
mov ecx, dword [ebp - 0x3c]
cmp ecx, dword [edi + 0x15]
jne 0x407659
mov eax, dword [ebx]
mov byte [ecx + eax], 0
jmp 0x407674
mov eax, dword [ebp - 0x4c]
push eax
push esi
push dword [ebx]
mov dword [ebp - 0x3c], eax
call fcn.004394d0
mov ecx, dword [ebx]
add esp, 0xc
mov eax, dword [ebp - 0x3c]
mov byte [eax + ecx], 0
mov eax, dword [ebp - 0x3c]
xor ecx, ecx
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
push dword [ebx]
call fcn.0043bbd4
add esp, 8
mov dword [ebx], eax
cmp dword [ebp - 0x44], 0
je 0x4076ba
lea eax, [ebp - 0x44]
push eax
call fcn.00407f10
push dword [ebp - 0x44]
call fcn.0043d146
add esp, 8
mov dword [ebp - 0x44], 0
jmp 0x4076ba
mov dword [ebp - 0x3c], 0
test edi, edi
je 0x4076d2
lea eax, [ebp - 0x48]
push eax
call fcn.00407f10
push dword [ebp - 0x48]
call fcn.0043d146
add esp, 8
cmp dword [ebp - 0x3c], 0
jne 0x4076f7
test ebx, ebx
je 0x4076f7
cmp dword [ebx], 0
je 0x4076f7
push ebx
call fcn.00407f10
push dword [ebx]
call fcn.0043d146
add esp, 8
mov dword [ebx], 0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x3c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004380f8
mov esp, ebp
pop ebp
ret