Function at 0x1001580
Capabilities:
Get process heap flags

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
xor edx, edx
sub esp, 0x4c
cmp dword [0x103833c], edx
jne 0x100b78d
push 0x10381c0
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
leave
ret
mov eax, dword [0x10381d8]
push esi
mov esi, dword [0x1038340]
push edi
mov edi, 0x10381d8
mov dword [ebp - 0x18], esi
mov dword [0x1038340], edx
mov dword [ebp - 4], edx
cmp eax, edi
je 0x100b7cc
mov ecx, eax
mov eax, dword [eax]
cmp esi, edx
jne 0x100b8cc
inc dword [ebp - 4]
cmp eax, edi
jne 0x100b7af
cmp dword [ebp - 4], 2
ja 0x100cb64
lea eax, [ebp - 0x4c]
mov dword [ebp - 8], eax
mov esi, dword [0x10381d8]
push ebx
mov dword [ebp - 0xc], edx
cmp esi, 0x10381d8
je 0x100b85c
mov edi, dword [ebp - 8]
mov ebx, dword [sym.imp.ntdll.dll_DbgPrintEx]
mov dword [ebp - 0x10], edi
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
cmp eax, edx
jne 0x100b8e2
mov eax, dword [esi + 8]
cmp eax, edx
je 0x100cba1
push 2
push edx
push edx
push edi
push 0xffffffffffffffff
push eax
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtDuplicateObject]
test eax, eax
jl 0x100cba8
xor edx, edx
mov eax, dword [esi + 0x14]
mov dword [edi + 4], eax
test byte [0x103833c], 4
je 0x100b8f0
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
mov dword [edi + 8], eax
cmp dword [ebp - 0xc], edx
ja 0x100cbcf
inc dword [ebp - 0xc]
add edi, 0xc
mov dword [ebp - 0x10], edi
cmp dword [ebp - 0x14], 0x10381d8
jne 0x100b8da
mov esi, dword [0x103833c]
push 0x10381c0
mov dword [ebp - 0x18], esi
mov dword [0x103833c], edx
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
mov eax, esi
and eax, 0x37
or ebx, 0xffffffff
dec eax
je 0x100b8fd
dec eax
je 0x100b8f8
dec eax
dec eax
jne 0x100cc13
push 2
pop ebx
mov edi, dword [ebp - 0xc]
and dword [ebp - 0x14], 0
test edi, edi
jbe 0x100b9cb
mov esi, dword [ebp - 8]
jmp 0x100b901
mov eax, dword [esi + 4]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
mov eax, dword [0x1038260]
mov dword [ebp - 0x30], eax
push 0x10
lea eax, [ebp - 0x34]
push eax
push 8
mov dword [ebp - 0x2c], ebx
call sub.USER32.dll_ConsoleControl
jmp 0x100cc2f
cmp dword [ecx + 0x10], esi
je 0x100b7bb
jmp 0x100b7be
mov esi, dword [ebp - 0x14]
jmp 0x100b7f0
cmp dword [esi + 0x10], eax
je 0x100b800
jmp 0x100b853
mov dword [esi + 0xc], edx
jmp 0x100b83b
xor ebx, ebx
inc ebx
jmp 0x100b88f
xor ebx, ebx
jmp 0x100b88f
cmp dword [ebp - 0x14], 0xc0000240
jne 0x100b8a3
jmp 0x100b9b9
push dword [esi]
call dword [sym.imp.ntdll.dll_NtClose]
add esi, 0xc
dec edi
jne 0x100b901
lea eax, [ebp - 0x4c]
pop ebx
cmp dword [ebp - 8], eax
jne 0x100cc37
pop edi
pop esi
leave
ret
mov ecx, dword [ebp - 4]
mov eax, dword fs:[0x18]
imul ecx, ecx, 0xc
mov eax, dword [eax + 0x30]
push ecx
push dword [0x1038030]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 8], eax
test eax, eax
jne 0x100cb9a
push 0x10381c0
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
jmp 0x100b9d8
xor edx, edx
jmp 0x100b7d2
mov dword [edi], edx
jmp 0x100b825
push eax
push dword [ebp - 4]
push dword [ebp - 0xc]
push 0x100cc54
push 1
push 0x70
call ebx
push 0x100aa2c
push 1
push 0x70
call ebx
add esp, 0x24
xor edx, edx
jmp 0x100b853
mov eax, dword [0x103830c]
cmp eax, edx
je 0x100b84a
cmp eax, dword [esi + 0x14]
jne 0x100b84a
cmp dword [esi + 0xc], edx
jbe 0x100b84a
mov esi, dword [ebp - 8]
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x10]
lea esi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x10]
xor edx, edx
jmp 0x100b84a
sub eax, 0xc
je 0x100cc28
sub eax, 0x10
jne 0x100b88f
push 6
jmp 0x100b88e
push 5
jmp 0x100b88e
mov dword [ebp - 0x14], eax
jmp 0x100b9b9
push dword [ebp - 8]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x100b9d8