Function at 0x1001f15
Capabilities:
Print debug messages
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
lea eax, [ebp - 1]
push eax
push 0
push 1
push 0x12
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
test eax, eax
jge 0x1001f33
mov byte [ebp - 1], 1
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov ebx, dword [eax]
cmp ebx, eax
je 0x1002154
jmp 0x1001f4c
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebx]
lea esi, [ebx + 0x10]
push esi
lea edi, [ebx + 8]
push edi
push 0x10011ec
mov dword [ebp - 0x1c], eax
call sub.ntdll.dll_DbgPrint
xor edx, edx
add esp, 0xc
cmp word [esi], dx
je 0x1002121
cmp dword [ebp - 0x10], edx
jne 0x100212d
mov eax, dword [ebx + 0xc]
push 0x40
pop ecx
cmp word [eax], cx
jne 0x1001f90
add eax, 2
add word [edi], 0xfffe
mov dword [ebx + 0xc], eax
push 0x20
push 3
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x48]
push eax
push 0x110000
lea eax, [ebp - 8]
push eax
mov dword [ebp - 0x48], 0x18
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], edx
call dword [sym.imp.ntdll.dll_NtOpenFile]
test eax, eax
mov dword [ebp - 0x18], eax
jl 0x1002148
movzx ecx, word [esi]
mov edi, dword [ebx + 0x14]
mov ax, word [edi]
add ecx, 0x10
cmp ax, 0x21
mov dword [ebp - 0x14], ecx
je 0x1001fe7
cmp ax, 0x40
jne 0x1001fee
inc edi
inc edi
dec ecx
dec ecx
mov dword [ebp - 0x14], ecx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ecx
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
test esi, esi
je 0x1002032
cmp edi, dword [ebx + 0x14]
mov dword [ebp - 0x20], esi
setne al
and dword [esi + 4], 0
mov byte [esi], al
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
push eax
mov dword [esi + 8], eax
lea eax, [esi + 0xc]
push edi
push eax
call dword [sym.imp.ntdll.dll_memmove]
add esp, 0xc
jmp 0x1002039
mov dword [ebp - 0x18], 0xc0000017
cmp dword [ebp - 0x18], 0
jl 0x1002116
push 0xa
push dword [ebp - 0x14]
lea eax, [ebp - 0x28]
push esi
push eax
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
test eax, eax
jge 0x1002116
cmp eax, 0xc0000035
jne 0x1002116
mov eax, dword [ebp - 0x20]
cmp byte [eax], 0
je 0x1002116
mov ax, word [ebx + 0x10]
sub ax, 2
mov word [ebp - 0x30], ax
mov ax, word [ebx + 0x12]
sub ax, 2
mov word [ebp - 0x2e], ax
xor eax, eax
push 0x20
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
push 3
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x48]
push eax
push 0x100100
lea eax, [ebp - 0xc]
lea ecx, [ebp - 0x30]
push eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x48], 0x18
mov dword [ebp - 0x3c], 0x40
mov dword [ebp - 0x40], ecx
call dword [sym.imp.ntdll.dll_NtOpenFile]
test eax, eax
jl 0x1002116
push 0xa
pop ecx
xor eax, eax
push 4
lea edi, [ebp - 0x70]
rep stosd dword es:[edi], eax
push 0x28
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x50], 0x80
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
push dword [ebp - 0xc]
mov edi, eax
call dword [sym.imp.ntdll.dll_NtClose]
test edi, edi
jl 0x1002116
push 0xa
push dword [ebp - 0x14]
lea eax, [ebp - 0x28]
push esi
push eax
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtSetInformationFile]
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x100212d
cmp dword [ebp - 0x10], 1
jne 0x1002148
push edi
call fcn.01001d83
cmp dword [ebp - 0x10], 1
jne 0x1002148
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x1c], eax
jne 0x1001f49
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 2
jl 0x1001f3a
cmp byte [ebp - 1], 0
pop edi
pop esi
pop ebx
jne 0x100217a
lea eax, [ebp - 1]
push eax
push 0
push 0
push 0x12
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
leave
ret 4