Function at 0x401040
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x41a9f0]
movq xmm0, qword [str.Sample_Data__W]
mov dword [ebp - 0xc8], eax
mov ax, word [0x41a9f4]
mov word [ebp - 0xc4], ax
mov al, byte [0x41a9f6]
push esi
mov byte [ebp - 0xc2], al
lea esi, [ebp - 0xd0]
xor eax, eax
mov dword [ebp - 0xb8], 0x4030201
push edi
mov dword [ebp - 0xb4], 0x8070605
lea ecx, [esi + 1]
movq qword [ebp - 0xd0], xmm0
mov word [ebp - 0xc1], ax
mov al, byte [esi]
inc esi
test al, al
jne 0x4010c1
sub esi, ecx
push esi
mov dword [ebp - 0xa4], esi
call fcn.00406360
mov edi, eax
lea eax, [ebp - 0xd0]
push esi
push eax
push edi
call fcn.00402ea0
mov eax, dword [ebp - 0xa4]
neg esi
and esi, 0xf
add eax, esi
push eax
push edi
mov dword [ebp - 0xb0], eax
call fcn.004044b0
mov ecx, dword [ebp - 0xa4]
mov edi, eax
push esi
add ecx, edi
mov dword [ebp - 0xac], edi
push 0x90
push ecx
call fcn.00402420
add esp, 0x24
mov dword [ebp - 0xa8], 0
lea esi, [ebp - 0x88]
nop
xor edx, edx
mov ecx, edx
mov al, dl
add al, byte [ebp - 0xa8]
and ecx, 7
inc edx
xor al, byte [ebp + ecx - 0xb8]
mov byte [esi], al
inc esi
cmp edx, 0x10
jl 0x401132
mov eax, dword [ebp - 0xa8]
inc eax
mov dword [ebp - 0xa8], eax
cmp eax, 8
jl 0x401130
mov ecx, dword [ebp - 0xb0]
test ecx, ecx
je 0x40123b
lea eax, [ecx - 1]
mov dword [ebp - 0xa4], edi
shr eax, 4
inc eax
mov dword [ebp - 0xa8], eax
movups xmm0, xmmword [edi]
lea edx, [ebp - 0x88]
mov esi, 8
movaps xmmword [ebp - 0xa0], xmm0
lea edx, [edx + 0x10]
sub esi, 1
jne 0x401197
mov edi, dword [ebp - 0xa4]
movups xmmword [edi], xmm0
add edi, 0x10
sub dword [ebp - 0xa8], 1
mov dword [ebp - 0xa4], edi
jne 0x401182
mov ecx, dword [ebp - 0xb0]
mov eax, ecx
shr eax, 1
lea esi, [eax + ecx*2]
push esi
mov dword [ebp - 0xa8], esi
call fcn.00406360
mov esi, dword [ebp - 0xb0]
mov ecx, eax
add esp, 4
mov dword [ebp - 0xa4], ecx
xor edx, edx
nop word [eax + eax]
mov eax, dword [ebp - 0xac]
movzx eax, byte [eax + edx]
mov byte [ecx], al
mov eax, edx
and eax, 7
movzx eax, byte [ebp + eax - 0xb8]
and al, 0xc0
mov byte [ecx + 1], al
add ecx, 2
test dl, 1
je 0x401228
lea eax, [edx + 1]
and eax, 7
mov al, byte [ebp + eax - 0xb8]
and al, 0xc0
mov byte [ecx], al
inc ecx
inc edx
cmp edx, esi
jb 0x4011f0
mov esi, dword [ebp - 0xa8]
mov edi, dword [ebp - 0xac]
jmp 0x401257
mov eax, ecx
shr eax, 1
lea esi, [eax + ecx*2]
push esi
mov dword [ebp - 0xa8], esi
call fcn.00406360
add esp, 4
mov dword [ebp - 0xa4], eax
push edi
call fcn.00406350
mov ecx, esi
mov eax, 0xffffffff
shr ecx, 1
add ecx, 1
cmovb ecx, eax
push ecx
call fcn.00406360
xor edi, edi
mov dword [ebp - 0xac], eax
add esp, 8
mov dword [ebp - 0xbc], edi
xor edx, edx
test esi, esi
je 0x4012d5
nop dword [eax]
mov eax, dword [ebp - 0xa4]
mov ecx, edi
mov esi, dword [ebp - 0xac]
mov al, byte [edx + eax]
mov byte [esi + edi], al
lea eax, [edx + 1]
mov esi, dword [ebp - 0xa8]
inc edi
cmp eax, esi
sbb eax, eax
neg eax
inc eax
add edx, eax
mov eax, edx
test cl, 1
je 0x4012c5
cmp eax, esi
jae 0x4012c5
lea edx, [eax + 1]
cmp edx, esi
jb 0x401290
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0xbc], edi
push edi
push eax
call fcn.004044b0
push dword [ebp - 0xa4]
mov dword [ebp - 0xb0], eax
call fcn.00406350
add esp, 0xc
mov dword [ebp - 0xa4], 0
lea esi, [ebp - 0x88]
xor eax, eax
inc eax
inc esi
cmp eax, 0x10
jl 0x401302
mov ecx, dword [ebp - 0xa4]
inc ecx
mov dword [ebp - 0xa4], ecx
cmp ecx, 8
jl 0x401300
test edi, edi
je 0x40138f
mov eax, dword [ebp - 0xb0]
lea ecx, [edi - 1]
shr ecx, 4
inc ecx
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xa4], ecx
nop dword [eax + eax]
movups xmm0, xmmword [eax]
mov edx, 7
lea esi, [ebp - 0x18]
movaps xmmword [ebp - 0xa0], xmm0
sub edx, 1
lea esi, [esi - 0x10]
jns 0x401352
mov eax, dword [ebp - 0xac]
movups xmmword [eax], xmm0
add eax, 0x10
sub dword [ebp - 0xa4], 1
mov dword [ebp - 0xac], eax
jne 0x401340
mov edi, dword [ebp - 0xbc]
mov esi, dword [ebp - 0xb0]
cmp byte [esi + edi - 1], 0x90
jne 0x401395
sub edi, 1
jne 0x401381
jmp 0x401395
mov esi, dword [ebp - 0xb0]
push esi
push edi
push str.Final_data:__.s_n
call fcn.00401010
push esi
call fcn.00406350
mov ecx, dword [ebp - 4]
add esp, 0x10
xor ecx, ebp
xor eax, eax
pop edi
pop esi
call fcn.004013bf
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret