Function at 0x49fe02
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push edi
xor edi, edi
cmp dword [0x4f3760], edi
je 0x4a01d5
mov eax, dword [0x4f3760]
test byte [eax + 8], 1
push ebx
mov ebx, edi
mov edx, edi
push esi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], edx
je 0x4a0176
mov dword [ebp - 0x28], edi
cmp dword [eax + 4], edi
jbe 0x4a0176
add eax, 0x10
mov dword [ebp - 0x20], eax
mov esi, dword [eax - 4]
mov edx, dword [eax]
mov eax, dword [0x43b758]
mov ecx, 0xfffffff
shr esi, 1
mov ebx, 0x400000
and edx, ecx
and esi, ecx
add edx, ebx
mov ecx, ebx
sub ecx, eax
mov dword [ebp - 8], edx
mov dword [ebp - 0x34], ecx
jne 0x49fee1
mov edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
mov eax, edi
mov dword [ebp - 0x1c], eax
test esi, esi
je 0x4a015c
mov edi, dword [ebp - 8]
movzx ecx, byte [eax + edi]
mov eax, 0x5434ea14
add ecx, eax
add ebx, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x1ed8
ror ecx, 4
rol eax, 4
xor eax, ecx
mov ecx, 0x5434ea14
mul ecx
add eax, edx
mul ecx
lea ecx, [edx*2 - 0x7fffffff]
add ecx, eax
sar eax, 0x1f
and eax, 0x7fffffff
sub ecx, eax
mov eax, dword [ebp - 0x1c]
mov edx, ecx
sar edx, 0x1f
and edx, 0x7fffffff
add edx, ecx
add ebx, edx
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, esi
jb 0x49fe85
jmp 0x4a0154
mov ecx, dword [0x40003c]
lea eax, [edx + esi]
mov dword [ebp - 0x1c], eax
mov eax, edx
sub eax, ebx
add esi, eax
mov edx, eax
mov ebx, eax
mov eax, esi
and eax, 0xfffff000
sub esi, eax
mov dword [ebp - 0x2c], esi
mov esi, dword [ecx + 0x4000a0]
mov dword [ebp - 0x10], eax
mov eax, dword [ecx + 0x4000a4]
add esi, 0x400000
and edx, 0xfffff000
add eax, esi
sub ebx, edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], eax
cmp esi, eax
je 0x49ff3a
cmp dword [esi], edx
jae 0x49ff37
add esi, dword [esi + 4]
cmp esi, eax
jne 0x49ff2c
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], edi
cmp esi, eax
je 0x49ff6f
cmp dword [esi], edx
jne 0x49ff6f
mov ecx, dword [esi + 4]
sub ecx, 8
shr ecx, 1
je 0x49ff6f
lea edx, [esi + 8]
movzx eax, word [edx]
and eax, 0xfff
cmp eax, ebx
jae 0x49ff6c
mov eax, dword [ebp - 4]
inc eax
add edx, 2
mov dword [ebp - 4], eax
cmp eax, ecx
jne 0x49ff52
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
mov ecx, dword [ebp - 8]
cmp esi, eax
je 0x4a00f6
mov eax, dword [ebp - 0x10]
cmp dword [esi], eax
ja 0x4a00f6
mov eax, dword [esi + 4]
mov dword [ebp - 0x24], eax
add eax, 0xfffffff8
shr eax, 1
cmp dword [ebp - 4], eax
jne 0x49ffba
add esi, dword [ebp - 0x24]
mov dword [ebp - 0x18], esi
cmp esi, dword [ebp - 0xc]
je 0x4a00f6
mov eax, dword [ebp - 0x10]
cmp dword [esi], eax
ja 0x4a00f6
mov dword [ebp - 4], edi
jmp 0x49ff8b
mov eax, dword [ebp - 0x10]
cmp dword [esi], eax
jne 0x49ffd7
mov eax, dword [ebp - 4]
movzx eax, word [esi + eax*2 + 8]
and eax, 0xfff
cmp eax, dword [ebp - 0x2c]
jae 0x4a00f6
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
inc eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
mov ecx, 0xf000
test word [esi + eax*2 + 8], cx
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
je 0x49ff78
mov eax, dword [ebp - 0x14]
movzx ecx, word [esi + eax*2 + 8]
mov eax, dword [esi]
and ecx, 0xfff
lea eax, [eax + 0x400000]
add eax, ecx
mov ecx, eax
sub ecx, dword [ebp - 8]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x30], ecx
je 0x4a0082
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
mov esi, ecx
movzx ecx, byte [eax + edi]
mov eax, 0x5434ea14
add ecx, eax
add ebx, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x1ed8
ror ecx, 4
rol eax, 4
xor eax, ecx
mov ecx, 0x5434ea14
mul ecx
add eax, edx
mul ecx
lea ecx, [edx*2 - 0x7fffffff]
add ecx, eax
sar eax, 0x1f
and eax, 0x7fffffff
sub ecx, eax
mov eax, dword [ebp - 0x14]
mov edx, ecx
sar edx, 0x1f
and edx, 0x7fffffff
add edx, ecx
add ebx, edx
inc eax
mov dword [ebp - 0x14], eax
cmp eax, esi
jb 0x4a0026
mov eax, dword [ebp - 0x24]
xor edi, edi
mov eax, dword [eax]
sub eax, dword [ebp - 0x34]
mov esi, edi
mov dword [ebp - 0x30], eax
mov edi, 0x5434ea14
movzx ecx, byte [ebp + esi - 0x30]
add ecx, edi
add ebx, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x1ed8
ror ecx, 4
rol eax, 4
xor eax, ecx
mul edi
add eax, edx
mul edi
lea ecx, [edx*2 - 0x7fffffff]
add ecx, eax
sar eax, 0x1f
and eax, 0x7fffffff
sub ecx, eax
mov edx, ecx
sar edx, 0x1f
and edx, 0x7fffffff
add edx, ecx
add ebx, edx
inc esi
cmp esi, 4
jb 0x4a0091
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 8], ecx
xor edi, edi
jmp 0x49ff78
sub dword [ebp - 0x1c], ecx
mov esi, edi
je 0x4a015c
mov edi, dword [ebp - 0x1c]
movzx ecx, byte [esi + ecx]
mov eax, 0x5434ea14
add ecx, eax
add ebx, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x1ed8
ror ecx, 4
rol eax, 4
xor eax, ecx
mov ecx, 0x5434ea14
mul ecx
add eax, edx
mul ecx
lea ecx, [edx*2 - 0x7fffffff]
add ecx, eax
sar eax, 0x1f
and eax, 0x7fffffff
sub ecx, eax
mov edx, ecx
sar edx, 0x1f
and edx, 0x7fffffff
add edx, ecx
mov ecx, dword [ebp - 8]
add ebx, edx
inc esi
cmp esi, edi
jb 0x4a0100
xor edi, edi
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], edx
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x38]
add dword [ebp - 0x20], 8
inc ecx
cmp ecx, dword [eax + 4]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], ecx
jb 0x49fe47
cmp ebx, dword [0x4f3768]
jne 0x4a0186
cmp edx, dword [0x4f376c]
je 0x4a01d3
mov ecx, dword [0x4f3780]
mov ebx, 0xffff
mov eax, ebx
imul ecx, ecx, 0x343fd
add ecx, 0x269ec3
mov edx, ecx
shr edx, 0x10
shl edi, 0x10
shr eax, 0x10
or edi, edx
test eax, eax
jne 0x4a0193
mov dword [0x4f3780], ecx
call fcn.004a01d8
mov esi, eax
xor edx, edx
mov eax, edi
div ebx
and esi, 0xfffff000
lea ecx, [edx + 1]
mov edx, esi
call fcn.004a0359
pop esi
pop ebx
pop edi
leave
ret