Function at 0x2704e7dc
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x270b313c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x20]
push edi
mov edi, edx
mov edx, dword [ebp + 0x28]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x5c], eax
cmp edx, 2
je 0x2704eb49
cmp edx, 0x10
ja 0x2704eb49
test dl, 1
jne 0x2704eb49
lea eax, [ecx - 7]
cmp eax, 6
ja 0x2704eb49
cmp ebx, 0xff00
jae 0x2704eb49
mov al, 0xf
sub al, cl
mov byte [ebp - 0x3a], al
dec byte [ebp - 0x3a]
mov byte [ebp - 0x39], al
test ebx, ebx
seta al
shl al, 4
sub dl, 2
and dl, 0xfe
or al, dl
shl al, 2
or al, byte [ebp - 0x3a]
push ecx
mov byte [ebp - 0x28], al
lea eax, [ebp - 0x27]
push edi
push eax
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp + 0x10]
add esp, 0xc
cmp byte [ebp - 0x39], 0
jbe 0x2704e898
movzx edx, byte [ebp - 0x39]
lea eax, [ebp - 0x19]
mov byte [eax], cl
dec eax
shr ecx, 8
dec edx
jne 0x2704e88f
test ecx, ecx
ja 0x2704eb49
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x10
xor eax, eax
pop edi
mov cl, byte [ebp + eax - 0x28]
xor byte [ebp + eax - 0x18], cl
inc eax
dec edi
jne 0x2704e8ae
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.2703c81e
add esp, 0x14
test eax, eax
jne 0x2704eb4c
test ebx, ebx
jbe 0x2704e99e
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xe
mov eax, ebx
shr eax, 8
pop edi
mov byte [ebp - 0x28], al
mov byte [ebp - 0x27], bl
cmp ebx, edi
jae 0x2704e8fb
mov edi, ebx
push edi
lea eax, [ebp - 0x26]
push esi
push eax
call sub.msvcrt.dll_memcpy
sub ebx, edi
add esp, 0xc
mov dword [ebp - 0x40], ebx
push 0x10
lea ebx, [esi + edi]
xor eax, eax
pop edi
mov cl, byte [ebp + eax - 0x28]
xor byte [ebp + eax - 0x18], cl
inc eax
dec edi
jne 0x2704e916
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.2703c81e
add esp, 0x14
test eax, eax
jne 0x2704eb4c
jmp 0x2704e998
push 0x10
pop esi
cmp dword [ebp - 0x40], esi
ja 0x2704e94d
mov esi, dword [ebp - 0x40]
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
stosd dword es:[edi], eax
lea eax, [ebp - 0x28]
push ebx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push 0x10
xor eax, eax
pop edi
mov cl, byte [ebp + eax - 0x28]
xor byte [ebp + eax - 0x18], cl
inc eax
dec edi
jne 0x2704e969
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.2703c81e
add esp, 0x14
test eax, eax
jne 0x2704eb4c
sub dword [ebp - 0x40], esi
add ebx, esi
cmp dword [ebp - 0x40], 0
ja 0x2704e942
mov edi, dword [ebp - 0x4c]
mov al, byte [ebp - 0x3a]
push edi
push dword [ebp - 0x50]
mov byte [ebp - 0x38], al
lea eax, [ebp - 0x37]
push eax
call sub.msvcrt.dll_memcpy
movzx eax, byte [ebp - 0x39]
push eax
mov dword [ebp - 0x50], eax
lea eax, [ebp + edi - 0x37]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x54]
add esp, 0x18
mov byte [ebp - 0x29], 1
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x4c], ecx
test eax, eax
jbe 0x2704eaf4
push 0x10
pop ebx
cmp dword [ebp - 0x40], ebx
ja 0x2704e9f1
mov ebx, dword [ebp - 0x40]
cmp dword [ebp + 0xc], 0
jne 0x2704ea3f
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
push dword [ebp - 0x4c]
stosd dword es:[edi], eax
lea eax, [ebp - 0x28]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push 0x10
xor eax, eax
pop edi
mov cl, byte [ebp + eax - 0x28]
xor byte [ebp + eax - 0x18], cl
inc eax
dec edi
jne 0x2704ea15
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.2703c81e
add esp, 0x14
test eax, eax
jne 0x2704eb4c
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x10
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x44]
call fcn.2703c81e
add esp, 0x14
test eax, eax
jne 0x2704eb4c
xor cl, cl
test ebx, ebx
jbe 0x2704ea7c
mov edx, dword [ebp - 0x4c]
mov dl, byte [eax + edx]
xor dl, byte [ebp + eax - 0x28]
inc cl
mov byte [eax + esi], dl
movzx eax, cl
cmp eax, ebx
jb 0x2704ea66
cmp dword [ebp + 0xc], 1
jne 0x2704eac8
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
lea eax, [ebp - 0x28]
push esi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push 0x10
xor eax, eax
pop edi
mov cl, byte [ebp + eax - 0x28]
xor byte [ebp + eax - 0x18], cl
inc eax
dec edi
jne 0x2704ea9e
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.2703c81e
add esp, 0x14
test eax, eax
jne 0x2704eb4c
add dword [ebp - 0x4c], ebx
sub dword [ebp - 0x40], ebx
xor cl, cl
add esi, ebx
cmp byte [ebp - 0x39], cl
jbe 0x2704eaea
movzx edx, cl
lea eax, [ebp - 0x29]
sub eax, edx
inc byte [eax]
jne 0x2704eaea
inc cl
cmp cl, byte [ebp - 0x39]
jb 0x2704ead7
cmp dword [ebp - 0x40], 0
ja 0x2704e9e6
cmp byte [ebp - 0x39], 0
jbe 0x2704eb07
mov ecx, dword [ebp - 0x50]
lea eax, [ebp - 0x29]
mov byte [eax], 0
dec eax
dec ecx
jne 0x2704eb00
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x10
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x44]
call fcn.2703c81e
add esp, 0x14
test eax, eax
jne 0x2704eb4c
push 0x10
pop ecx
mov dl, byte [ebp + eax - 0x28]
xor byte [ebp + eax - 0x18], dl
inc eax
dec ecx
jne 0x2704eb27
push dword [ebp + 0x28]
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x5c]
call sub.msvcrt.dll_memcpy
add esp, 0xc
xor eax, eax
jmp 0x2704eb4c
push 0xfffffffffffffff3
pop eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.27088f70
leave
ret