Function at 0x40d510
Capabilities:
Access peb ldr_data
Get ntdll base address
Get process heap flags
Get process heap force 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 ebx, dword [ecx]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x20], eax
test byte [0x415750], 8
jne 0x40d6e0
mov edi, dword [0x41579c]
test edi, edi
je 0x40d780
mov esi, dword [sym.imp.ucrtbase.dll_strcmp]
jmp 0x40d563
mov edi, dword [edi + 0x10]
test edi, edi
je 0x40d780
mov dword [esp + 4], ebx
mov eax, dword [edi + 4]
mov dword [esp], eax
call esi
test eax, eax
jne 0x40d558
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [ebp - 0x24], eax
mov eax, dword [sym.imp.ucrtbase.dll_strlen]
mov dword [ebp - 0x2c], eax
mov eax, dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [edi]
mov dword [esp], eax
call esi
sub esp, 8
mov esi, eax
test eax, eax
je 0x40d900
mov eax, dword [0x41a010]
add eax, 1
mov dword [0x41a010], eax
lea eax, [eax + eax*4]
lea edx, [eax*4]
mov eax, dword [0x41a014]
test eax, eax
je 0x40d8d8
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
mov edx, dword [0x41a010]
mov dword [0x41a014], eax
mov edi, dword fs:[0x18]
lea edx, [edx + edx*4]
lea ecx, [eax + edx*4 - 0x14]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], ecx
mov dword [esp], eax
mov edx, dword [ebp - 0x2c]
call edx
mov dword [esp + 4], 0
add eax, 1
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov ecx, dword [ebp - 0x24]
call ecx
mov ebx, eax
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
call eax
mov ecx, dword [ebp - 0x30]
mov eax, dword [0x41a010]
mov dword [ecx], ebx
lea ecx, [eax + eax*4]
mov eax, dword [0x41a014]
lea ebx, [eax + ecx*4 - 0x14]
mov eax, dword [ebp - 0x20]
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [esp], eax
mov edx, dword [ebp - 0x2c]
call edx
mov dword [esp + 4], 0
add eax, 1
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov ecx, dword [ebp - 0x24]
call ecx
mov edx, dword [ebp - 0x20]
sub esp, 0xc
mov edi, eax
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x28]
call eax
mov eax, dword [0x41a010]
mov edx, dword [0x41a014]
mov dword [ebx + 0xc], edi
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax - 4], esi
test byte [0x415750], 8
jne 0x40d730
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0xc
call sym._wine_dbgstr_an.constprop.0_2
mov edi, eax
mov eax, dword [ebp - 0x1c]
call sym._wine_dbgstr_an.constprop.0_2
mov esi, eax
mov eax, ebx
call sym._wine_dbgstr_an.constprop.0_2
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s___s___s__n
mov dword [esp + 8], str.MACRO_RegisterRoutine
mov dword [esp + 4], 0x415750
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x40d53f
mov eax, dword [ebp - 0x20]
call sym._wine_dbgstr_an.constprop.0_2
mov ebx, eax
mov eax, dword [ebp - 0x1c]
call sym._wine_dbgstr_an.constprop.0_2
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Added__s__s__at__p_n
mov dword [esp + 8], str.MACRO_RegisterRoutine
mov dword [esp + 4], 0x415750
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0xc
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_LoadLibraryA]
sub esp, 4
mov esi, eax
test byte [0x415750], 8
jne 0x40d980
test esi, esi
je 0x40d910
mov dword [esp + 8], 0x14
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0x28], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x24], eax
call eax
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x40d9b4
mov edx, dword [sym.imp.ucrtbase.dll_strlen]
mov dword [eax], esi
mov dword [esp], ebx
mov dword [ebp - 0x2c], edx
call edx
mov dword [esp + 4], 0
add eax, 1
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x24]
call eax
sub esp, 0xc
mov esi, eax
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [esp + 4], ebx
mov dword [ebp - 0x28], eax
call eax
mov dword [edi + 4], esi
mov eax, dword [0x41579c]
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [edi + 0x10], eax
mov dword [0x41579c], edi
mov dword [esp + 4], str.LDLLHandler
mov eax, dword [edi]
mov dword [esp], eax
call esi
mov dword [edi + 8], eax
sub esp, 8
test eax, eax
je 0x40d9fc
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 1
call eax
mov dword [edi + 0xc], eax
sub esp, 0xc
test byte [0x415750], 8
jne 0x40da10
test al, 2
je 0x40d8a7
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 4
call dword [edi + 8]
mov eax, dword [edi + 0xc]
sub esp, 0xc
test al, 0x10
je 0x40d591
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4161a0
mov dword [esp], 0xa
call dword [edi + 8]
sub esp, 0xc
jmp 0x40d591
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x24]
call eax
sub esp, 0xc
jmp 0x40d5f9
test byte [0x415750], 1
jne 0x40d93c
xor esi, esi
jmp 0x40d5ac
test byte [0x415750], 1
jne 0x40da4e
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x24], eax
mov eax, dword [sym.imp.ucrtbase.dll_strlen]
xor esi, esi
mov dword [ebp - 0x2c], eax
mov eax, dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [ebp - 0x28], eax
jmp 0x40d5ac
mov eax, dword [ebp - 0x1c]
call sym._wine_dbgstr_an.constprop.0_2
mov esi, eax
mov eax, ebx
call sym._wine_dbgstr_an.constprop.0_2
mov dword [esp + 0x14], esi
xor esi, esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Cannot_find_proc__s_in_dll__s_n
mov dword [esp + 8], str.MACRO_RegisterRoutine
mov dword [esp + 4], 0x415750
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_2
jmp 0x40d5ac
mov eax, ebx
call sym._wine_dbgstr_an.constprop.0_2
mov dword [esp + 0xc], str.Loading__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.MACRO_RegisterRoutine
mov dword [esp + 4], 0x415750
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x40d79b
test byte [0x415750], 4
je 0x40d925
mov dword [esp + 0xc], str.OOM_n
xor esi, esi
mov dword [esp + 8], str.MACRO_RegisterRoutine
mov dword [esp + 4], 0x415750
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_2
mov eax, dword [sym.imp.ucrtbase.dll_strlen]
mov dword [ebp - 0x2c], eax
mov eax, dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [ebp - 0x28], eax
jmp 0x40d5ac
mov dword [edi + 0xc], 0
test byte [0x415750], 8
je 0x40d591
mov eax, ebx
call sym._wine_dbgstr_an.constprop.0_2
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0xc]
mov dword [esp + 0xc], str.Got_class__lx_for_DLL__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.MACRO_RegisterRoutine
mov dword [esp + 4], 0x415750
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
mov eax, dword [edi + 0xc]
jmp 0x40d883
mov eax, ebx
call sym._wine_dbgstr_an.constprop.0_2
mov dword [esp + 0xc], str.Cannot_find_dll__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.MACRO_RegisterRoutine
mov dword [esp + 4], 0x415750
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_2
jmp 0x40d91d