Function at 0x49f2e4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push edi
xor edi, edi
cmp dword [0x4f3770], edi
je 0x49f6ca
mov eax, dword [0x4f3770]
test byte [eax], 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 0x49f66b
mov dword [ebp - 0x24], edi
cmp dword [eax + 4], edi
jbe 0x49f66b
lea esi, [eax + 0xc]
mov dword [ebp - 0x28], esi
mov edx, dword [esi + 4]
mov esi, dword [esi]
mov eax, dword [0x43b758]
shr esi, 1
and esi, 0xfffffff
and edx, 0xfffffff
add esi, 0x400000
mov ecx, 0x400000
sub ecx, eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 8], esi
mov dword [ebp - 0x34], ecx
jne 0x49f3c9
mov ebx, dword [ebp - 0x40]
mov eax, edi
test edx, edx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], eax
je 0x49f64f
mov edi, dword [ebp - 0x20]
movzx ecx, byte [eax + esi]
sub ecx, 0x6296f86b
add ebx, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x273c
ror ecx, 5
rol eax, 5
xor eax, ecx
mov ecx, 0x9d690795
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, edi
jb 0x49f36e
jmp 0x49f647
mov ecx, dword [0x40003c]
lea eax, [edx + esi]
mov dword [ebp - 0x1c], eax
mov eax, esi
sub eax, 0x400000
mov ebx, eax
add edx, eax
mov esi, eax
and ebx, 0xfffff000
sub esi, ebx
mov eax, edx
and eax, 0xfffff000
mov dword [ebp - 0x20], esi
mov esi, dword [ecx + 0x4000a0]
sub edx, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ecx + 0x4000a4]
add esi, 0x400000
add eax, esi
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], eax
cmp esi, eax
je 0x49f428
cmp dword [esi], ebx
jae 0x49f425
add esi, dword [esi + 4]
cmp esi, eax
jne 0x49f41a
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], edi
cmp esi, eax
je 0x49f460
cmp dword [esi], ebx
jne 0x49f460
mov ecx, dword [esi + 4]
sub ecx, 8
shr ecx, 1
je 0x49f460
mov ebx, dword [ebp - 0x20]
lea edx, [esi + 8]
movzx eax, word [edx]
and eax, 0xfff
cmp eax, ebx
jae 0x49f45d
mov eax, dword [ebp - 4]
inc eax
add edx, 2
mov dword [ebp - 4], eax
cmp eax, ecx
jne 0x49f443
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x40]
mov ecx, dword [ebp - 8]
cmp esi, eax
je 0x49f5ea
mov eax, dword [ebp - 0x10]
cmp dword [esi], eax
ja 0x49f5ea
mov eax, dword [esi + 4]
mov dword [ebp - 0x20], eax
add eax, 0xfffffff8
shr eax, 1
cmp dword [ebp - 4], eax
jne 0x49f4ab
add esi, dword [ebp - 0x20]
mov dword [ebp - 0x18], esi
cmp esi, dword [ebp - 0xc]
je 0x49f5ea
mov eax, dword [ebp - 0x10]
cmp dword [esi], eax
ja 0x49f5ea
mov dword [ebp - 4], edi
jmp 0x49f47c
mov eax, dword [ebp - 0x10]
cmp dword [esi], eax
jne 0x49f4c8
mov eax, dword [ebp - 4]
movzx eax, word [esi + eax*2 + 8]
and eax, 0xfff
cmp eax, dword [ebp - 0x2c]
jae 0x49f5ea
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 0x49f469
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 - 0x20], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x30], ecx
je 0x49f572
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
mov esi, ecx
movzx ecx, byte [eax + edi]
sub ecx, 0x6296f86b
add ebx, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x273c
ror ecx, 5
rol eax, 5
xor eax, ecx
mov ecx, 0x9d690795
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 0x49f517
mov eax, dword [ebp - 0x20]
xor edi, edi
mov eax, dword [eax]
sub eax, dword [ebp - 0x34]
mov esi, edi
mov dword [ebp - 0x30], eax
mov edi, 0x9d690795
movzx ecx, byte [ebp + esi - 0x30]
sub ecx, 0x6296f86b
add ebx, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x273c
ror ecx, 5
rol eax, 5
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 0x49f581
mov ecx, dword [ebp - 0x20]
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 0x49f469
sub dword [ebp - 0x1c], ecx
mov esi, edi
je 0x49f64f
mov edi, dword [ebp - 0x1c]
movzx ecx, byte [esi + ecx]
sub ecx, 0x6296f86b
add ebx, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x273c
ror ecx, 5
rol eax, 5
xor eax, ecx
mov ecx, 0x9d690795
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 0x49f5f4
xor edi, edi
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], edx
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x38]
inc ecx
add esi, 8
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], esi
cmp ecx, dword [eax + 4]
jb 0x49f328
cmp ebx, dword [0x4f3778]
jne 0x49f67b
cmp edx, dword [0x4f377c]
je 0x49f6c8
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 0x49f688
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