Function at 0x10051820
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10068b68
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push esi
push edi
mov eax, dword [0x1007c040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x2c], edi
lea eax, [edi + 0x110]
xor cl, cl
mov edx, eax
mov esi, 6
nop
cmp dword [edx - 4], 0
je 0x1005186b
cmp dword [edx], 0
jne 0x1005186d
inc cl
add edx, 0x14
sub esi, 1
jne 0x10051860
cmp cl, 6
jne 0x100519e9
movaps xmm0, xmmword [0x10074990]
xor ecx, ecx
movups xmmword [ebp - 0x24], xmm0
nop dword [eax + eax]
mov al, byte [ebp - 0x24]
xor byte [ebp + ecx - 0x23], al
inc ecx
cmp ecx, 0xe
jb 0x10051890
xorps xmm0, xmm0
mov byte [ebp - 0x15], 0
lea ecx, [ebp - 0x23]
mov dword [ebp - 0x4c], 0
movups xmmword [ebp - 0x5c], xmm0
mov dword [ebp - 0x48], 0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100518c0
sub ecx, edx
lea eax, [ebp - 0x23]
push ecx
push eax
lea ecx, [ebp - 0x5c]
call fcn.100051a0
mov dword [ebp - 4], 0
xor ecx, ecx
movaps xmm0, xmmword [0x10075620]
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x18], 0x2a7d7074
mov word [ebp - 0x14], 0x25
mov al, byte [ebp - 0x28]
xor byte [ebp + ecx - 0x27], al
inc ecx
cmp ecx, 0x14
jb 0x100518f7
xorps xmm0, xmm0
mov byte [ebp - 0x13], 0
lea ecx, [ebp - 0x27]
mov dword [ebp - 0x34], 0
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x30], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10051923
sub ecx, edx
lea eax, [ebp - 0x27]
push ecx
push eax
lea ecx, [ebp - 0x44]
call fcn.100051a0
push 0
push ecx
mov byte [ebp - 4], 1
lea eax, [ebp - 0x5c]
mov dword [esp], 0
push 0
push 0
push 0
push eax
lea eax, [ebp - 0x44]
push eax
push eax
call dword [0x10073660]
mov ecx, dword [ebp - 0x30]
cmp ecx, 0xf
jbe 0x1005198c
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10051982
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100519c8
push ecx
push edx
call fcn.100641c5
add esp, 8
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0xf
mov byte [ebp - 0x44], 0
cmp ecx, 0xf
jbe 0x10051bc7
mov edx, dword [ebp - 0x5c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100519ce
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100519ce
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100641c5
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor esi, esi
lea ecx, [esi + 6]
nop
cmp dword [eax - 4], 0
jbe 0x100519fe
cmp dword [eax], 0
jbe 0x100519fe
add esi, dword [eax + 4]
add eax, 0x14
sub ecx, 1
jne 0x100519f0
mov eax, dword [edi + 0x34]
mov edi, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push 4
push eax
mov dword [ebp - 0x10], eax
call edi
test eax, eax
jne 0x10051a5e
mov eax, dword [ebp - 0x10]
add eax, 0xe5
push 4
push eax
mov dword [ebp - 0x10], eax
call edi
test eax, eax
jne 0x10051a5e
mov eax, dword [ebp - 0x10]
mov al, byte [eax]
test al, al
je 0x10051a5e
mov edi, dword [ebp - 0x2c]
mov edi, dword [edi + 0x34]
test edi, edi
je 0x10051a58
push 4
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10051a58
push eax
mov ecx, edi
call dword [0x100735d4]
mov edi, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push ecx
mov edx, esi
lea ecx, [ebp - 0x8c]
call fcn.10010c60
add esp, 4
mov dword [ebp - 4], 2
cmp dword [eax + 0x14], 0xf
jbe 0x10051a7e
mov eax, dword [eax]
movaps xmm0, xmmword [0x10075450]
xor ecx, ecx
push eax
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x18], 0x1f494c
mov al, byte [ebp - 0x28]
xor byte [ebp + ecx - 0x27], al
inc ecx
cmp ecx, 0x12
jb 0x10051a93
sub esp, 0x18
mov byte [ebp - 0x15], 0
mov edx, esp
lea ecx, [ebp - 0x27]
xorps xmm0, xmm0
lea esi, [ecx + 1]
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10051ac3
sub ecx, esi
lea eax, [ebp - 0x27]
push ecx
push eax
mov ecx, edx
call fcn.100051a0
lea eax, [ebp - 0x74]
push eax
call fcn.10004d30
add esp, 0x20
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], 3
mov esi, dword [eax + 0x100]
test esi, esi
je 0x10051b0c
push 4
push esi
call edi
test eax, eax
jne 0x10051b0c
push dword [ebp - 0x10]
mov ecx, esi
call dword [0x10073638]
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x60]
cmp ecx, 0xf
jbe 0x10051b40
mov edx, dword [ebp - 0x74]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10051b36
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10051b82
push ecx
push edx
call fcn.100641c5
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x78]
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0xf
mov byte [ebp - 0x74], 0
cmp ecx, 0xf
jbe 0x10051b92
mov edx, dword [ebp - 0x8c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10051b88
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10051b88
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100641c5
add esp, 8
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x78], 0xf
mov byte [ebp - 0x8c], 0
mov esi, dword [eax + 0xfc]
test esi, esi
je 0x10051bc7
push 4
push esi
call edi
test eax, eax
jne 0x10051bc7
push 1
mov ecx, esi
call dword [0x100735d4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret