Function at 0x1004a060
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10094a87
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x100bb084]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x3c], edi
call fcn.10049be0
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
xor eax, eax
movq qword [ebp - 0x20], xmm0
xor ebx, ebx
mov dword [ebp - 0x80], eax
xor edx, edx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x48], eax
mov eax, dword [edi + 0x21c]
sub eax, dword [edi + 0x218]
sar eax, 5
test eax, eax
je 0x1004a18f
xor esi, esi
mov dword [ebp - 0x44], esi
nop dword [eax + eax]
mov ecx, dword [edi + 0x218]
mov eax, dword [esi + ecx + 0x18]
or eax, dword [esi + ecx + 0x1c]
je 0x1004a16b
mov eax, ecx
cmp dword [esi + eax], 0
je 0x1004a16b
mov esi, eax
add esi, dword [ebp - 0x44]
cmp esi, edx
jae 0x1004a136
cmp ebx, esi
ja 0x1004a136
sub esi, ebx
cmp edx, dword [ebp - 0x80]
jne 0x1004a121
push ecx
lea ecx, [ebp - 0x20]
call fcn.1004b3e0
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x80], eax
and esi, 0xffffffe0
test edx, edx
je 0x1004a162
movups xmm0, xmmword [esi + ebx]
movups xmmword [edx], xmm0
movups xmm0, xmmword [esi + ebx + 0x10]
jmp 0x1004a15e
cmp edx, dword [ebp - 0x80]
jne 0x1004a150
push ecx
lea ecx, [ebp - 0x20]
call fcn.1004b3e0
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x80], eax
test edx, edx
je 0x1004a162
movups xmm0, xmmword [esi]
movups xmmword [edx], xmm0
movups xmm0, xmmword [esi + 0x10]
movups xmmword [edx + 0x10], xmm0
mov esi, dword [ebp - 0x44]
add edx, 0x20
mov dword [ebp - 0x1c], edx
mov eax, dword [edi + 0x21c]
add esi, 0x20
mov ecx, dword [ebp - 0x48]
sub eax, dword [edi + 0x218]
inc ecx
sar eax, 5
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], esi
cmp ecx, eax
jb 0x1004a0e0
mov esi, edx
sub esi, ebx
cmp esi, 0x20
jae 0x1004a209
mov eax, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
lea ebx, [edi + 0x1d0]
mov edi, 0xc
mov esi, dword [ebx]
test esi, esi
je 0x1004a1c5
push 4
push esi
call eax
test eax, eax
jne 0x1004a1c0
push eax
mov ecx, esi
call dword [0x100ad890]
mov eax, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
add ebx, 4
sub edi, 1
jne 0x1004a1a8
mov edi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x20]
mov esi, dword [edi + 0x204]
mov ecx, dword [edi + 0x188]
mov dword [ebp - 0x3c], ecx
test esi, esi
je 0x1004a1fa
push 4
push esi
call eax
test eax, eax
jne 0x1004a1fa
push dword [ebp - 0x3c]
mov ecx, esi
call dword [0x100ad8f8]
mov dword [edi + 0x18c], 1
jmp 0x1004a960
lea eax, [ebp - 0x3c]
sar esi, 5
push eax
push esi
mov ecx, ebx
mov dword [ebp - 0x3c], 0x100409b0
mov dword [ebp - 0x90], esi
call fcn.1004b950
movd xmm0, esi
mov eax, esi
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100af760]
divsd xmm0, qword [0x100aee18]
movsd qword [ebp - 0x8c], xmm0
fld qword [ebp - 0x8c]
fstp qword [esp]
call fcn.10078380
fstp qword [ebp - 0x8c]
movsd xmm0, qword [ebp - 0x8c]
movsd qword [esp], xmm0
call fcn.10033060
add esp, 8
call fcn.10079ae0
mov edx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
or ecx, 0xffffffff
mov dword [edi + 0x18c], eax
mov eax, dword [ebp + 8]
lea eax, [eax + eax*2]
shl eax, 2
mov dword [ebp - 0x88], eax
lea esi, [eax - 0xc]
mov dword [ebp - 0x3c], esi
cmp esi, eax
jge 0x1004a933
inc ecx
mov dword [ebp - 0x4c], ecx
cmp ecx, 0xb
jg 0x1004a933
mov eax, dword [ebp - 0x90]
dec eax
cmp esi, eax
jg 0x1004a8fa
shl esi, 5
mov ecx, dword [esi + ebx]
test ecx, ecx
je 0x1004a8f7
mov eax, 0x10624dd3
mul ecx
shr edx, 6
imul eax, edx, 0x3e8
push eax
call dword [0x100ad844]
mov dword [ebp - 0x84], eax
test eax, eax
je 0x1004a8f1
mov dword [ebp - 0x24], 0xf
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x38], 0
mov byte [ebp - 4], 1
mov ecx, eax
mov edx, dword [esi + ebx]
call fcn.1000ee90
mov dword [ebp - 0x48], eax
test eax, eax
je 0x1004a33d
cmp dword [eax + 0x3c], 0
je 0x1004a33d
push dword [esi + ebx]
xor edx, edx
lea ecx, [ebp - 0x7c]
push eax
call fcn.1000efe0
add esp, 8
lea ecx, [ebp - 0x38]
push eax
call fcn.1000f870
jmp 0x1004a390
push dword [esi + ebx]
mov edx, dword [ebp - 0x84]
lea ecx, [ebp - 0x7c]
push 0
call fcn.1000efe0
add esp, 8
mov dword [ebp - 0x44], eax
lea ecx, [ebp - 0x38]
cmp ecx, eax
je 0x1004a38c
mov eax, dword [ebp - 0x24]
cmp eax, 0x10
jb 0x1004a36f
inc eax
push eax
push dword [ebp - 0x38]
call fcn.100048f0
push dword [ebp - 0x44]
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 0xf
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x38], 0
call fcn.100042c0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x68]
cmp eax, 0x10
jb 0x1004a3a5
inc eax
lea ecx, [ebp - 0x7c]
push eax
push dword [ebp - 0x7c]
call fcn.100048f0
mov eax, dword [ebp - 0x4c]
mov ecx, dword [edi + 0x20c]
lea edx, [eax + eax*4]
mov eax, dword [esi + ebx + 0x18]
shl edx, 3
mov dword [ebp - 0x44], edx
mov dword [ecx + edx + 0x20], eax
mov eax, dword [esi + ebx + 0x1c]
mov dword [ecx + edx + 0x24], eax
mov ecx, dword [edi + 0x20c]
mov eax, dword [esi + ebx]
mov dword [edx + ecx + 0x1c], eax
mov eax, dword [edi + 0x20c]
cmp dword [edx + eax + 0x18], 0
je 0x1004a482
mov eax, dword [edx + eax + 0x18]
add eax, 4
mov dword [ebp - 0x40], eax
je 0x1004a40e
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004a40b
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x38]
push eax
call dword [0x100ad858]
mov edx, dword [ebp - 0x44]
mov eax, dword [edi + 0x20c]
mov ecx, dword [ebp - 0x84]
mov eax, dword [edx + eax + 0x18]
mov dword [eax + 0x60], ecx
mov eax, dword [edi + 0x20c]
mov ecx, dword [ebp - 0x48]
mov eax, dword [eax + edx + 0x18]
mov dword [eax + 0x64], ecx
mov eax, dword [edi + 0x20c]
mov eax, dword [edx + eax + 0x18]
mov dword [eax + 0x68], 0
mov eax, ecx
mov ecx, dword [ebp - 0x84]
test eax, eax
je 0x1004a460
movsx eax, word [eax + 0x4e]
mov dword [ebp - 0x40], eax
movsx eax, word [ecx + 0x5e]
mov ecx, dword [ebp - 0x40]
add ecx, eax
jmp 0x1004a464
movsx ecx, word [ecx + 0x5e]
mov eax, dword [edi + 0x20c]
mov eax, dword [edx + eax + 0x18]
mov dword [eax + 0x6c], ecx
mov eax, dword [edi + 0x20c]
mov ecx, dword [edx + eax + 0x18]
mov eax, dword [esi + ebx + 0x10]
mov dword [ecx + 0x44], eax
mov eax, dword [edi + 0x20c]
mov eax, dword [edx + eax + 0x14]
mov dword [ebp - 0x40], eax
test eax, eax
je 0x1004a4ad
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004a4ad
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x38]
push eax
call dword [0x100ad8c4]
push dword [ebp - 0x48]
mov edx, dword [ebp - 0x84]
lea ecx, [ebp - 0x7c]
call fcn.1000f330
add esp, 4
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 3
mov ecx, dword [edi + 0x20c]
mov eax, dword [eax + ecx]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x1004a4f4
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004a4f4
push dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
call dword [0x100ad8f4]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x68]
cmp eax, 0x10
jb 0x1004a50d
inc eax
lea ecx, [ebp - 0x7c]
push eax
push dword [ebp - 0x7c]
call fcn.100048f0
mov edx, dword [esi + ebx + 0x10]
lea ecx, [ebp - 0x7c]
call fcn.1000f610
mov edx, eax
mov byte [ebp - 4], 4
cmp dword [edx + 0x14], 0x10
jb 0x1004a527
mov edx, dword [edx]
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], 0
mov byte [ebp - 0x64], 0
cmp byte [edx], 0
jne 0x1004a542
xor ecx, ecx
jmp 0x1004a55a
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x40], eax
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004a550
sub ecx, dword [ebp - 0x40]
push ecx
push edx
lea ecx, [ebp - 0x64]
call fcn.10004a40
mov ecx, dword [ebp - 0x44]
mov byte [ebp - 4], 5
mov eax, dword [edi + 0x20c]
mov eax, dword [ecx + eax + 4]
mov dword [ebp - 0x40], eax
test eax, eax
je 0x1004a596
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004a596
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x64]
push eax
call dword [0x100ad8f4]
mov eax, dword [ebp - 0x50]
cmp eax, 0x10
jb 0x1004a5ab
inc eax
lea ecx, [ebp - 0x64]
push eax
push dword [ebp - 0x64]
call fcn.100048f0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], 0
mov byte [ebp - 0x64], 0
cmp eax, 0x10
jb 0x1004a5d6
inc eax
lea ecx, [ebp - 0x7c]
push eax
push dword [ebp - 0x7c]
call fcn.100048f0
mov eax, dword [esi + ebx + 0xc]
cmp eax, 1
jne 0x1004a69f
mov edx, dword [esi + ebx + 8]
push ecx
lea ecx, [ebp - 0xa8]
call fcn.10012960
add esp, 4
mov byte [ebp - 4], 6
cmp dword [eax + 0x14], 0x10
jb 0x1004a602
mov eax, dword [eax]
movaps xmm0, xmmword [0x100af410]
xor ecx, ecx
push eax
movups xmmword [ebp - 0x60], xmm0
mov word [ebp - 0x50], 0x4117
mov byte [ebp - 0x4e], 0
nop word [eax + eax]
mov al, byte [ebp - 0x60]
xor byte [ebp + ecx - 0x5f], al
inc ecx
cmp ecx, 0x11
jb 0x1004a620
sub esp, 0x18
mov byte [ebp - 0x4e], 0
mov edx, esp
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x1004a65c
mov eax, dword [edx]
jmp 0x1004a65e
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x5f], 0
jne 0x1004a66b
xor ecx, ecx
jmp 0x1004a67e
lea ecx, [ebp - 0x5f]
lea eax, [ecx + 1]
mov dword [ebp - 0x40], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004a674
sub ecx, dword [ebp - 0x40]
push ecx
lea eax, [ebp - 0x5f]
mov ecx, edx
push eax
call fcn.10004a40
lea eax, [ebp - 0x7c]
push eax
call fcn.100043b0
add esp, 0x20
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 7
jmp 0x1004a712
cmp eax, 2
jne 0x1004a788
mov edx, dword [esi + ebx + 8]
push ecx
lea ecx, [ebp - 0xa8]
call fcn.10012960
add esp, 4
mov byte [ebp - 4], 8
cmp dword [eax + 0x14], 0x10
jb 0x1004a6c7
mov eax, dword [eax]
movaps xmm0, xmmword [0x100afc20]
xor ecx, ecx
push eax
movups xmmword [ebp - 0x60], xmm0
mov word [ebp - 0x50], 0x386e
mov byte [ebp - 0x4e], 0
nop
mov al, byte [ebp - 0x60]
xor byte [ebp + ecx - 0x5f], al
inc ecx
cmp ecx, 0x11
jb 0x1004a6e0
sub esp, 0x18
mov byte [ebp - 0x4e], 0
lea eax, [ebp - 0x5f]
mov ecx, esp
push eax
call fcn.10004b40
lea eax, [ebp - 0x7c]
push eax
call fcn.100043b0
add esp, 0x20
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 9
mov ecx, dword [edi + 0x20c]
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + ecx + 8]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x1004a73f
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004a73f
push dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
call dword [0x100ad8f4]
mov eax, dword [ebp - 0x68]
cmp eax, 0x10
jb 0x1004a754
inc eax
lea ecx, [ebp - 0x7c]
push eax
push dword [ebp - 0x7c]
call fcn.100048f0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x94]
mov byte [ebp - 0x7c], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0xf
cmp eax, 0x10
jb 0x1004a788
inc eax
lea ecx, [ebp - 0xa8]
push eax
push dword [ebp - 0xa8]
call fcn.100048f0
mov edx, dword [esi + ebx + 4]
push ecx
lea ecx, [ebp - 0xa8]
call fcn.10012960
add esp, 4
mov byte [ebp - 4], 0xa
cmp dword [eax + 0x14], 0x10
jb 0x1004a7a7
mov eax, dword [eax]
movaps xmm0, xmmword [str._a_n_au_tvRFISNSN]
xor ecx, ecx
push eax
movups xmmword [ebp - 0x60], xmm0
mov dword [ebp - 0x50], 0x540207
nop dword [eax]
mov al, byte [ebp - 0x60]
xor byte [ebp + ecx - 0x5f], al
inc ecx
cmp ecx, 0x12
jb 0x1004a7c0
sub esp, 0x18
mov byte [ebp - 0x4d], 0
mov edx, esp
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x1004a7fc
mov eax, dword [edx]
jmp 0x1004a7fe
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x5f], 0
jne 0x1004a80b
xor ecx, ecx
jmp 0x1004a81a
lea ecx, [ebp - 0x5f]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1004a811
sub ecx, esi
push ecx
lea eax, [ebp - 0x5f]
mov ecx, edx
push eax
call fcn.10004a40
lea eax, [ebp - 0x7c]
push eax
call fcn.100043b0
add esp, 0x20
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 0xb
mov ecx, dword [edi + 0x20c]
mov esi, dword [eax + ecx + 0xc]
test esi, esi
je 0x1004a862
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004a862
push dword [ebp - 0x40]
mov ecx, esi
call dword [0x100ad8f4]
mov eax, dword [ebp - 0x68]
cmp eax, 0x10
jb 0x1004a877
inc eax
lea ecx, [ebp - 0x7c]
push eax
push dword [ebp - 0x7c]
call fcn.100048f0
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x68], 0xf
mov dword [ebp - 0x6c], 0
mov byte [ebp - 0x7c], 0
cmp eax, 0x10
jb 0x1004a8a7
inc eax
lea ecx, [ebp - 0xa8]
push eax
push dword [ebp - 0xa8]
call fcn.100048f0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x24]
cmp eax, 0x10
jb 0x1004a8c0
inc eax
lea ecx, [ebp - 0x38]
push eax
push dword [ebp - 0x38]
call fcn.100048f0
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x24], 0xf
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x38], 0
mov esi, dword [edi + ecx*4 + 0x1d0]
test esi, esi
je 0x1004a91a
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1004a917
push 1
jmp 0x1004a90f
mov edx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
mov ecx, dword [ebp - 0x4c]
mov esi, dword [edi + ecx*4 + 0x1d0]
test esi, esi
je 0x1004a91a
push 4
push esi
call edx
test eax, eax
jne 0x1004a917
push eax
mov ecx, esi
call dword [0x100ad890]
mov ecx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x3c]
mov edx, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
inc esi
mov dword [ebp - 0x3c], esi
cmp esi, dword [ebp - 0x88]
jl 0x1004a2a5
mov esi, dword [edi + 0x204]
mov eax, dword [edi + 0x188]
mov dword [ebp - 0x88], eax
test esi, esi
je 0x1004a960
push 4
push esi
call edx
test eax, eax
jne 0x1004a960
push dword [ebp - 0x88]
mov ecx, esi
call dword [0x100ad8f8]
test ebx, ebx
je 0x1004a973
mov eax, dword [ebp - 0x80]
sub eax, ebx
sar eax, 5
push eax
push ebx
call fcn.1004d1d0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1005baa0
mov esp, ebp
pop ebp
ret 4