Function at 0x401e4a
Capabilities:
Access peb ldr_data
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 + 4]
mov edx, dword [ecx + 0x18]
mov ebx, dword [ecx + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x1c]
and eax, 0xfffffffc
mov dword [ebp - 0x34], ecx
jne 0x402209
mov eax, 0x24
mov dword [esp + 8], eax
mov eax, 8
mov dword [esp + 4], eax
mov esi, dword fs:[0x18]
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 - 0x1c], eax
call eax
sub esp, 0xc
test eax, eax
je 0x4022cc
mov dword [eax + 0x20], 1
mov dword [ebp - 0x28], eax
mov eax, dword [ebx]
add eax, 4
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
mov eax, dword [ebp - 0x1c]
call eax
mov edx, dword [ebp - 0x28]
mov dword [edx + 8], eax
sub esp, 0xc
test eax, eax
je 0x40224b
mov ecx, dword [ebx]
lea esi, [ebx + 4]
mov dword [eax], ecx
cmp ecx, 8
mov dword [ebp - 0x28], ecx
mov eax, dword [edx + 8]
lea edi, [eax + 4]
jae 0x4020d8
mov ecx, dword [ebp - 0x28]
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], edx
mov ebx, dword [eax + 4]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x24]
mov dword [edx + 0x1c], ebx
mov dword [edx + 0x18], ecx
mov eax, dword [eax]
mov ebx, dword fs:[0x18]
mov dword [ebp - 0x28], eax
add eax, 4
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0xc], eax
sub esp, 0xc
test eax, eax
je 0x4022d6
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebx]
lea esi, [ebx + 4]
mov dword [eax], ecx
cmp ecx, 8
mov eax, dword [edx + 0xc]
lea edi, [eax + 4]
jae 0x402110
mov dword [ebp - 0x28], edx
rep movsb byte es:[edi], byte [esi]
mov ebx, dword fs:[0x18]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
add eax, 4
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x10], eax
sub esp, 0xc
test eax, eax
je 0x4022d6
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebx]
add ebx, 4
mov esi, ebx
mov dword [eax], ecx
cmp ecx, 8
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x1c], eax
lea edi, [eax + 4]
jae 0x402150
mov dword [ebp - 0x1c], edx
rep movsb byte es:[edi], byte [esi]
mov dword [esp], 0x4090a0
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov esi, dword [0x4090b8]
mov edx, dword [ebp - 0x1c]
sub esp, 4
cmp esi, 0x4090b8
je 0x40217f
mov eax, dword [ebp - 0x20]
mov edi, dword [eax]
jmp 0x402012
mov esi, dword [esi]
cmp esi, 0x4090b8
je 0x402078
mov eax, dword [esi + 0x10]
cmp dword [eax], edi
jne 0x402008
mov dword [esp + 8], edi
add eax, 4
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._memcmp
test eax, eax
jne 0x402008
test byte [0x4090c0], 8
mov ebx, 0x401e7
mov edx, dword [ebp - 0x1c]
je 0x40207d
mov eax, dword [esi + 0x14]
mov edx, str.IrotRegister
mov ecx, 0x4090c0
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], 3
mov dword [esp + 0x10], eax
mov eax, str.moniker_already_registered_with_cookie__ld_n
mov dword [esp + 0xc], eax
call sym._wine_dbg_log.constprop.0_1
mov edx, dword [ebp - 0x1c]
jmp 0x40207d
mov edx, dword [ebp - 0x1c]
xor ebx, ebx
mov dword [edx], 0x4090b8
mov dword [ebp - 0x1c], edx
mov eax, dword [0x4090bc]
mov dword [edx + 4], eax
mov dword [eax], edx
mov dword [esp], 0x4090a0
mov dword [0x4090bc], edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov eax, 1
sub esp, 4
lock xadd dword [0x409060], eax
mov edx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x30]
inc eax
mov dword [edx + 0x14], eax
mov dword [edi], eax
mov eax, dword [ebp - 0x34]
mov dword [eax], edx
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
test edi, 1
jne 0x402186
test edi, 2
jne 0x40219b
test edi, 4
je 0x401f09
mov eax, dword [esi]
add edi, 4
add esi, 4
mov dword [edi - 4], eax
sub dword [ebp - 0x28], 4
jmp 0x401f09
test edi, 1
jne 0x4021f1
test edi, 2
jne 0x4021dc
test edi, 4
je 0x401f73
mov eax, dword [esi]
add edi, 4
add esi, 4
sub ecx, 4
mov dword [edi - 4], eax
jmp 0x401f73
test edi, 1
jne 0x4021b1
test edi, 2
jne 0x4021ca
test edi, 4
je 0x401fd1
mov eax, dword [esi]
add edi, 4
add esi, 4
sub ecx, 4
mov dword [edi - 4], eax
jmp 0x401fd1
xor ebx, ebx
jmp 0x40207d
movzx ecx, byte [ebx + 4]
lea edi, [eax + 5]
lea esi, [ebx + 5]
mov byte [eax + 4], cl
dec dword [ebp - 0x28]
jmp 0x4020e4
movzx eax, word [esi]
add edi, 2
add esi, 2
mov word [edi - 2], ax
sub dword [ebp - 0x28], 2
jmp 0x4020f0
mov esi, dword [ebp - 0x20]
dec ecx
mov edi, dword [ebp - 0x1c]
movzx eax, byte [esi + 4]
add esi, 5
lea edi, [edi + 5]
mov byte [ebp - 0x24], al
mov byte [edi - 1], al
jmp 0x402158
movzx eax, word [esi]
add edi, 2
add esi, 2
sub ecx, 2
mov word [edi - 2], ax
jmp 0x402160
movzx eax, word [esi]
add edi, 2
add esi, 2
sub ecx, 2
mov word [edi - 2], ax
jmp 0x402128
mov esi, ebx
movzx ebx, byte [ebx + 4]
dec ecx
lea edi, [eax + 5]
add esi, 5
mov byte [ebp - 0x24], bl
mov byte [eax + 4], bl
jmp 0x40211c
test byte [0x4090c0], 2
mov ebx, 0x80070057
je 0x4020c4
mov dword [esp + 0x10], eax
mov eax, str.Invalid_grfFlags:_0x_08lx_n
mov edx, 0x4090c0
mov dword [esp + 0xc], eax
mov eax, str.IrotRegister
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x4020c4
lock dec dword [edx + 0x20]
jne 0x4022cc
mov dword [ebp - 0x1c], edx
mov eax, dword [edx + 8]
xor edi, edi
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
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 ebx
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0xc]
xor edx, edx
sub esp, 0xc
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x1c]
xor ecx, ecx
mov eax, dword [edx + 0x10]
sub esp, 0xc
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov ebx, 0x8007000e
jmp 0x4020c4
lock dec dword [edx + 0x20]
jne 0x4022cc
mov eax, dword [edx + 8]
xor esi, esi
xor edi, edi
mov dword [ebp - 0x1c], edx
mov dword [esp + 4], esi
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0xc]
sub esp, 0xc
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x10]
sub esp, 0xc
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x1c]
xor eax, eax
sub esp, 0xc
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x30]
mov ebx, 0x8007000e
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
jmp 0x4020c4