Function at 0x49ace0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 8]
push ebp
mov ebp, ecx
cmp edx, 0x8000
push esi
mov ecx, edx
mov dword [ebp + 4], 0
mov dword [ebp], 0
jb 0x49ad05
mov ecx, 0x8000
mov esi, dword [esp + 0xc]
push ebx
mov eax, ecx
push edi
mov edi, dword [ebp + 8]
xor bl, bl
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 1
and ecx, 3
cmp edx, eax
rep movsb byte es:[edi], byte [esi]
jbe 0x49ad33
mov ecx, dword [esp + 0x14]
xor bl, byte [eax + ecx]
inc eax
cmp eax, edx
jb 0x49ad27
push 8
mov ecx, ebp
call fcn.00498720
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov dword [esi + 0x10], 0
mov cl, byte [eax]
cmp bl, cl
jne 0x49aff1
mov edx, dword [esp + 0x18]
mov ecx, ebp
push edx
push eax
call fcn.0049b3e0
mov ebx, eax
test ebx, ebx
je 0x49ade4
mov edi, dword [esi + 4]
mov eax, dword [esi + 8]
inc edi
mov ecx, edi
mov dword [esi + 4], edi
cmp ecx, eax
jbe 0x49adac
mov edx, eax
shr edx, 2
lea edi, [edx + eax + 0x20]
cmp ecx, edi
jbe 0x49ad87
mov edi, ecx
mov ecx, dword [esi]
lea eax, [edi + edi*4]
shl eax, 3
push eax
push ecx
call fcn.00450bcf
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x49ada9
mov ecx, 0x7c9f20
call fcn.004946f0
mov dword [esi + 8], edi
mov eax, dword [esi + 0x10]
mov ecx, dword [esi]
mov dword [esp + 0x18], 0
lea edx, [eax + 1]
lea eax, [eax + eax*4]
mov dword [esi + 0x10], edx
lea eax, [ecx + eax*8]
lea ecx, [eax + 0xc]
lea edx, [eax + 0x1c]
mov dword [eax + 0x14], ecx
mov dword [eax], 0x36
mov dword [ecx], ebx
mov ecx, 3
mov dword [eax + 0x24], edx
mov dword [eax + 0x18], ecx
mov dword [eax + 8], ecx
mov ecx, ebp
call fcn.00498740
push 1
mov ecx, ebp
mov edi, eax
call fcn.00498720
test edi, 0x8000
je 0x49ae8d
push ebp
call fcn.0049b1a0
mov ecx, dword [ebp]
mov edx, dword [esp + 0x1c]
add esp, 4
inc eax
xor ebx, ebx
cmp ecx, edx
mov dword [esp + 0x14], eax
jae 0x49ae8d
jmp 0x49ae23
mov eax, dword [esp + 0x14]
cmp ebx, eax
jae 0x49ae8d
mov edi, dword [esi + 0x24]
mov eax, dword [esi + 0x28]
inc edi
mov ecx, edi
mov dword [esi + 0x24], edi
cmp ecx, eax
jbe 0x49ae67
mov edx, eax
shr edx, 2
lea edi, [edx + eax + 0x20]
cmp ecx, edi
jbe 0x49ae46
mov edi, ecx
mov eax, dword [esi + 0x20]
push edi
push eax
call fcn.00450bcf
add esp, 8
mov dword [esi + 0x20], eax
test eax, eax
jne 0x49ae64
mov ecx, 0x7c9f20
call fcn.004946f0
mov dword [esi + 0x28], edi
mov edi, dword [esi + 0x20]
mov ecx, ebp
add edi, ebx
call fcn.00498740
shr eax, 8
push 8
mov ecx, ebp
mov byte [edi], al
call fcn.00498720
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp]
inc ebx
cmp eax, ecx
jb 0x49ae1f
mov edx, dword [esp + 0x18]
mov eax, dword [ebp]
cmp eax, edx
jae 0x49aff1
mov edi, dword [esi + 4]
mov eax, dword [esi + 8]
inc edi
mov ecx, edi
mov dword [esi + 4], edi
cmp ecx, eax
jbe 0x49aee0
mov edx, eax
shr edx, 2
lea edi, [edx + eax + 0x20]
cmp ecx, edi
jbe 0x49aebb
mov edi, ecx
mov ecx, dword [esi]
lea eax, [edi + edi*4]
shl eax, 3
push eax
push ecx
call fcn.00450bcf
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x49aedd
mov ecx, 0x7c9f20
call fcn.004946f0
mov dword [esi + 8], edi
mov eax, dword [esi + 0x10]
mov ecx, ebp
lea edx, [eax + eax*4]
mov eax, dword [esi]
lea edi, [eax + edx*8]
call fcn.00498740
test ah, 0x80
jne 0x49af00
shr eax, 0xc
mov dword [edi], eax
push 4
jmp 0x49af0a
shr eax, 0xa
sub eax, 0x18
push 6
mov dword [edi], eax
mov ecx, ebp
call fcn.00498720
mov ecx, dword [edi]
test byte [ecx + 0x77c520], 4
je 0x49af39
mov ecx, ebp
call fcn.00498740
test eax, 0xffff8000
setne dl
push 1
mov ecx, ebp
mov byte [edi + 4], dl
call fcn.00498720
jmp 0x49af3d
mov byte [edi + 4], 0
lea eax, [edi + 0x18]
lea ebx, [edi + 8]
mov dword [esp + 0x1c], eax
mov dword [eax], 3
mov eax, dword [edi]
mov dword [ebx], 3
mov cl, byte [eax + 0x77c520]
mov eax, 0
and ecx, 3
mov dword [edi + 0x24], eax
mov dword [esp + 0x14], ecx
mov dword [edi + 0x14], eax
jle 0x49afdb
mov dl, byte [edi + 4]
mov ecx, ebp
push edx
push ebx
call fcn.0049b0b0
cmp dword [esp + 0x14], 2
jne 0x49af94
mov al, byte [edi + 4]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, ebp
call fcn.0049b0b0
jmp 0x49afdb
cmp dword [ebx], 1
jne 0x49afdb
mov edx, dword [edi]
test byte [edx + 0x77c520], 0x18
je 0x49afdb
mov eax, dword [edi + 0xc]
cmp eax, 0x100
jl 0x49afb5
sub eax, 0x100
jmp 0x49afd8
cmp eax, 0x88
jl 0x49afc3
sub eax, 0x108
jmp 0x49afd5
cmp eax, 0x10
jl 0x49afcd
sub eax, 8
jmp 0x49afd5
cmp eax, 8
jl 0x49afd5
sub eax, 0x10
add eax, dword [esi + 0x10]
mov dword [edi + 0xc], eax
mov edx, dword [esi + 0x10]
mov eax, dword [esp + 0x18]
inc edx
mov dword [esi + 0x10], edx
mov ecx, dword [ebp]
cmp ecx, eax
jb 0x49ae9c
mov edi, dword [esi + 4]
mov eax, dword [esi + 8]
inc edi
mov ecx, edi
mov dword [esi + 4], edi
cmp ecx, eax
jbe 0x49b035
mov edx, eax
shr edx, 2
lea edi, [edx + eax + 0x20]
cmp ecx, edi
jbe 0x49b010
mov edi, ecx
mov ecx, dword [esi]
lea eax, [edi + edi*4]
shl eax, 3
push eax
push ecx
call fcn.00450bcf
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x49b032
mov ecx, 0x7c9f20
call fcn.004946f0
mov dword [esi + 8], edi
mov eax, dword [esi + 0x10]
mov ecx, dword [esi]
lea edx, [eax + 1]
lea eax, [eax + eax*4]
mov dword [esi + 0x10], edx
lea eax, [ecx + eax*8]
lea ecx, [eax + 0x1c]
lea edx, [eax + 0xc]
mov dword [eax + 0x24], ecx
mov ecx, 3
mov dword [eax], 0x16
mov dword [eax + 0x14], edx
mov dword [eax + 0x18], ecx
mov dword [eax + 8], ecx
mov eax, dword [esi + 0x10]
xor edx, edx
test eax, eax
jle 0x49b099
xor ecx, ecx
mov ebx, dword [esi]
mov eax, ecx
add eax, ebx
mov edi, dword [eax + 0x14]
test edi, edi
jne 0x49b081
lea edi, [eax + 0xc]
mov dword [eax + 0x14], edi
mov edi, dword [eax + 0x24]
test edi, edi
jne 0x49b08e
lea edi, [eax + 0x1c]
mov dword [eax + 0x24], edi
mov eax, dword [esi + 0x10]
inc edx
add ecx, 0x28
cmp edx, eax
jl 0x49b06e
mov eax, dword [esp + 0x18]
pop edi
test eax, eax
pop ebx
je 0x49b0ab
push esi
mov ecx, ebp
call fcn.0049b2b0
pop esi
pop ebp
ret 0xc