Function at 0x40c0c0
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 0x40c573
cmp eax, 0x104
jae 0x40c573
lea ecx, [eax + 0xe]
cmp ecx, 0x104
jb 0x40c105
push str.program_assertion_failed___library_path_buffer_overflow
jmp 0x40c578
push str.Cfgmgr32
lea ecx, [esp + 0x14]
add eax, ecx
push str._s.dll
push eax
call fcn.0040a9a0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov dword [0x445b24], ebx
test ebx, ebx
je 0x40c592
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CM_Get_Parent
push ebx
call esi
mov dword [0x445c38], eax
test eax, eax
jne 0x40c176
push str.CM_Get_ParentA
push ebx
call esi
mov dword [0x445c38], eax
test eax, eax
jne 0x40c176
push str.CM_Get_ParentW
push ebx
call esi
mov dword [0x445c38], eax
test eax, eax
je 0x40c592
mov ebx, dword [0x445b24]
push str.CM_Get_Child
push ebx
call esi
mov dword [0x445b38], eax
test eax, eax
jne 0x40c1b3
push str.CM_Get_ChildA
push ebx
call esi
mov dword [0x445b38], eax
test eax, eax
jne 0x40c1b3
push str.CM_Get_ChildW
push ebx
call esi
mov dword [0x445b38], eax
test eax, eax
je 0x40c592
push 0x104
lea eax, [esp + 0x14]
push eax
call ebp
test eax, eax
je 0x40c569
cmp eax, 0x104
jae 0x40c569
lea ecx, [eax + 0xe]
cmp ecx, 0x104
jb 0x40c209
push str.program_assertion_failed___library_path_buffer_overflow
push str.load_system_library
push 1
push edi
call fcn.00407c10
add esp, 0x10
mov dword [0x445b28], 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.0040a9a0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov dword [0x445b28], ebx
test ebx, ebx
je 0x40c592
push str.RegQueryValueExA
push ebx
call esi
mov dword [0x445b1c], eax
test eax, eax
jne 0x40c274
push str.RegQueryValueExAA
push ebx
call esi
mov dword [0x445b1c], eax
test eax, eax
jne 0x40c274
push str.RegQueryValueExAW
push ebx
call esi
mov dword [0x445b1c], eax
test eax, eax
je 0x40c592
mov ebx, dword [0x445b28]
push str.RegCloseKey
push ebx
call esi
mov dword [0x445af0], eax
test eax, eax
jne 0x40c2b1
push str.RegCloseKeyA
push ebx
call esi
mov dword [0x445af0], eax
test eax, eax
jne 0x40c2b1
push str.RegCloseKeyW
push ebx
call esi
mov dword [0x445af0], eax
test eax, eax
je 0x40c592
push 0x104
lea eax, [esp + 0x14]
push eax
call ebp
test eax, eax
je 0x40c55f
cmp eax, 0x104
jae 0x40c55f
lea ecx, [eax + 0xe]
cmp ecx, 0x104
jb 0x40c307
push str.program_assertion_failed___library_path_buffer_overflow
push str.load_system_library
push 1
push edi
call fcn.00407c10
add esp, 0x10
mov dword [0x445ad0], 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.0040a9a0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov dword [0x445ad0], edi
test edi, edi
je 0x40c592
push str.SetupDiGetClassDevsA
push edi
call esi
mov dword [0x445b10], eax
test eax, eax
jne 0x40c372
push str.SetupDiGetClassDevsAA
push edi
call esi
mov dword [0x445b10], eax
test eax, eax
jne 0x40c372
push str.SetupDiGetClassDevsAW
push edi
call esi
mov dword [0x445b10], eax
test eax, eax
je 0x40c592
mov edi, dword [0x445ad0]
push str.SetupDiEnumDeviceInfo
push edi
call esi
mov dword [0x445b00], eax
test eax, eax
jne 0x40c3af
push str.SetupDiEnumDeviceInfoA
push edi
call esi
mov dword [0x445b00], eax
test eax, eax
jne 0x40c3af
push str.SetupDiEnumDeviceInfoW
push edi
call esi
mov dword [0x445b00], eax
test eax, eax
je 0x40c592
mov edi, dword [0x445ad0]
push str.SetupDiEnumDeviceInterfaces
push edi
call esi
mov dword [0x445b30], eax
test eax, eax
jne 0x40c3ec
push str.SetupDiEnumDeviceInterfacesA
push edi
call esi
mov dword [0x445b30], eax
test eax, eax
jne 0x40c3ec
push str.SetupDiEnumDeviceInterfacesW
push edi
call esi
mov dword [0x445b30], eax
test eax, eax
je 0x40c592
mov edi, dword [0x445ad0]
push str.SetupDiGetDeviceInstanceIdA
push edi
call esi
mov dword [0x445b18], eax
test eax, eax
jne 0x40c429
push str.SetupDiGetDeviceInstanceIdAA
push edi
call esi
mov dword [0x445b18], eax
test eax, eax
jne 0x40c429
push str.SetupDiGetDeviceInstanceIdAW
push edi
call esi
mov dword [0x445b18], eax
test eax, eax
je 0x40c592
mov edi, dword [0x445ad0]
push str.SetupDiGetDeviceInterfaceDetailA
push edi
call esi
mov dword [0x445aec], eax
test eax, eax
jne 0x40c466
push str.SetupDiGetDeviceInterfaceDetailAA
push edi
call esi
mov dword [0x445aec], eax
test eax, eax
jne 0x40c466
push str.SetupDiGetDeviceInterfaceDetailAW
push edi
call esi
mov dword [0x445aec], eax
test eax, eax
je 0x40c592
mov edi, dword [0x445ad0]
push str.SetupDiGetDeviceRegistryPropertyA
push edi
call esi
mov dword [0x445b04], eax
test eax, eax
jne 0x40c4a3
push str.SetupDiGetDeviceRegistryPropertyAA
push edi
call esi
mov dword [0x445b04], eax
test eax, eax
jne 0x40c4a3
push str.SetupDiGetDeviceRegistryPropertyAW
push edi
call esi
mov dword [0x445b04], eax
test eax, eax
je 0x40c592
mov edi, dword [0x445ad0]
push str.SetupDiDestroyDeviceInfoList
push edi
call esi
mov dword [0x445c18], eax
test eax, eax
jne 0x40c4e0
push str.SetupDiDestroyDeviceInfoListA
push edi
call esi
mov dword [0x445c18], eax
test eax, eax
jne 0x40c4e0
push str.SetupDiDestroyDeviceInfoListW
push edi
call esi
mov dword [0x445c18], eax
test eax, eax
je 0x40c592
mov edi, dword [0x445ad0]
push str.SetupDiOpenDevRegKey
push edi
call esi
mov dword [0x445b08], eax
test eax, eax
jne 0x40c519
push str.SetupDiOpenDevRegKeyA
push edi
call esi
mov dword [0x445b08], eax
test eax, eax
jne 0x40c519
push str.SetupDiOpenDevRegKeyW
push edi
call esi
mov dword [0x445b08], eax
test eax, eax
je 0x40c592
mov edi, dword [0x445ad0]
push str.SetupDiOpenDeviceInterfaceRegKey
push edi
call esi
mov dword [0x445ae0], eax
test eax, eax
jne 0x40c552
push str.SetupDiOpenDeviceInterfaceRegKeyA
push edi
call esi
mov dword [0x445ae0], eax
test eax, eax
jne 0x40c552
push str.SetupDiOpenDeviceInterfaceRegKeyW
push edi
call esi
mov dword [0x445ae0], eax
test eax, eax
je 0x40c592
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 0x40c2e0
push str.program_assertion_failed___could_not_get_system_directory
jmp 0x40c1e2
push str.program_assertion_failed___could_not_get_system_directory
push str.load_system_library
push 1
push edi
call fcn.00407c10
mov dword [0x445b24], 0
add esp, 0x10
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x104
ret