Function at 0x49f6cd
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
xor ebx, ebx
cmp dword [0x4f3740], ebx
je 0x49fa39
mov eax, dword [0x4f3740]
test byte [eax], 1
push esi
push edi
mov edi, ebx
mov esi, ebx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], esi
je 0x49f9da
mov dword [ebp - 0x24], ebx
cmp dword [eax + 4], ebx
jbe 0x49f9da
lea edx, [eax + 0xc]
mov dword [ebp - 0x28], edx
mov esi, dword [edx + 4]
mov edx, dword [edx]
mov eax, dword [0x43b758]
shr edx, 1
and edx, 0xfffffff
and esi, 0xfffffff
add edx, 0x400000
mov ecx, 0x400000
sub ecx, eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], edx
mov dword [ebp - 0x34], ecx
jne 0x49f796
mov edi, dword [ebp - 0x44]
mov eax, ebx
test esi, esi
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0x18], eax
je 0x49f9be
mov ebx, edx
movzx ecx, byte [eax + ebx]
mov edx, 0x7d420b0b
add ecx, edx
add edi, ecx
add ecx, esi
mov eax, ecx
imul eax, eax, 0x188c
ror ecx, 0xb
rol eax, 0xb
xor eax, ecx
mul edx
lea esi, [edx + eax]
mov eax, dword [ebp - 0x18]
imul esi, esi, 0x7d420b0b
ror esi, 0xc
add edi, esi
inc eax
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0x20]
jb 0x49f756
jmp 0x49f9b6
mov ecx, dword [0x40003c]
lea eax, [edx + esi]
mov dword [ebp - 0x18], eax
mov eax, edx
sub eax, 0x400000
add esi, eax
mov edi, eax
mov dword [ebp - 8], eax
mov eax, esi
and edi, 0xfffff000
sub dword [ebp - 8], edi
and eax, 0xfffff000
sub esi, eax
mov dword [ebp - 0x10], edi
mov edi, dword [ecx + 0x4000a0]
mov dword [ebp - 0x2c], esi
mov esi, dword [ecx + 0x4000a4]
add edi, 0x400000
add esi, edi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], esi
cmp edi, esi
je 0x49f7fa
cmp dword [edi], eax
jae 0x49f7f7
add edi, dword [edi + 4]
cmp edi, esi
jne 0x49f7ec
mov dword [ebp - 0x14], edi
mov ecx, ebx
cmp edi, esi
je 0x49f829
cmp dword [edi], eax
jne 0x49f829
mov esi, dword [edi + 4]
sub esi, 8
shr esi, 1
je 0x49f829
lea edx, [edi + 8]
movzx eax, word [edx]
and eax, 0xfff
cmp eax, dword [ebp - 8]
jae 0x49f826
inc ecx
add edx, 2
cmp ecx, esi
jne 0x49f811
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x40]
mov dword [ebp - 8], eax
cmp edi, dword [ebp - 0x1c]
je 0x49f973
mov eax, dword [ebp - 0xc]
cmp dword [edi], eax
ja 0x49f973
mov eax, dword [edi + 4]
mov dword [ebp - 0x20], eax
add eax, 0xfffffff8
shr eax, 1
cmp ecx, eax
jne 0x49f873
add edi, dword [ebp - 0x20]
mov dword [ebp - 0x14], edi
cmp edi, dword [ebp - 0x1c]
je 0x49f973
mov eax, dword [ebp - 0xc]
cmp dword [edi], eax
ja 0x49f973
mov ecx, ebx
jmp 0x49f846
mov eax, dword [ebp - 0xc]
cmp dword [edi], eax
jne 0x49f88d
movzx eax, word [edi + ecx*2 + 8]
and eax, 0xfff
cmp eax, dword [ebp - 0x2c]
jae 0x49f973
mov eax, ecx
mov edx, 0xf000
inc ecx
test word [edi + eax*2 + 8], dx
mov edx, dword [ebp - 4]
mov dword [ebp - 0x38], ecx
je 0x49f832
movzx ecx, word [edi + eax*2 + 8]
mov eax, dword [edi]
and ecx, 0xfff
lea eax, [eax + 0x400000]
add eax, ecx
mov ecx, eax
sub ecx, edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x30], ecx
je 0x49f911
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov edi, edx
movzx ecx, byte [eax + edi]
mov edx, 0x7d420b0b
add ecx, edx
add ebx, ecx
add ecx, esi
mov eax, ecx
imul eax, eax, 0x188c
ror ecx, 0xb
rol eax, 0xb
xor eax, ecx
mul edx
lea esi, [edx + eax]
mov eax, dword [ebp - 0x10]
imul esi, esi, 0x7d420b0b
ror esi, 0xc
add ebx, esi
inc eax
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x30]
jb 0x49f8ce
mov eax, dword [ebp - 0x20]
mov dword [ebp - 8], ebx
xor ebx, ebx
mov eax, dword [eax]
sub eax, dword [ebp - 0x34]
mov edi, ebx
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x30], eax
movzx ecx, byte [ebp + edi - 0x30]
mov edx, 0x7d420b0b
add ecx, edx
add ebx, ecx
add ecx, esi
mov eax, ecx
imul eax, eax, 0x188c
ror ecx, 0xb
rol eax, 0xb
xor eax, ecx
mul edx
lea esi, [edx + eax]
imul esi, esi, 0x7d420b0b
ror esi, 0xc
add ebx, esi
inc edi
mov dword [ebp - 0x44], ebx
cmp edi, 4
jb 0x49f91e
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
add edx, 4
mov dword [ebp - 8], ebx
mov dword [ebp - 0x40], esi
mov dword [ebp - 4], edx
xor ebx, ebx
jmp 0x49f832
sub dword [ebp - 0x18], edx
mov edi, dword [ebp - 8]
mov dword [ebp - 0x38], ebx
je 0x49f9be
movzx ecx, byte [ebx + edx]
mov edx, 0x7d420b0b
add ecx, edx
add edi, ecx
add ecx, esi
mov eax, ecx
imul eax, eax, 0x188c
ror ecx, 0xb
rol eax, 0xb
xor eax, ecx
mul edx
lea esi, [edx + eax]
mov edx, dword [ebp - 4]
imul esi, esi, 0x7d420b0b
ror esi, 0xc
add edi, esi
inc ebx
cmp ebx, dword [ebp - 0x18]
jb 0x49f97e
xor ebx, ebx
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], esi
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x3c]
inc ecx
add edx, 8
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], edx
cmp ecx, dword [eax + 4]
jb 0x49f711
cmp edi, dword [0x4f3748]
jne 0x49f9ea
cmp esi, dword [0x4f374c]
je 0x49fa37
mov ecx, dword [0x4f3780]
mov edi, 0xffff
mov eax, edi
imul ecx, ecx, 0x343fd
add ecx, 0x269ec3
mov edx, ecx
shr edx, 0x10
shl ebx, 0x10
shr eax, 0x10
or ebx, edx
test eax, eax
jne 0x49f9f7
mov dword [0x4f3780], ecx
call fcn.004a01d8
mov esi, eax
xor edx, edx
mov eax, ebx
div edi
and esi, 0xfffff000
lea ecx, [edx + 1]
mov edx, esi
call fcn.004a0359
pop edi
pop esi
pop ebx
leave
ret