Function at 0x40c2e0
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
sub esp, 0x104
lea eax, [esp]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
push edi
push 0x104
push eax
mov edi, ecx
call ebp
test eax, eax
je 0x40c793
cmp eax, 0x104
jae 0x40c793
lea ecx, [eax + 0xe]
cmp ecx, 0x104
jb 0x40c325
push str.program_assertion_failed___library_path_buffer_overflow
jmp 0x40c798
push str.Cfgmgr32
lea ecx, [esp + 0x14]
add eax, ecx
push str._s.dll
push eax
call fcn.0040abc0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov dword [0x445b34], ebx
test ebx, ebx
je 0x40c7b2
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CM_Get_Parent
push ebx
call esi
mov dword [0x445c48], eax
test eax, eax
jne 0x40c396
push str.CM_Get_ParentA
push ebx
call esi
mov dword [0x445c48], eax
test eax, eax
jne 0x40c396
push str.CM_Get_ParentW
push ebx
call esi
mov dword [0x445c48], eax
test eax, eax
je 0x40c7b2
mov ebx, dword [0x445b34]
push str.CM_Get_Child
push ebx
call esi
mov dword [0x445b48], eax
test eax, eax
jne 0x40c3d3
push str.CM_Get_ChildA
push ebx
call esi
mov dword [0x445b48], eax
test eax, eax
jne 0x40c3d3
push str.CM_Get_ChildW
push ebx
call esi
mov dword [0x445b48], eax
test eax, eax
je 0x40c7b2
push 0x104
lea eax, [esp + 0x14]
push eax
call ebp
test eax, eax
je 0x40c789
cmp eax, 0x104
jae 0x40c789
lea ecx, [eax + 0xe]
cmp ecx, 0x104
jb 0x40c429
push str.program_assertion_failed___library_path_buffer_overflow
push str.load_system_library
push 1
push edi
call fcn.00407e20
add esp, 0x10
mov dword [0x445b38], 0
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
push str.AdvAPI32
lea ecx, [esp + 0x14]
add eax, ecx
push str._s.dll
push eax
call fcn.0040abc0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov dword [0x445b38], ebx
test ebx, ebx
je 0x40c7b2
push str.RegQueryValueExA
push ebx
call esi
mov dword [0x445b2c], eax
test eax, eax
jne 0x40c494
push str.RegQueryValueExAA
push ebx
call esi
mov dword [0x445b2c], eax
test eax, eax
jne 0x40c494
push str.RegQueryValueExAW
push ebx
call esi
mov dword [0x445b2c], eax
test eax, eax
je 0x40c7b2
mov ebx, dword [0x445b38]
push str.RegCloseKey
push ebx
call esi
mov dword [0x445b00], eax
test eax, eax
jne 0x40c4d1
push str.RegCloseKeyA
push ebx
call esi
mov dword [0x445b00], eax
test eax, eax
jne 0x40c4d1
push str.RegCloseKeyW
push ebx
call esi
mov dword [0x445b00], eax
test eax, eax
je 0x40c7b2
push 0x104
lea eax, [esp + 0x14]
push eax
call ebp
test eax, eax
je 0x40c77f
cmp eax, 0x104
jae 0x40c77f
lea ecx, [eax + 0xe]
cmp ecx, 0x104
jb 0x40c527
push str.program_assertion_failed___library_path_buffer_overflow
push str.load_system_library
push 1
push edi
call fcn.00407e20
add esp, 0x10
mov dword [0x445ae0], 0
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
push str.SetupAPI
lea ecx, [esp + 0x14]
add eax, ecx
push str._s.dll
push eax
call fcn.0040abc0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov dword [0x445ae0], edi
test edi, edi
je 0x40c7b2
push str.SetupDiGetClassDevsA
push edi
call esi
mov dword [0x445b20], eax
test eax, eax
jne 0x40c592
push str.SetupDiGetClassDevsAA
push edi
call esi
mov dword [0x445b20], eax
test eax, eax
jne 0x40c592
push str.SetupDiGetClassDevsAW
push edi
call esi
mov dword [0x445b20], eax
test eax, eax
je 0x40c7b2
mov edi, dword [0x445ae0]
push str.SetupDiEnumDeviceInfo
push edi
call esi
mov dword [0x445b10], eax
test eax, eax
jne 0x40c5cf
push str.SetupDiEnumDeviceInfoA
push edi
call esi
mov dword [0x445b10], eax
test eax, eax
jne 0x40c5cf
push str.SetupDiEnumDeviceInfoW
push edi
call esi
mov dword [0x445b10], eax
test eax, eax
je 0x40c7b2
mov edi, dword [0x445ae0]
push str.SetupDiEnumDeviceInterfaces
push edi
call esi
mov dword [0x445b40], eax
test eax, eax
jne 0x40c60c
push str.SetupDiEnumDeviceInterfacesA
push edi
call esi
mov dword [0x445b40], eax
test eax, eax
jne 0x40c60c
push str.SetupDiEnumDeviceInterfacesW
push edi
call esi
mov dword [0x445b40], eax
test eax, eax
je 0x40c7b2
mov edi, dword [0x445ae0]
push str.SetupDiGetDeviceInstanceIdA
push edi
call esi
mov dword [0x445b28], eax
test eax, eax
jne 0x40c649
push str.SetupDiGetDeviceInstanceIdAA
push edi
call esi
mov dword [0x445b28], eax
test eax, eax
jne 0x40c649
push str.SetupDiGetDeviceInstanceIdAW
push edi
call esi
mov dword [0x445b28], eax
test eax, eax
je 0x40c7b2
mov edi, dword [0x445ae0]
push str.SetupDiGetDeviceInterfaceDetailA
push edi
call esi
mov dword [0x445afc], eax
test eax, eax
jne 0x40c686
push str.SetupDiGetDeviceInterfaceDetailAA
push edi
call esi
mov dword [0x445afc], eax
test eax, eax
jne 0x40c686
push str.SetupDiGetDeviceInterfaceDetailAW
push edi
call esi
mov dword [0x445afc], eax
test eax, eax
je 0x40c7b2
mov edi, dword [0x445ae0]
push str.SetupDiGetDeviceRegistryPropertyA
push edi
call esi
mov dword [0x445b14], eax
test eax, eax
jne 0x40c6c3
push str.SetupDiGetDeviceRegistryPropertyAA
push edi
call esi
mov dword [0x445b14], eax
test eax, eax
jne 0x40c6c3
push str.SetupDiGetDeviceRegistryPropertyAW
push edi
call esi
mov dword [0x445b14], eax
test eax, eax
je 0x40c7b2
mov edi, dword [0x445ae0]
push str.SetupDiDestroyDeviceInfoList
push edi
call esi
mov dword [0x445c28], eax
test eax, eax
jne 0x40c700
push str.SetupDiDestroyDeviceInfoListA
push edi
call esi
mov dword [0x445c28], eax
test eax, eax
jne 0x40c700
push str.SetupDiDestroyDeviceInfoListW
push edi
call esi
mov dword [0x445c28], eax
test eax, eax
je 0x40c7b2
mov edi, dword [0x445ae0]
push str.SetupDiOpenDevRegKey
push edi
call esi
mov dword [0x445b18], eax
test eax, eax
jne 0x40c739
push str.SetupDiOpenDevRegKeyA
push edi
call esi
mov dword [0x445b18], eax
test eax, eax
jne 0x40c739
push str.SetupDiOpenDevRegKeyW
push edi
call esi
mov dword [0x445b18], eax
test eax, eax
je 0x40c7b2
mov edi, dword [0x445ae0]
push str.SetupDiOpenDeviceInterfaceRegKey
push edi
call esi
mov dword [0x445af0], eax
test eax, eax
jne 0x40c772
push str.SetupDiOpenDeviceInterfaceRegKeyA
push edi
call esi
mov dword [0x445af0], eax
test eax, eax
jne 0x40c772
push str.SetupDiOpenDeviceInterfaceRegKeyW
push edi
call esi
mov dword [0x445af0], eax
test eax, eax
je 0x40c7b2
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x104
ret
push str.program_assertion_failed___could_not_get_system_directory
jmp 0x40c500
push str.program_assertion_failed___could_not_get_system_directory
jmp 0x40c402
push str.program_assertion_failed___could_not_get_system_directory
push str.load_system_library
push 1
push edi
call fcn.00407e20
mov dword [0x445b34], 0
add esp, 0x10
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x104
ret