Function at 0x4016a8
Capabilities:
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
xor ebx, ebx
call fcn.00401582
mov dword [edi + 0x64], eax
push esi
push dword [edi + 0x64]
call fcn.00401fc3
add esp, 8
cmp dword [edi + 0x64], ebx
je 0x401789
jge 0x4016e0
mov eax, dword [edi + 0x38]
lea ebx, [eax + edi]
movzx ecx, word [ebx]
add ecx, eax
inc ebx
inc ebx
lea ecx, [ecx + edi + 4]
mov eax, ebx
mov dword [ebp - 0xc], ecx
lea edx, [eax + 2]
or eax, dword [ebx]
enter 0x4343, 0xffffffffffffff8d
dec esp
cmp dword [ebx + ecx*4], eax
ret
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x4016f1
sub eax, edx
sar eax, 1
mov edx, eax
mov eax, ecx
lea ecx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x401706
sub eax, ecx
mov ecx, dword fs:[0x18]
sar eax, 1
add eax, edx
lea eax, [eax + eax + 0x14]
push eax
mov eax, dword [ecx + 0x30]
push 8
push dword [eax + 0x18]
call dword [0x759a1100]
mov esi, eax
test esi, esi
je 0x401844
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 4]
push eax
call 0x408862
mov dword [ebp - 8], eax
test eax, eax
jne 0x40181e
mov eax, ebx
mov dword [esi], 1
mov dword [esi + 4], 0x10
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x401764
sub eax, ecx
sar eax, 1
push ebx
inc eax
push eax
lea eax, [esi + 0x10]
push eax
call 0x415c45
mov eax, ebx
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp word [edi + 0x64], 0
cmp dword [edi + 0x64], 0
je 0x40179b
mov eax, dword [esi + 8]
mov edx, eax
add edx, eax
mov dword [ebp - 0xc], edx
jmp 0x4017a1
mov eax, dword [esi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [0x405124], eax
push 1
push 0
push 0
push 0xffffffffffffffff
call dword [0x405124]
mov dword [edi + 0x68], eax
cmp dword [edi + 0x68], 0
jne 0x4017c8
mov eax, dword [edi + 0x64]
jmp 0x40193b
mov eax, dword [esi + 4]
mov edx, dword [edi + 0x64]
dec edx
and eax, edx
mov dword [0x405120], eax
mov edx, dword [esi + 0xc]
mov ecx, dword [edi + 0x64]
mov dword [ebp - 0x10], ecx
mov ecx, edx
mov eax, dword [ebp - 0x10]
shl eax, cl
add edx, eax
mov dword [0x405128], edx
mov eax, dword [esi + 0x10]
mov ecx, dword [edi + 0x64]
inc ecx
mul ecx
mov dword [ebp - 0x14], eax
mov dword [0x40512c], eax
mov eax, dword [esi + 0x14]
xor eax, dword [edi + 0x64]
mov dword [0x405130], eax
push 0
push 0
push edi
push 0x4023b6
push 0
push 0
call dword [0x405120]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0x1388
test eax, eax
jne 0x4018fa
test edx, edx
jne 0x40182a
sub eax, ecx
sar eax, 1
lea ecx, [eax + eax + 0x12]
mov eax, dword [ebp - 0xc]
mov dword [esi + 8], ecx
lea edx, [eax + 2]
add ah, byte [esi - 0x75]
sbb byte [eax + 0x40], al
mov bx, word [eax]
inc eax
inc eax
test bx, bx
jne 0x401845
push dword [ebp - 0xc]
sub eax, edx
sar eax, 1
inc eax
push eax
add ecx, esi
push ecx
call 0x415cec
push dword [ebp + 0x14]
xor eax, eax
push dword [ebp + 0x10]
cmp dword [edi + 4], 1
push dword [ebp + 0xc]
setne al
push 1
push dword [ebp + 8]
push dword [ebp - 4]
push esi
push edi
mov dword [esi + 0xc], eax
call fcn.004018f9
xor ebx, ebx
mov dword [ebp - 8], eax
cmp dword [ebp + 8], ebx
jbe 0x4018ae
mov eax, dword [ebp - 4]
push dword [eax + ebx*4]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [0x759a10fc]
inc ebx
cmp ebx, dword [ebp + 8]
jb 0x40188e
push dword [ebp - 4]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [0x759a10fc]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push esi
push 0
push dword [eax + 0x18]
call dword [0x759a10fc]
cmp dword [ebp - 8], 0
jne 0x4341e7
pop edi
pop esi
pop ebx
leave
ret 0x10
push 0
push edi
push 1
push dword [edi + 0x68]
call dword [0x405128]
push dword [ebp - 8]
push 0
lea eax, [ebp - 4]
push eax
xor esi, esi
inc esi
mov ecx, dword [edi + 0x64]
sar esi, cl
push esi
call dword [0x405130]
mov ebx, eax
push dword [ebp - 4]
call sub.KERNEL32.dll_CloseHandle
cmp ebx, 0x102
je 0x401938
mov eax, dword [edi + 0x64]
inc eax
jmp 0x40193b
mov eax, dword [edi + 0x64]
pop edi
pop esi
pop ebx
leave
ret