Function at 0x4014fa
Capabilities:
Get process heap flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x58
mov esi, dword [ecx + 4]
test byte [0x409040], 8
mov eax, dword [ecx]
mov edi, dword [ecx + 8]
mov dword [ebp - 0x28], esi
mov esi, dword [ecx + 0xc]
mov dword [ebp - 0x30], esi
mov esi, dword [ecx + 0x10]
mov dword [ebp - 0x34], esi
jne 0x401700
mov eax, dword [ebp - 0x34]
mov dword [eax], 0
mov dword [esp], 0x409020
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x28]
sub esp, 4
test eax, eax
je 0x401674
mov dword [ebp - 0x1c], 0
add edi, 0x14
mov esi, dword fs:[0x18]
lea esi, [esi]
mov eax, 0x8c
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
test eax, eax
mov ebx, eax
je 0x4016f0
test al, 1
mov ecx, edi
mov dword [ebp - 0x20], 0x40
lea edx, [eax + 0x4c]
jne 0x4016d0
test dl, 2
jne 0x4016b8
mov dword [ebp - 0x2c], ebx
mov eax, dword [ebp - 0x20]
and eax, 0xfffffffc
mov dword [ebp - 0x24], eax
xor eax, eax
mov ebx, dword [ecx + eax]
mov dword [edx + eax], ebx
add eax, 4
cmp eax, dword [ebp - 0x24]
jb 0x4015b6
add edx, eax
add ecx, eax
mov ebx, dword [ebp - 0x2c]
xor eax, eax
test byte [ebp - 0x20], 2
je 0x4015de
movzx eax, word [ecx]
mov word [edx], ax
mov eax, 2
test byte [ebp - 0x20], 1
je 0x4015eb
movzx ecx, byte [ecx + eax]
mov byte [edx + eax], cl
lea eax, [ebx + 0x48]
mov dword [esp + 0x14], eax
lea eax, [ebx + 0x44]
mov dword [esp + 0x10], eax
lea edx, [ebx + 0x2c]
mov dword [esp + 8], edx
lea ecx, [ebx + 0x18]
mov dword [esp + 4], ecx
lea eax, [ebx + 0x40]
mov dword [esp + 0xc], eax
mov dword [ebp - 0x24], edx
mov eax, dword [edi - 4]
mov dword [ebp - 0x20], ecx
mov dword [esp], eax
call sym._TowerExplode_24
mov edx, dword [ebp - 0x24]
sub esp, 0x18
test eax, eax
jne 0x401746
mov eax, dword [edi - 0x14]
mov dword [ebx + 8], eax
mov eax, dword [edi - 0x10]
mov dword [ebx + 0xc], eax
mov eax, dword [edi - 0xc]
mov dword [ebx + 0x10], eax
mov eax, dword [edi - 8]
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x401690
mov dword [ebx], 0x409038
add edi, 0x54
mov eax, dword [0x40903c]
inc dword [ebp - 0x1c]
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x28], eax
mov dword [0x40903c], ebx
jne 0x401560
mov dword [esp], 0x409020
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
lea eax, [ebx + 8]
mov ecx, dword [ebx + 0x40]
mov dword [esp], eax
mov eax, dword [ebp - 0x20]
call sym._find_ept_entry.isra.0
test eax, eax
je 0x40164c
call sym._delete_registered_ept_entry
lea esi, [esi]
jmp 0x40164c
movzx eax, word [ecx]
add edx, 2
add ecx, 2
mov word [edx - 2], ax
sub dword [ebp - 0x20], 2
jmp 0x4015a8
movzx eax, byte [edi]
lea edx, [ebx + 0x4d]
lea ecx, [edi + 1]
mov byte [ebx + 0x4c], al
mov dword [ebp - 0x20], 0x3f
jmp 0x40159f
mov eax, dword [ebp - 0x34]
mov dword [eax], 0x6d8
jmp 0x401674
mov dword [esp + 0x20], esi
mov esi, dword [ebp - 0x30]
mov edx, 0x409040
mov dword [esp + 0x10], eax
mov eax, str.__p___lu___p___lu___p__n
mov dword [esp + 0xc], eax
mov eax, str.ept_insert
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], esi
mov esi, dword [ebp - 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 3
mov dword [esp + 0x14], esi
call sym._wine_dbg_log.constprop.0
jmp 0x401528
test byte [0x409040], 4
mov ecx, eax
jne 0x401780
mov eax, dword [ebp - 0x34]
xor edx, edx
mov dword [eax], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x401674
mov ecx, str.TowerExplode_failed__lu_n
mov esi, str.ept_insert
mov dword [esp + 0xc], ecx
mov edi, 0x409040
mov dword [esp + 0x10], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], 2
mov dword [ebp - 0x1c], eax
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0x1c]
jmp 0x401751