Function at 0x440171
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x46405c]
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 0x4404de
cmp edx, 0x10
ja 0x4404de
test dl, 1
jne 0x4404de
lea eax, [ecx - 7]
cmp eax, 6
ja 0x4404de
cmp ebx, 0xff00
jae 0x4404de
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 0x44022d
movzx edx, byte [ebp - 0x39]
lea eax, [ebp - 0x19]
mov byte [eax], cl
dec eax
shr ecx, 8
dec edx
jne 0x440224
test ecx, ecx
ja 0x4404de
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 0x440243
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.0042f07d
add esp, 0x14
test eax, eax
jne 0x4404e1
test ebx, ebx
jbe 0x440333
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 0x440290
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 0x4402ab
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.0042f07d
add esp, 0x14
test eax, eax
jne 0x4404e1
jmp 0x44032d
push 0x10
pop esi
cmp dword [ebp - 0x40], esi
ja 0x4402e2
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 0x4402fe
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.0042f07d
add esp, 0x14
test eax, eax
jne 0x4404e1
sub dword [ebp - 0x40], esi
add ebx, esi
cmp dword [ebp - 0x40], 0
ja 0x4402d7
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 0x440489
push 0x10
pop ebx
cmp dword [ebp - 0x40], ebx
ja 0x440386
mov ebx, dword [ebp - 0x40]
cmp dword [ebp + 0xc], 0
jne 0x4403d4
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 0x4403aa
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.0042f07d
add esp, 0x14
test eax, eax
jne 0x4404e1
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.0042f07d
add esp, 0x14
test eax, eax
jne 0x4404e1
xor cl, cl
test ebx, ebx
jbe 0x440411
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 0x4403fb
cmp dword [ebp + 0xc], 1
jne 0x44045d
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 0x440433
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x10
push eax
push dword [ebp - 0x44]
call fcn.0042f07d
add esp, 0x14
test eax, eax
jne 0x4404e1
add dword [ebp - 0x4c], ebx
sub dword [ebp - 0x40], ebx
xor cl, cl
add esi, ebx
cmp byte [ebp - 0x39], cl
jbe 0x44047f
movzx edx, cl
lea eax, [ebp - 0x29]
sub eax, edx
inc byte [eax]
jne 0x44047f
inc cl
cmp cl, byte [ebp - 0x39]
jb 0x44046c
cmp dword [ebp - 0x40], 0
ja 0x44037b
cmp byte [ebp - 0x39], 0
jbe 0x44049c
mov ecx, dword [ebp - 0x50]
lea eax, [ebp - 0x29]
mov byte [eax], 0
dec eax
dec ecx
jne 0x440495
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.0042f07d
add esp, 0x14
test eax, eax
jne 0x4404e1
push 0x10
pop ecx
mov dl, byte [ebp + eax - 0x28]
xor byte [ebp + eax - 0x18], dl
inc eax
dec ecx
jne 0x4404bc
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 0x4404e1
push 0xfffffffffffffff3
pop eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044f7e0
leave
ret