Function at 0x407c52
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebx + 4], 0
and dword [ebx], 0
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, eax
mov eax, 0x8000
cmp edi, eax
jae 0x407c70
mov eax, edi
push eax
push esi
push dword [ebx + 8]
call sub.MSVCRT.dll_memcpy
xor eax, eax
inc eax
add esp, 0xc
xor cl, cl
cmp edi, eax
jbe 0x407c8e
xor cl, byte [eax + esi]
inc eax
cmp eax, edi
jb 0x407c86
mov eax, dword [ebx + 4]
mov edi, dword [ebp + 0xc]
add eax, 8
mov edx, eax
shr edx, 3
add dword [ebx], edx
and eax, 7
mov dword [ebx + 4], eax
and dword [edi + 0x10], 0
cmp cl, byte [esi]
jne 0x407f00
push dword [ebp + 8]
push esi
call fcn.004043d4
pop ecx
pop ecx
xor ecx, ecx
not eax
xor edx, edx
cmp dword [edx + 0x40a174], eax
jne 0x407cd8
mov esi, dword [edx + 0x40a170]
cmp esi, dword [ebp + 8]
je 0x407d6c
add edx, 0xc
inc ecx
cmp edx, 0x54
jb 0x407cc1
and dword [ebp - 4], 0
cmp dword [ebp - 4], 0
je 0x407d2f
inc dword [edi + 4]
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
jbe 0x407cfd
mov esi, edi
call fcn.004087f0
mov eax, dword [edi + 0x10]
mov edx, dword [ebp - 4]
lea ecx, [eax + 1]
imul eax, eax, 0x28
add eax, dword [edi]
and dword [ebp + 8], 0
mov dword [edi + 0x10], ecx
lea ecx, [eax + 0xc]
mov dword [ecx], edx
mov dword [eax + 0x14], ecx
lea ecx, [eax + 0x1c]
push 3
mov dword [eax + 0x24], ecx
pop ecx
mov dword [eax], 0x28
mov dword [eax + 0x18], ecx
mov dword [eax + 8], ecx
mov edx, ebx
call fcn.0040438c
mov ecx, dword [ebx + 4]
inc ecx
mov edx, ecx
shr edx, 3
add dword [ebx], edx
and ecx, 7
test ax, ax
mov dword [ebx + 4], ecx
jns 0x407ef5
mov esi, ebx
call fcn.00408051
mov ecx, dword [ebp + 8]
and dword [ebp - 4], 0
inc eax
cmp dword [ebx], ecx
mov dword [ebp - 8], eax
jae 0x407f00
jmp 0x407d80
imul ecx, ecx, 0xc
mov eax, dword [ecx + 0x40a178]
mov dword [ebp - 4], eax
jmp 0x407ce5
mov eax, dword [ebp - 8]
cmp dword [ebp - 4], eax
jae 0x407ef5
lea esi, [edi + 0x20]
inc dword [esi + 4]
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
jbe 0x407d9c
call fcn.0040882e
mov edx, ebx
call fcn.0040438c
mov ecx, dword [esi]
mov edx, dword [ebp - 4]
shr eax, 8
mov byte [edx + ecx], al
mov eax, dword [ebx + 4]
add eax, 8
mov ecx, eax
and eax, 7
shr ecx, 3
add dword [ebx], ecx
inc dword [ebp - 4]
mov dword [ebx + 4], eax
mov eax, dword [ebp + 8]
cmp dword [ebx], eax
jb 0x407d7d
jmp 0x407ef5
inc dword [edi + 4]
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
jbe 0x407de2
mov esi, edi
call fcn.004087f0
mov esi, dword [edi + 0x10]
imul esi, esi, 0x28
add esi, dword [edi]
mov edx, ebx
call fcn.0040438c
test ax, ax
js 0x407e03
shr eax, 0xc
mov dword [esi], eax
mov eax, dword [ebx + 4]
add eax, 4
jmp 0x407e11
shr eax, 0xa
sub eax, 0x18
mov dword [esi], eax
mov eax, dword [ebx + 4]
add eax, 6
mov ecx, eax
and eax, 7
shr ecx, 3
add dword [ebx], ecx
mov dword [ebx + 4], eax
mov eax, dword [esi]
test byte [eax + 0x40a030], 4
je 0x407e4e
mov edx, ebx
call fcn.0040438c
test eax, 0xffff8000
setne al
mov byte [esi + 4], al
mov eax, dword [ebx + 4]
inc eax
mov ecx, eax
shr ecx, 3
add dword [ebx], ecx
and eax, 7
mov dword [ebx + 4], eax
jmp 0x407e52
mov byte [esi + 4], 0
mov edx, dword [esi]
lea ecx, [esi + 0x18]
push 3
pop eax
mov dword [ecx], eax
mov dword [ebp - 4], ecx
lea ecx, [esi + 8]
mov dword [ecx], eax
movzx edx, byte [edx + 0x40a030]
and edx, eax
mov dword [ebp - 8], edx
mov dword [esi + 0x24], 0
mov dword [esi + 0x14], 0
jle 0x407ef2
movzx eax, byte [esi + 4]
push eax
mov edi, ecx
mov eax, ebx
call fcn.00407f6f
cmp dword [ebp - 8], 2
jne 0x407ea5
movzx eax, byte [esi + 4]
mov edi, dword [ebp - 4]
push eax
mov eax, ebx
call fcn.00407f6f
jmp 0x407eef
cmp dword [esi + 8], 1
jne 0x407eef
mov eax, dword [esi]
test byte [eax + 0x40a030], 0x18
je 0x407eef
mov eax, dword [esi + 0xc]
mov ecx, 0x100
cmp eax, ecx
jl 0x407ec6
sub eax, ecx
jmp 0x407eec
cmp eax, 0x88
jl 0x407ed4
sub eax, 0x108
jmp 0x407ee6
cmp eax, 0x10
jl 0x407ede
sub eax, 8
jmp 0x407ee6
cmp eax, 8
jl 0x407ee6
sub eax, 0x10
mov ecx, dword [ebp + 0xc]
add eax, dword [ecx + 0x10]
mov dword [esi + 0xc], eax
mov edi, dword [ebp + 0xc]
inc dword [edi + 0x10]
mov eax, dword [ebp + 8]
cmp dword [ebx], eax
jb 0x407dd0
inc dword [edi + 4]
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
jbe 0x407f12
mov esi, edi
call fcn.004087f0
mov eax, dword [edi + 0x10]
lea ecx, [eax + 1]
imul eax, eax, 0x28
add eax, dword [edi]
mov dword [edi + 0x10], ecx
lea ecx, [eax + 0xc]
mov dword [eax + 0x14], ecx
lea ecx, [eax + 0x1c]
mov dword [eax + 0x24], ecx
push 3
pop ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 8], ecx
xor edx, edx
mov dword [eax], 0x16
xor ecx, ecx
cmp dword [edi + 0x10], edx
jle 0x407f69
mov eax, dword [edi]
add eax, edx
cmp dword [eax + 0x14], 0
jne 0x407f54
lea esi, [eax + 0xc]
mov dword [eax + 0x14], esi
cmp dword [eax + 0x24], 0
jne 0x407f60
lea esi, [eax + 0x1c]
mov dword [eax + 0x24], esi
inc ecx
add edx, 0x28
cmp ecx, dword [edi + 0x10]
jl 0x407f44
pop edi
pop esi
leave
ret 8