Function at 0x407e30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
mov edx, 4
push esi
push ebx
sub esp, 0x4c
mov eax, dword [ecx]
mov ebp, dword [ecx + 0xc]
mov edi, dword [esp + 0x60]
mov dword [esp + 0x28], ecx
mov esi, dword [esp + 0x68]
mov ebx, dword [edi + 4]
sub ebx, dword [edi]
mov dword [ecx + 4], eax
mov dword [ecx + 0x10], ebp
sar ebx, 2
test ebx, ebx
jne 0x4081d0
mov dword [esp], edx
mov ecx, esi
mov dword [esp + 4], 0
call fcn.0062faf0
sub esp, 8
mov eax, dword [esi]
mov edx, dword [esp + 0x64]
mov byte [eax], dl
mov eax, dword [esi]
mov edx, ebx
shr edx, 0x10
mov byte [eax + 1], dl
mov eax, dword [esi]
mov byte [eax + 2], bh
mov eax, dword [esi]
mov byte [eax + 3], bl
mov eax, dword [esi]
lea ecx, [eax + 4]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], ecx
mov edi, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x18], eax
sub eax, edi
mov dword [esp + 0x30], edi
cmp eax, 7
jle 0x407f96
sub eax, 8
mov edx, edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x34], eax
and eax, 0xfffffff8
lea eax, [edi + eax + 8]
mov dword [esp + 0x2c], eax
movzx edi, byte [edx + 2]
movzx esi, byte [edx]
add edx, 8
movzx ecx, byte [edx - 2]
movzx eax, byte [edx - 4]
movzx ebx, byte [edx - 5]
mov ebp, edi
and esi, 7
sar edi, 2
shl ebp, 6
mov byte [esp + 0x20], cl
movzx ecx, byte [edx - 1]
or esi, ebp
movzx ebp, byte [edx - 7]
mov byte [esp + 0x1c], al
movzx eax, byte [edx - 3]
mov byte [esp + 0x27], cl
shl ebp, 3
and ebp, 0x38
or esi, ebp
mov ebp, dword [esp + 0x18]
mov ecx, esi
mov esi, edi
lea edi, [ebx + ebx]
movzx ebx, byte [esp + 0x1c]
and esi, 1
and edi, 0xe
mov byte [ebp], cl
add ebp, 3
or edi, esi
mov esi, eax
sar eax, 1
shl esi, 7
and eax, 3
shl ebx, 4
or edi, esi
and ebx, 0x70
or ebx, edi
movzx edi, byte [esp + 0x20]
mov byte [ebp - 2], bl
lea ebx, [edi*4]
and ebx, 0x1c
or eax, ebx
movzx ebx, byte [esp + 0x27]
shl ebx, 5
or eax, ebx
mov byte [ebp - 1], al
cmp dword [esp + 0x2c], edx
mov dword [esp + 0x18], ebp
jne 0x407ed1
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
mov edx, eax
and eax, 7
shr edx, 3
add edx, 1
lea esi, [esi + edx*8]
lea edx, [edx + edx*2]
add dword [esp + 0x38], edx
mov dword [esp + 0x30], esi
cmp eax, 7
je 0x408280
cmp eax, 6
je 0x407ff0
cmp eax, 5
je 0x408500
cmp eax, 4
je 0x408670
cmp eax, 3
je 0x408455
cmp eax, 2
mov esi, dword [esp + 0x38]
je 0x4086bd
cmp eax, 1
mov dword [esp + 0x34], esi
jne 0x408056
mov eax, dword [esp + 0x30]
add dword [esp + 0x34], 1
movzx eax, byte [eax]
and eax, 7
mov byte [esi], al
jmp 0x408056
mov ebp, dword [esp + 0x30]
movzx eax, byte [ebp + 2]
movzx ebx, byte [ebp]
movzx esi, byte [ebp + 3]
movzx edx, byte [ebp + 5]
movzx edi, byte [ebp + 4]
mov ecx, eax
mov byte [esp + 0x18], bl
and ebx, 7
shl ecx, 6
sar eax, 2
add esi, esi
or ecx, ebx
movzx ebx, byte [ebp + 1]
and eax, 1
and esi, 0xe
shl edi, 4
or eax, esi
and edi, 0x70
shl ebx, 3
and ebx, 0x38
or ecx, ebx
mov ebx, dword [esp + 0x38]
mov byte [ebx], cl
mov ecx, edx
sar edx, 1
shl ecx, 7
and edx, 3
or eax, ecx
mov byte [ebx + 2], dl
or eax, edi
mov byte [ebx + 1], al
lea eax, [ebx + 3]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
mov esi, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
sub eax, esi
mov dword [esp + 0x30], esi
cmp eax, 7
jle 0x408175
sub eax, 8
mov edi, dword [esp + 0x34]
mov ebp, esi
mov dword [esp + 0x3c], eax
shr eax, 3
mov dword [esp + 0x38], eax
lea eax, [eax + eax*4 + 5]
mov ebx, edi
add eax, edi
mov dword [esp + 0x2c], eax
nop
movzx ecx, byte [ebp + 2]
movzx esi, byte [ebp]
add ebx, 5
movzx eax, byte [ebp + 3]
add ebp, 8
mov byte [esp + 0x18], cl
movzx ecx, byte [ebp - 4]
and esi, 0x1f
mov byte [esp + 0x1c], cl
movzx ecx, byte [ebp - 3]
mov byte [esp + 0x20], cl
movzx ecx, byte [ebp - 2]
mov byte [esp + 0x27], cl
movzx ecx, byte [ebp - 1]
mov byte [esp + 0x28], cl
movzx ecx, byte [ebp - 7]
mov edi, ecx
sar ecx, 3
shl edi, 5
or esi, edi
mov edx, esi
mov esi, ecx
movzx ecx, byte [esp + 0x18]
mov byte [ebx - 5], dl
and esi, 3
mov edx, eax
shl edx, 7
sar eax, 1
and eax, 0xf
shl ecx, 2
and ecx, 0x7c
or ecx, esi
or ecx, edx
movzx edx, byte [esp + 0x1c]
mov byte [ebx - 4], cl
mov edi, edx
sar edx, 4
shl edi, 4
and edx, 1
or eax, edi
movzx edi, byte [esp + 0x20]
mov byte [ebx - 3], al
movzx eax, byte [esp + 0x27]
lea ecx, [edi + edi]
mov edi, eax
sar eax, 2
and ecx, 0x3e
shl edi, 6
and eax, 7
or edx, ecx
movzx ecx, byte [esp + 0x28]
or edx, edi
mov byte [ebx - 2], dl
lea edx, [ecx*8]
or eax, edx
mov byte [ebx - 1], al
cmp dword [esp + 0x2c], ebx
jne 0x408090
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
mov eax, edi
add edi, 1
mov edx, edi
mov edi, dword [esp + 0x30]
neg eax
lea eax, [esi + eax*8]
lea esi, [edi + edx*8]
lea edx, [edx + edx*4]
add dword [esp + 0x34], edx
mov dword [esp + 0x30], esi
cmp eax, 7
je 0x408300
cmp eax, 6
je 0x4083a0
cmp eax, 5
je 0x408495
cmp eax, 4
je 0x408622
cmp eax, 3
je 0x408420
cmp eax, 2
je 0x4086e1
cmp eax, 1
jne 0x408392
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
movzx eax, byte [eax]
and eax, 0x1f
mov byte [esi], al
jmp 0x408392
mov edx, dword [ecx + 8]
mov dword [esp + 0x18], edx
sub edx, eax
cmp ebx, edx
ja 0x4085f0
mov eax, ebx
mov edx, 0xcccccccd
mul edx
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0x14]
shr edx, 3
mov dword [esp + 0x18], eax
sub eax, ebp
cmp edx, eax
ja 0x408560
mov eax, dword [edi]
mov ecx, dword [esp + 0x28]
mov ebp, 1
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004078d0
xor eax, eax
sub esp, 4
cmp ebx, 1
jbe 0x408255
mov dword [esp + 0x68], esi
mov esi, eax
mov esi, esi
lea edi, [edi]
mov ecx, dword [edi]
mov eax, dword [ecx + ebp*4]
xor eax, dword [ecx + esi]
add ebp, 1
mov ecx, dword [esp + 0x28]
add esi, 4
mov dword [esp], eax
call fcn.004078d0
sub esp, 4
cmp ebx, ebp
jne 0x408230
mov esi, dword [esp + 0x68]
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
lea edx, [eax + eax*4 + 7]
mov eax, dword [edi + 4]
sub eax, dword [edi]
shr edx, 3
lea eax, [eax + eax*2 + 7]
shr eax, 3
lea edx, [edx + eax + 4]
jmp 0x407e63
mov ebx, dword [esp + 0x30]
movzx eax, byte [ebx + 2]
movzx edx, byte [ebx + 5]
movzx esi, byte [ebx + 3]
movzx edi, byte [ebx + 4]
movzx ebp, byte [ebx + 6]
movzx ebx, byte [ebx]
mov ecx, eax
sar eax, 2
shl ecx, 6
add esi, esi
and eax, 1
mov byte [esp + 0x18], bl
and ebx, 7
and esi, 0xe
or ecx, ebx
mov ebx, dword [esp + 0x30]
or eax, esi
mov esi, edx
shl edi, 4
sar edx, 1
shl esi, 7
and edi, 0x70
shl ebp, 2
movzx ebx, byte [ebx + 1]
or eax, esi
and edx, 3
or eax, edi
and ebp, 0x1c
or edx, ebp
shl ebx, 3
and ebx, 0x38
or ecx, ebx
mov ebx, dword [esp + 0x38]
mov byte [ebx + 1], al
lea eax, [ebx + 3]
mov byte [ebx], cl
mov byte [ebx + 2], dl
mov dword [esp + 0x34], eax
jmp 0x408056
mov eax, dword [esp + 0x30]
movzx ecx, byte [eax + 4]
movzx esi, byte [eax]
movzx ebx, byte [eax + 2]
movzx edx, byte [eax + 3]
movzx ebp, byte [eax + 6]
mov byte [esp + 0x18], cl
movzx ecx, byte [eax + 5]
and esi, 0x1f
shl ebx, 2
and ebx, 0x7c
mov byte [esp + 0x1c], cl
movzx ecx, byte [eax + 1]
mov edi, ecx
sar ecx, 3
shl edi, 5
and ecx, 3
or esi, edi
mov edi, dword [esp + 0x34]
or ecx, ebx
mov eax, esi
mov ebx, edx
sar edx, 1
shl ebx, 7
and edx, 0xf
mov byte [edi], al
movzx eax, byte [esp + 0x18]
or ecx, ebx
mov byte [edi + 1], cl
movzx ecx, byte [esp + 0x1c]
mov ebx, ebp
movzx ebp, bl
mov esi, eax
sar eax, 4
shl esi, 4
and eax, 1
or edx, esi
mov byte [edi + 2], dl
lea edx, [ecx + ecx]
and edx, 0x3e
or eax, edx
mov edx, ebp
sar ebp, 2
shl edx, 6
or eax, edx
mov byte [edi + 3], al
mov eax, ebp
and eax, 7
mov byte [edi + 4], al
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov eax, dword [esp + 0x30]
movzx ecx, byte [eax + 1]
movzx edi, byte [eax]
movzx ebx, byte [eax + 4]
movzx esi, byte [eax + 2]
movzx edx, byte [eax + 3]
mov ebp, ecx
and edi, 0x1f
sar ecx, 3
shl ebp, 5
mov byte [esp + 0x18], bl
shl esi, 2
or edi, ebp
mov ebp, dword [esp + 0x34]
movzx ebx, byte [eax + 5]
mov eax, edi
and esi, 0x7c
and ecx, 3
or ecx, esi
mov esi, edx
sar edx, 1
mov byte [ebp], al
movzx eax, byte [esp + 0x18]
shl esi, 7
or ecx, esi
add ebx, ebx
and edx, 0xf
mov byte [ebp + 1], cl
and ebx, 0x3e
mov ecx, eax
sar eax, 4
shl ecx, 4
and eax, 1
or eax, ebx
or edx, ecx
mov byte [ebp + 2], dl
mov byte [ebp + 3], al
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
movzx edx, byte [ebx + 2]
movzx eax, byte [ebx + 1]
movzx ecx, byte [ebx]
shl edx, 2
mov ebx, eax
sar eax, 3
and ecx, 0x1f
shl ebx, 5
and eax, 3
and edx, 0x7c
or ecx, ebx
or eax, edx
mov byte [esi], cl
mov byte [esi + 1], al
jmp 0x408392
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x38]
movzx edx, byte [esi + 2]
movzx eax, byte [esi]
mov ecx, edx
mov byte [esp + 0x18], al
and eax, 7
shl ecx, 6
sar edx, 2
or eax, ecx
movzx ecx, byte [esi + 1]
lea esi, [ebx + 2]
and edx, 1
mov dword [esp + 0x34], esi
mov byte [ebx + 1], dl
shl ecx, 3
and ecx, 0x38
or eax, ecx
mov byte [ebx], al
jmp 0x408056
mov eax, dword [esp + 0x30]
movzx edx, byte [eax + 1]
movzx esi, byte [eax + 3]
movzx ecx, byte [eax + 4]
movzx ebx, byte [eax + 2]
movzx eax, byte [eax]
mov edi, edx
sar edx, 3
shl edi, 5
shl ebx, 2
and edx, 3
and eax, 0x1f
and ebx, 0x7c
or eax, edi
mov edi, dword [esp + 0x34]
or edx, ebx
mov byte [edi], al
mov eax, esi
movzx eax, al
mov ebx, eax
sar eax, 1
shl ebx, 7
and eax, 0xf
or edx, ebx
mov byte [edi + 1], dl
mov edx, ecx
sar ecx, 4
shl edx, 4
and ecx, 1
or eax, edx
mov byte [edi + 3], cl
mov byte [edi + 2], al
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov edi, dword [esp + 0x30]
movzx ebx, byte [edi]
movzx eax, byte [edi + 2]
movzx ecx, byte [edi + 3]
movzx edx, byte [edi + 4]
mov esi, ebx
mov byte [esp + 0x18], bl
mov ebx, eax
and esi, 7
shl ebx, 6
sar eax, 2
or ebx, esi
movzx esi, byte [edi + 1]
add ecx, ecx
and eax, 1
and ecx, 0xe
shl edx, 4
or eax, ecx
and edx, 0x70
or edx, eax
shl esi, 3
and esi, 0x38
or ebx, esi
mov esi, dword [esp + 0x38]
mov byte [esi], bl
lea ebx, [esi + 2]
mov byte [esi + 1], dl
mov dword [esp + 0x34], ebx
jmp 0x408056
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], edx
mov eax, dword [eax + 0x10]
mov dword [esp], edx
sub eax, ebp
mov dword [esp + 0x18], eax
call fcn.00653a50
mov ecx, eax
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x4085ab
mov eax, dword [esp + 0x18]
mov dword [esp], ecx
mov dword [esp + 4], ebp
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x4085ce
mov dword [esp], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
call fcn.00653a10
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
add edx, ecx
add eax, ecx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x14], edx
mov dword [ebp + 0x10], eax
jmp 0x408202
mov dword [esp], ebx
call fcn.00653a50
mov ebp, eax
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
test eax, eax
je 0x40860c
mov dword [esp], eax
call fcn.00653a10
mov eax, dword [esp + 0x28]
mov dword [eax], ebp
mov dword [eax + 4], ebp
add ebp, ebx
mov dword [eax + 8], ebp
mov ebp, dword [eax + 0xc]
jmp 0x4081e1
mov esi, dword [esp + 0x30]
movzx ecx, byte [esi + 2]
movzx eax, byte [esi + 1]
movzx ebx, byte [esi]
movzx edx, byte [esi + 3]
shl ecx, 2
mov esi, eax
sar eax, 3
shl esi, 5
and ecx, 0x7c
and ebx, 0x1f
and eax, 3
or ebx, esi
mov esi, dword [esp + 0x34]
or eax, ecx
mov ecx, edx
sar edx, 1
shl ecx, 7
and edx, 0xf
or eax, ecx
mov byte [esi], bl
mov byte [esi + 2], dl
mov byte [esi + 1], al
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov esi, dword [esp + 0x30]
movzx ebx, byte [esi]
movzx eax, byte [esi + 2]
movzx edx, byte [esi + 3]
mov ecx, ebx
mov byte [esp + 0x18], bl
mov ebx, eax
shl ebx, 6
and ecx, 7
sar eax, 2
or ecx, ebx
movzx ebx, byte [esi + 1]
mov esi, dword [esp + 0x38]
add edx, edx
and eax, 1
and edx, 0xe
or eax, edx
shl ebx, 3
mov byte [esi + 1], al
and ebx, 0x38
or ecx, ebx
lea ebx, [esi + 2]
mov byte [esi], cl
mov dword [esp + 0x34], ebx
jmp 0x408056
mov ebx, dword [esp + 0x30]
lea eax, [esi + 1]
mov dword [esp + 0x34], eax
movzx eax, byte [ebx + 1]
movzx edx, byte [ebx]
shl eax, 3
and edx, 7
and eax, 0x38
or eax, edx
mov byte [esi], al
jmp 0x408056
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
movzx eax, byte [esi + 1]
movzx edx, byte [esi]
mov ecx, eax
and edx, 0x1f
sar eax, 3
shl ecx, 5
and eax, 3
or edx, ecx
mov byte [ebx + 1], al
mov byte [ebx], dl
jmp 0x408392