Function at 0x40b858
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
mov eax, 0x440b7c
call fcn.004151bc
mov eax, 0x219c
call fcn.00416000
mov eax, dword [0x466c7c]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [ebp - 0x28], esi
mov byte [ebp - 0xd], bl
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x18c]
mov dword [ebp - 4], ebx
cmp eax, ebx
mov dword [ebp - 0x1c], ebx
jbe 0x40bc2a
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetLineTextA]
push dword [ebp - 0x1c]
lea eax, [ebp - 0x58]
lea ecx, [esi + 0x184]
push eax
mov dword [ebp - 0x18], ecx
call fcn.0040ee46
mov eax, dword [eax]
push ebx
push ebx
lea ecx, [ebp - 0x21a8]
push 0x400
push ecx
push 0x2000
push 1
push ebx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupCopyOEMInfA]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x20], eax
call fcn.004329a9
cmp dword [ebp - 0x20], ebx
je 0x40bad2
mov dword [ebp - 0x48], 0x444788
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], 0xa
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 1
push eax
call fcn.0040ee46
mov eax, dword [eax]
push ebx
push 2
push ebx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupOpenInfFileA]
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x20], eax
call fcn.004329a9
lea eax, [ebp - 0x68]
push eax
push ebx
push str.Mfg.Matrox
push dword [ebp - 0x20]
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
mov esi, 0x800
push ebx
lea eax, [ebp - 0x1da8]
push esi
push eax
push ebx
push ebx
lea eax, [ebp - 0x68]
push ebx
push eax
call edi
push ecx
lea eax, [ebp - 0x1da8]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.00432a17
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x4c]
push eax
call fcn.0040bc61
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00432a96
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4c]
call fcn.004329a9
mov eax, dword [ebp - 0x14]
cmp dword [eax - 8], ebx
jle 0x40b9b1
lea eax, [ebp - 0x14]
push ebx
push eax
lea ecx, [ebp - 0x48]
call fcn.0040f0df
test eax, eax
jne 0x40b9b1
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x48]
push eax
call fcn.0040f0ab
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
je 0x40ba0c
push ebx
lea eax, [ebp - 0x1da8]
push esi
push eax
push ebx
push ebx
lea eax, [ebp - 0x68]
push ebx
push eax
call edi
push ecx
lea eax, [ebp - 0x1da8]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.00432a17
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x50]
push eax
call fcn.0040bc61
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00432a96
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x50]
jmp 0x40b987
cmp dword [ebp - 0x3c], ebx
je 0x40bab0
call dword [sym.imp.SETUPAPI.dll_SetupOpenFileQueue]
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x18], eax
mov eax, dword [0x466c7c]
mov dword [ebp - 0x24], eax
push ebx
push ebx
push ebx
push ebx
push ebx
mov byte [ebp - 4], 4
call dword [sym.imp.SETUPAPI.dll_SetupInitDefaultQueueCallbackEx]
cmp dword [ebp - 0x3c], ebx
mov dword [0x4680fc], eax
mov dword [ebp - 0x2c], ebx
jle 0x40ba7a
mov byte [ebp - 0xd], 1
mov eax, esi
mov esi, dword [esi]
add eax, 8
lea ecx, [ebp - 0x24]
push eax
call fcn.00432a96
push 0x404
push ebx
push dword [ebp - 0x24]
push dword [ebp - 0x18]
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.SETUPAPI.dll_SetupInstallFilesFromInfSectionA]
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x3c]
jl 0x40ba49
push dword [0x4680fc]
push 0x40bc48
push dword [ebp - 0x18]
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupCommitFileQueueA]
push dword [0x4680fc]
call dword [sym.imp.SETUPAPI.dll_SetupTermDefaultQueueCallback]
push dword [ebp - 0x18]
call dword [sym.imp.SETUPAPI.dll_SetupCloseFileQueue]
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call fcn.004329a9
push dword [ebp - 0x20]
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov dword [ebp - 0x48], 0x444788
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 5
call fcn.0040f9b6
mov esi, dword [ebp - 0x28]
mov byte [ebp - 4], bl
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [esi + 0x18c]
jb 0x40b89b
cmp byte [ebp - 0xd], bl
je 0x40bc2a
lea eax, [ebp - 0x15a8]
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x40bc2a
lea eax, [ebp - 0x15a8]
push eax
lea eax, [ebp - 0x5a8]
push eax
call fcn.004155a0
mov esi, 0x453458
lea eax, [ebp - 0x5a8]
push esi
push eax
call fcn.004155b0
lea eax, [ebp - 0x5a8]
push str.PDesk
push eax
call fcn.004155b0
lea eax, [ebp - 0x5a8]
push eax
lea eax, [ebp - 0x11a8]
push eax
call fcn.004155a0
lea eax, [ebp - 0x11a8]
push str..
push eax
call fcn.004155b0
add esp, 0x28
lea eax, [ebp - 0x1a8]
push eax
lea eax, [ebp - 0x11a8]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40bc2a
mov eax, dword [ebp - 0x1a8]
not eax
test al, 0x10
je 0x40bc0d
lea eax, [ebp - 0x5a8]
push eax
lea eax, [ebp - 0xda8]
push eax
call fcn.004155a0
lea eax, [ebp - 0xda8]
push esi
push eax
call fcn.004155b0
lea eax, [ebp - 0x17c]
push eax
lea eax, [ebp - 0xda8]
push eax
call fcn.004155b0
lea eax, [ebp - 0x15a8]
push eax
lea eax, [ebp - 0x9a8]
push eax
call fcn.004155a0
lea eax, [ebp - 0x9a8]
push esi
push eax
call fcn.004155b0
lea eax, [ebp - 0x17c]
push eax
lea eax, [ebp - 0x9a8]
push eax
call fcn.004155b0
add esp, 0x30
lea eax, [ebp - 0x9a8]
push ebx
push eax
lea eax, [ebp - 0xda8]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDecompressOrCopyFileA]
lea eax, [ebp - 0x1a8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40bb83
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004329a9
mov ecx, dword [ebp - 0xc]
push 1
pop eax
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret