Function at 0x404770
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
sub eax, 3
je 0x404932
sub eax, 4
je 0x404862
sub eax, 1
je 0x40479a
pop edi
pop esi
mov eax, 0x424378
pop ebx
pop ebp
ret
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov ebx, dword [ebp + 0x10]
sub edx, 0x1c
mov esi, dword [ebp + 8]
add ebx, 4
test edx, edx
jle 0x40482c
cmp edx, 0x40
jb 0x40481d
mov eax, edx
and eax, 0x8000003f
jns 0x4047c2
dec eax
or eax, 0xffffffc0
inc eax
mov edi, edx
sub edi, eax
movsx eax, bl
movd xmm0, eax
lea eax, [esi + 0x20]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm2, xmm0, 0
nop dword [eax]
movups xmm0, xmmword [eax - 0x20]
lea eax, [eax + 0x40]
add ecx, 0x40
movaps xmm1, xmm2
pxor xmm0, xmm2
movups xmmword [eax - 0x60], xmm0
movups xmm0, xmmword [eax - 0x50]
pxor xmm0, xmm2
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [eax - 0x40]
pxor xmm0, xmm2
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [eax - 0x30]
pxor xmm1, xmm0
movups xmmword [eax - 0x30], xmm1
cmp ecx, edi
jl 0x4047e0
cmp ecx, edx
jge 0x40482c
xor byte [ecx + esi], bl
lea eax, [ecx + esi]
inc ecx
cmp ecx, edx
jl 0x404821
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404831
sub ecx, edx
lea eax, [ecx + 1]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov edx, eax
sub edx, esi
nop dword [eax + eax]
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], cl
test cl, cl
jne 0x404850
pop edi
pop esi
pop ebx
pop ebp
ret
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov ebx, dword [ebp + 0x10]
sub edx, 0x29
mov esi, dword [ebp + 8]
add ebx, 9
test edx, edx
jle 0x4048ff
cmp edx, 0x40
jb 0x4048f0
mov eax, edx
and eax, 0x8000003f
jns 0x40488e
dec eax
or eax, 0xffffffc0
inc eax
mov edi, edx
sub edi, eax
movsx eax, bl
movd xmm0, eax
lea eax, [esi + 0x20]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm2, xmm0, 0
nop dword [eax]
movups xmm0, xmmword [eax - 0x20]
lea eax, [eax + 0x40]
add ecx, 0x40
movaps xmm1, xmm2
pxor xmm0, xmm2
movups xmmword [eax - 0x60], xmm0
movups xmm0, xmmword [eax - 0x50]
pxor xmm1, xmm0
movups xmmword [eax - 0x50], xmm1
movaps xmm1, xmm2
movups xmm0, xmmword [eax - 0x40]
pxor xmm1, xmm0
movups xmmword [eax - 0x40], xmm1
movups xmm0, xmmword [eax - 0x30]
pxor xmm0, xmm2
movups xmmword [eax - 0x30], xmm0
cmp ecx, edi
jl 0x4048b0
cmp ecx, edx
jge 0x4048ff
xor byte [ecx + esi], bl
lea eax, [ecx + esi]
inc ecx
cmp ecx, edx
jl 0x4048f4
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404904
sub ecx, edx
lea eax, [ecx + 1]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov edx, eax
sub edx, esi
nop dword [eax + eax]
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], cl
test cl, cl
jne 0x404920
pop edi
pop esi
pop ebx
pop ebp
ret
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov ebx, dword [ebp + 0x10]
sub edx, 0xd
mov esi, dword [ebp + 8]
add ebx, 5
test edx, edx
jle 0x4049c1
cmp edx, 0x40
jb 0x4049b2
mov eax, edx
and eax, 0x8000003f
jns 0x40495a
dec eax
or eax, 0xffffffc0
inc eax
mov edi, edx
sub edi, eax
movsx eax, bl
movd xmm0, eax
lea eax, [esi + 0x20]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm2, xmm0, 0
movups xmm0, xmmword [eax - 0x20]
lea eax, [eax + 0x40]
add ecx, 0x40
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmmword [eax - 0x60], xmm1
movups xmm0, xmmword [eax - 0x50]
pxor xmm0, xmm2
movups xmmword [eax - 0x50], xmm0
movups xmm0, xmmword [eax - 0x40]
pxor xmm0, xmm2
movups xmmword [eax - 0x40], xmm0
movups xmm0, xmmword [eax - 0x30]
pxor xmm0, xmm2
movups xmmword [eax - 0x30], xmm0
cmp ecx, edi
jl 0x404975
cmp ecx, edx
jge 0x4049c1
xor byte [ecx + esi], bl
lea eax, [ecx + esi]
inc ecx
cmp ecx, edx
jl 0x4049b6
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4049c6
sub ecx, edx
lea eax, [ecx + 1]
push eax
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov edx, eax
sub edx, esi
nop dword [eax]
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [edx + esi - 1], cl
test cl, cl
jne 0x4049e0
pop edi
pop esi
pop ebx
pop ebp
ret