Function at 0x40be0a
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, 0x38
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 [0x416750], 8
jne 0x40bf48
mov edi, dword [0x41679c]
test edi, edi
je 0x40c020
mov esi, dword [sym.imp.ucrtbase.dll_strcmp]
jmp 0x40be53
mov edi, dword [edi + 0x10]
test edi, edi
je 0x40c020
mov dword [esp + 4], ebx
mov eax, dword [edi + 4]
mov dword [esp], eax
call esi
test eax, eax
jne 0x40be48
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
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 0x40c130
mov eax, dword [0x41c010]
add eax, 1
mov dword [0x41c010], eax
lea eax, [eax + eax*4]
lea edx, [eax*4]
mov eax, dword [0x41c014]
test eax, eax
je 0x40bff0
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]
mov dword [0x41c014], eax
sub esp, 0x10
mov edx, dword [0x41c010]
lea edx, [edx + edx*4]
lea ebx, [eax + edx*4 - 0x14]
mov eax, dword [ebp - 0x1c]
call dbg.StrDup
mov dword [ebx], eax
mov eax, dword [0x41c010]
lea edx, [eax + eax*4]
mov eax, dword [0x41c014]
lea ebx, [eax + edx*4 - 0x14]
mov eax, dword [ebp - 0x20]
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
call dbg.StrDup
mov edx, dword [0x41c014]
mov dword [ebx + 0xc], eax
mov eax, dword [0x41c010]
lea eax, [eax + eax*4]
lea eax, [edx + eax*4]
mov dword [eax - 4], esi
test byte [0x416750], 8
jne 0x40bf98
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], 0x416750
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x40be2f
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], 0x416750
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 + 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
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [0x41c014], eax
sub esp, 0xc
jmp 0x40bed6
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_LoadLibraryA]
sub esp, 4
mov esi, eax
test byte [0x416750], 8
jne 0x40c1bf
test esi, esi
je 0x40c182
mov dword [esp + 8], 0x14
mov dword [esp + 4], 0
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_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x40c245
mov dword [eax], esi
mov eax, ebx
call dbg.StrDup
mov esi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [edi + 4], eax
mov eax, dword [0x41679c]
mov dword [0x41679c], edi
mov dword [edi + 0x10], eax
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 0x40c1f3
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 [0x416750], 8
jne 0x40c207
test al, 2
je 0x40c102
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 0x40be69
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4171a0
mov dword [esp], 0xa
call dword [edi + 8]
sub esp, 0xc
jmp 0x40be69
test byte [0x416750], 1
jne 0x40c140
xor esi, esi
jmp 0x40be84
mov eax, dword [ebp - 0x1c]
call sym._wine_dbgstr_an.constprop.0_2
mov edi, eax
mov eax, ebx
call sym._wine_dbgstr_an.constprop.0_2
mov dword [esp + 0x14], edi
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], 0x416750
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_2
jmp 0x40be84
test byte [0x416750], 1
je 0x40c139
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], 0x416750
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_2
jmp 0x40be84
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], 0x416750
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x40c03b
mov dword [edi + 0xc], 0
test byte [0x416750], 8
je 0x40be69
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], 0x416750
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
mov eax, dword [edi + 0xc]
jmp 0x40c0de
test byte [0x416750], 4
je 0x40c139
mov dword [esp + 0xc], str.OOM_n
xor esi, esi
mov dword [esp + 8], str.MACRO_RegisterRoutine
mov dword [esp + 4], 0x416750
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_2
jmp 0x40be84