Function at 0x10051530
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10081073
mov eax, dword fs:[0]
push eax
sub esp, 0x90
push esi
push edi
mov eax, dword [0x10091040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x20], edi
mov edx, dword [ebp + 8]
mov eax, dword [edi]
mov dword [ebp - 0x2c], 1
mov dword [0x100936c4], eax
test edx, edx
jne 0x10051589
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 0xc]
cmp eax, 1
jne 0x100515a4
cmp edx, dword [edi + 4]
jne 0x100519e0
call fcn.10051da0
jmp 0x100519e0
and eax, 0xf0000
cmp eax, 0x10000
je 0x10051990
cmp eax, 0x40000
je 0x100515f3
cmp eax, 0x80000
jne 0x100519e0
mov esi, dword [edi]
test esi, esi
je 0x100519e0
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x100519e0
lea ecx, [esi + 0xd0]
xor dl, dl
call fcn.10014ea0
jmp 0x100519e0
mov esi, dword [edi]
test esi, esi
je 0x10051613
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10051613
lea ecx, [esi + 0xd0]
xor dl, dl
call fcn.10014ea0
mov edx, dword [edi + 0x28]
mov eax, edx
mov ecx, dword [edi + 0x24]
sub eax, ecx
sar eax, 3
mov dword [ebp - 0x24], 0
test eax, eax
je 0x10051676
xor esi, esi
mov dword [ebp - 0x2c], esi
mov esi, dword [ecx + esi + 4]
test esi, esi
je 0x10051658
mov esi, dword [esi]
test esi, esi
je 0x10051658
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x10051658
push pe_nt_image_headers32
mov ecx, esi
call dword [0x10088b28]
mov edx, dword [edi + 0x28]
mov eax, edx
mov ecx, dword [edi + 0x24]
sub eax, ecx
mov esi, dword [ebp - 0x2c]
inc dword [ebp - 0x24]
add esi, 8
sar eax, 3
mov dword [ebp - 0x2c], esi
cmp dword [ebp - 0x24], eax
jb 0x10051630
cmp ecx, edx
je 0x100519e0
mov esi, dword [ebp + 8]
mov edi, dword [ecx + 4]
test edi, edi
je 0x1005168c
cmp dword [edi], esi
je 0x10051698
add ecx, 8
cmp ecx, edx
jne 0x10051681
jmp 0x100519e0
mov eax, dword [edi + 0x50]
test eax, eax
je 0x100519e0
cmp dword [edi + 0x54], 0
lea ecx, [edi + 0x54]
mov dword [ebp - 0x2c], ecx
je 0x100519e0
mov ecx, dword [eax]
test ecx, ecx
je 0x100519e0
mov esi, dword [0x10088ac8]
mov eax, 0x10624dd3
mul ecx
mov ecx, 0xd78ae8
shr edx, 6
imul eax, edx, 0x3e8
push eax
call fcn.10014f70
mov ecx, eax
call esi
mov dword [ebp - 0x24], eax
test eax, eax
je 0x100519e0
mov ecx, dword [ebp - 0x20]
xor eax, eax
mov edx, dword [ecx + 0x28]
mov esi, dword [ecx + 0x24]
sub edx, esi
sar edx, 3
mov dword [ebp - 0x20], edx
test edx, edx
je 0x10051723
lea edx, [esi + 4]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x24], esi
nop dword [eax]
mov esi, dword [edx]
test esi, esi
je 0x1005171a
cmp esi, edi
je 0x10051726
inc eax
add edx, 8
cmp eax, dword [ebp - 0x20]
jb 0x10051710
or eax, 0xffffffff
cmp dword [ecx + 0x18], eax
jne 0x100519e0
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
mov eax, dword [eax]
mov eax, dword [eax]
add eax, dword [edx]
mov dword [ecx + 0x14], eax
mov esi, dword [edi]
mov edi, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test esi, esi
je 0x10051760
push 4
push esi
call edi
test eax, eax
jne 0x10051760
push 0x4000
mov ecx, esi
call dword [0x10088b28]
mov ecx, 0xd78d38
call fcn.10014f70
test eax, eax
je 0x10051782
push 4
push eax
call edi
test eax, eax
jne 0x10051782
push 0xffffffffffffffff
call dword [0x10088bb8]
add esp, 4
mov byte [ebp - 0x1c], 0x22
mov cl, 0x5a
xor cl, byte [ebp - 0x1c]
mov al, 0x67
xor al, byte [ebp - 0x1c]
mov ch, 0x43
mov byte [ebp - 0x1b], al
mov dl, 0x41
mov byte [ebp - 0x1a], cl
mov dh, 0x4c
mov cl, byte [ebp - 0x1c]
mov ah, 0x4a
mov byte [ebp - 0xd], 0x45
xor dl, cl
mov al, byte [ebp - 0xd]
xor ch, cl
xor al, cl
mov byte [ebp - 0xe], 0x47
xor dh, cl
mov byte [ebp - 0x15], al
mov al, byte [ebp - 0xe]
xor ah, cl
xor al, cl
mov byte [ebp - 0x17], ch
xorps xmm0, xmm0
mov byte [ebp - 0x13], 0
lea ecx, [ebp - 0x1b]
mov byte [ebp - 0x19], dl
mov byte [ebp - 0x16], dh
lea edx, [ecx + 1]
mov byte [ebp - 0x18], ah
mov byte [ebp - 0x14], al
mov byte [ebp - 0x13], 0
movups xmmword [ebp - 0x48], xmm0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100517f0
sub ecx, edx
lea eax, [ebp - 0x1b]
push ecx
push eax
lea ecx, [ebp - 0x48]
call fcn.100024a0
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x9c]
mov edx, dword [ebp - 0x24]
mov dword [ebp - 4], 0
push dword [eax]
call fcn.100086b0
add esp, 4
mov byte [ebp - 4], 1
cmp dword [eax + 0x14], 0xf
jbe 0x1005182f
mov eax, dword [eax]
movaps xmm0, xmmword [0x10089e70]
lea edi, [ebp - 0x48]
push 0x64
movups xmmword [ebp - 0x6c], xmm0
xor ecx, ecx
mov byte [ebp - 0x4c], 0
movaps xmm0, xmmword [0x10089920]
push 4
push eax
movups xmmword [ebp - 0x5c], xmm0
mov al, byte [ebp - 0x6c]
xor byte [ebp + ecx - 0x6b], al
inc ecx
cmp ecx, 0x1f
jb 0x10051853
sub esp, 0x18
mov byte [ebp - 0x4c], 0
mov esi, esp
lea ecx, [ebp - 0x6b]
xorps xmm0, xmm0
lea edx, [ecx + 1]
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10051883
sub ecx, edx
lea eax, [ebp - 0x6b]
push ecx
push eax
mov ecx, esi
call fcn.100024a0
lea eax, [ebp - 0x84]
push eax
call fcn.10006910
add esp, 0x20
mov edx, edi
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.10020e90
mov ecx, dword [ebp - 0x70]
add esp, 8
cmp ecx, 0xf
jbe 0x100518ee
mov edx, dword [ebp - 0x84]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100518e4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1005197e
push ecx
push edx
call fcn.1007d105
add esp, 8
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0xf
mov byte [ebp - 0x84], 0
cmp ecx, 0xf
jbe 0x10051939
mov edx, dword [ebp - 0x9c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1005192f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1005197e
push ecx
push edx
call fcn.1007d105
add esp, 8
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x8c], 0
mov dword [ebp - 0x88], 0xf
mov byte [ebp - 0x9c], 0
cmp ecx, 0xf
jbe 0x100519e0
mov edx, dword [ebp - 0x48]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10051984
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10051984
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.1007d105
add esp, 8
jmp 0x100519e0
mov eax, dword [edi + 0x24]
mov ecx, eax
mov esi, dword [edi + 0x28]
mov dword [ebp - 0x2c], eax
cmp ecx, esi
je 0x100519e0
nop
mov edi, dword [ecx + 4]
test edi, edi
je 0x100519ab
cmp dword [edi], edx
je 0x100519b4
add ecx, 8
cmp ecx, esi
jne 0x100519a0
jmp 0x100519e0
mov ecx, dword [ebp - 0x2c]
xor eax, eax
sub esi, ecx
sar esi, 3
test esi, esi
je 0x100519d7
add ecx, 4
mov edx, dword [ecx]
test edx, edx
je 0x100519cf
cmp edx, edi
je 0x100519da
inc eax
add ecx, 8
cmp eax, esi
jb 0x100519c5
or eax, 0xffffffff
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x18], eax
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8