Function at 0x1003b79
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [sym.imp.NTDLL.DLL_RtlInitUnicodeString]
push edi
xor edi, edi
push dword [ebp + 8]
mov dword [eax], edi
lea eax, [ebp - 0x20]
push eax
call esi
and byte [ebp - 3], 0
mov ebx, 0x10212d8
push dword [ebx]
lea eax, [ebp - 0x28]
push eax
call esi
lea eax, [ebp - 0x20]
push 1
push eax
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.NTDLL.DLL_RtlCompareUnicodeString]
test eax, eax
je 0x101ce4b
add ebx, 4
cmp ebx, 0x10212dc
jb 0x1003ba1
cmp byte [ebp - 3], 0
jne 0x101ce54
mov esi, 0xc0000034
cmp esi, edi
jge 0x101cf01
cmp esi, 0xc0000034
jne 0x101ceee
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
mov byte [ebp - 3], 1
jmp 0x1003bcc
mov eax, dword fs:[0x18]
push dword [ebp + 8]
mov ebx, eax
call sub.MSVCRT.DLL_wcslen
pop ecx
lea eax, [eax + eax + 0x8e]
push eax
mov eax, dword [ebx + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.NTDLL.DLL_RtlAllocateHeap]
mov ebx, eax
cmp ebx, edi
je 0x101d0d1
push 0x100cb80
push ebx
call sub.MSVCRT.DLL_wcscpy
pop ecx
pop ecx
push dword [ebp + 8]
push ebx
call sub.MSVCRT.DLL_wcscat
pop ecx
lea eax, [ebp - 0x30]
pop ecx
push ebx
push eax
call esi
lea eax, [ebp - 0x30]
mov dword [ebp - 0x54], 0x18
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0xc]
push 0x20019
push eax
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x48], 0x40
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
call dword [sym.imp.NTDLL.DLL_NtOpenKey]
mov esi, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push ebx
push edi
push dword [eax + 0x18]
call dword [sym.imp.NTDLL.DLL_RtlFreeHeap]
jmp 0x1003bdb
cmp esi, 0xc000003a
je 0x1003bef
mov eax, esi
jmp 0x1003bf6
lea eax, [ebp - 8]
mov esi, dword [sym.imp.NTDLL.DLL_NtQuerySecurityObject]
push eax
push edi
push edi
push 4
push dword [ebp - 0xc]
mov dword [ebp + 8], edi
mov dword [ebp - 8], edi
call esi
cmp eax, 0xc0000023
jne 0x101d070
mov eax, dword fs:[0x18]
push dword [ebp - 8]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.NTDLL.DLL_RtlAllocateHeap]
mov ebx, eax
cmp ebx, edi
mov dword [ebp + 8], ebx
je 0x101d0d1
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push ebx
push 4
push dword [ebp - 0xc]
call esi
push dword [ebp - 0xc]
mov esi, eax
call dword [sym.imp.NTDLL.DLL_NtClose]
cmp esi, edi
jl 0x101d0d1
lea eax, [ebp - 2]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 1]
push eax
push ebx
call dword [sym.imp.NTDLL.DLL_RtlGetDaclSecurityDescriptor]
cmp eax, edi
jl 0x101d079
cmp byte [ebp - 1], 0
je 0x101d079
push 2
lea eax, [ebp - 0x3c]
push 0xc
push eax
push dword [ebp - 0x10]
call dword [sym.imp.NTDLL.DLL_RtlQueryInformationAcl]
cmp eax, edi
mov dword [ebp - 0x18], eax
jl 0x101d079
xor ebx, ebx
cmp dword [ebp - 0x3c], edi
jbe 0x101d002
lea eax, [ebp - 0x14]
xor esi, esi
push eax
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.NTDLL.DLL_RtlGetAce]
cmp eax, edi
mov dword [ebp - 0x18], eax
jl 0x101d079
mov eax, dword [ebp - 0x14]
mov cl, byte [eax]
test cl, cl
je 0x101cfdb
cmp cl, 1
jne 0x101cffc
mov ecx, dword [eax + 4]
test ecx, 0x20019
je 0x101cfeb
mov esi, 0x80000000
test ecx, 0x20006
je 0x101cff9
or esi, 0x40000000
mov dword [eax + 4], esi
inc ebx
cmp ebx, dword [ebp - 0x3c]
jb 0x101cfb2
mov eax, dword fs:[0x18]
push dword [ebp - 8]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.NTDLL.DLL_RtlAllocateHeap]
mov ebx, eax
cmp ebx, edi
je 0x101d079
push 1
push ebx
call dword [sym.imp.ADVAPI32.DLL_InitializeSecurityDescriptor]
mov ecx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x10]
lea eax, [ebx + 0x14]
mov edx, ecx
mov edi, eax
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.ADVAPI32.DLL_SetSecurityDescriptorDacl]
mov eax, dword fs:[0x18]
push dword [ebp + 8]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.NTDLL.DLL_RtlFreeHeap]
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
mov eax, dword [ebp - 0x18]
jmp 0x1003bf6
push dword [ebp - 0xc]
call dword [sym.imp.NTDLL.DLL_NtClose]
cmp dword [ebp + 8], edi
je 0x101d094
mov eax, dword fs:[0x18]
push dword [ebp + 8]
mov eax, dword [eax + 0x30]
push edi
push dword [eax + 0x18]
call dword [sym.imp.NTDLL.DLL_RtlFreeHeap]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0x14
push edi
push dword [eax + 0x18]
call dword [sym.imp.NTDLL.DLL_RtlAllocateHeap]
mov esi, eax
cmp esi, edi
je 0x101d0d1
push 1
push esi
call dword [sym.imp.ADVAPI32.DLL_InitializeSecurityDescriptor]
push edi
push edi
push 1
push esi
call dword [sym.imp.ADVAPI32.DLL_SetSecurityDescriptorDacl]
test eax, eax
je 0x101d0d1
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
jmp 0x1003bf4
mov eax, 0xc0000017
jmp 0x1003bf6