Function at 0x401dd0
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, 0x48
mov eax, dword [ecx + 0xc]
mov ebx, dword [ecx + 0x18]
mov edi, dword [ecx + 4]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x1c]
mov dword [ebp - 0x2c], ecx
cmp eax, 3
ja 0x40204d
mov dword [ebp - 0x30], edx
mov esi, dword fs:[0x18]
mov dword [esp + 8], 0x24
mov dword [esp + 4], 8
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x20], eax
call eax
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x402064
mov edx, dword [ebp - 0x30]
mov dword [eax + 0x20], 1
mov ecx, dword [edx]
mov dword [esp + 4], 0
lea eax, [ecx + 4]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x20]
call eax
mov edx, dword [ebp - 0x30]
sub esp, 0xc
test eax, eax
mov dword [ebx + 8], eax
je 0x40205d
mov ecx, dword [edx]
add edx, 4
mov dword [eax], ecx
mov eax, dword [ebx + 8]
mov dword [esp + 4], edx
add eax, 4
mov dword [esp + 8], ecx
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x1c], edx
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
add eax, 4
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x20]
call eax
mov dword [ebx + 0xc], eax
sub esp, 0xc
test eax, eax
je 0x40205d
mov edx, dword [ebp - 0x1c]
mov ecx, dword [edx]
mov dword [eax], ecx
mov eax, dword [ebx + 0xc]
lea edx, [eax + 4]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], ecx
mov dword [esp], edx
add eax, 4
mov dword [esp + 4], eax
call sym._memcpy
mov eax, dword [edi]
mov dword [esp + 4], 0
add eax, 4
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x20]
call eax
mov dword [ebx + 0x10], eax
sub esp, 0xc
test eax, eax
je 0x40205d
mov edx, dword [edi]
lea ecx, [edi + 4]
mov dword [eax], edx
mov eax, dword [ebx + 0x10]
mov dword [esp + 8], edx
add eax, 4
mov dword [ebp - 0x1c], ecx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._memcpy
mov dword [esp], 0x4090a0
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [0x4090b8]
sub esp, 4
cmp esi, 0x4090b8
je 0x402046
mov edi, dword [edi]
mov dword [ebp - 0x20], ebx
mov ebx, edi
mov edi, dword [ebp - 0x1c]
jmp 0x401f8a
mov esi, dword [esi]
cmp esi, 0x4090b8
je 0x401fc0
mov eax, dword [esi + 0x10]
cmp dword [eax], ebx
jne 0x401f80
add eax, 4
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._memcmp
test eax, eax
jne 0x401f80
mov ebx, dword [ebp - 0x20]
test byte [global___dbch.0], 8
jne 0x402016
mov esi, 0x401e7
jmp 0x401fc5
mov ebx, dword [ebp - 0x20]
xor esi, esi
mov dword [ebx], 0x4090b8
mov eax, dword [0x4090bc]
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov dword [0x4090bc], ebx
mov dword [esp], 0x4090a0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, 1
sub esp, 4
lock xadd dword [0x409060], eax
mov edi, dword [ebp - 0x28]
add eax, 1
mov dword [ebx + 0x14], eax
mov dword [edi], eax
mov eax, dword [ebp - 0x2c]
mov dword [eax], ebx
lea esp, [ebp - 0x10]
mov eax, esi
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, dword [esi + 0x14]
mov dword [esp + 0xc], str.moniker_already_registered_with_cookie__ld_n
mov dword [esp + 8], global___FUNCTION__.7
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x401fb4
xor esi, esi
jmp 0x401fc5
test byte [global___dbch.0], 2
jne 0x40206b
mov esi, 0x80070057
jmp 0x402008
lock sub dword [ebx + 0x20], 1
je 0x402098
mov esi, 0x8007000e
jmp 0x402008
and eax, 0xfffffffc
mov dword [esp + 0xc], str.Invalid_grfFlags:_0x_08lx_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], global___FUNCTION__.7
mov dword [esp + 4], global___dbch.0
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x402056
mov eax, dword [ebx + 8]
mov dword [esp + 4], 0
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebx + 0xc]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebx + 0x10]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
jmp 0x402064