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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3fc
mov dword [esp], str.Setupapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
sub esp, 4
test eax, eax
mov dword [ebp - 0x3cc], eax
je 0x40b42e
mov dword [esp + 4], str.SetupCopyOEMInfA
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 8
test eax, eax
mov dword [ebp - 0x3d4], eax
je 0x40b1f9
lea edi, [ebp - 0x360]
xor eax, eax
mov ecx, 0x41
lea ebx, [ebp - 0x360]
rep stosd dword es:[edi], eax
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
sub esp, 8
test eax, eax
jne 0x40b440
mov ebx, 0x4e25
mov eax, dword [ebp - 0x3cc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 4
call fcn.0042c430
mov dword [ebp - 0x3d0], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], 0x13
mov dword [ebp - 0x3d4], eax
mov dword [ebp - 0x378], ebx
call fcn.004ed900
mov ecx, 0x7365
mov dword [eax], 0x74736e49
mov dword [eax + 4], 0x446c6c61
mov dword [eax + 8], 0x65766972
mov dword [eax + 0xc], 0x6c694672
mov word [eax + 0x10], cx
mov byte [eax + 0x12], 0
mov dword [ebp - 0x378], eax
mov edx, dword [ebp - 0x3d4]
mov eax, dword [ebp - 0x3d0]
mov dword [esp + 0x10], str.Copy_inf_file_error._error_code___d
mov dword [esp + 0xc], 0x20b
mov dword [esp + 8], edi
mov dword [esp + 0x14], edx
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x370], 0x12
mov dword [ebp - 0x374], 0x12
call fcn.0042ce70
mov eax, dword [ebp - 0x378]
cmp eax, ebx
je 0x40b2d1
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3e0]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindClose]
sub esp, 4
test eax, eax
je 0x40b33f
call fcn.0042c430
mov dword [esp], str.InstallDriverFiles
mov ecx, edi
mov dword [ebp - 0x3d0], eax
call fcn.00409100
mov eax, dword [ebp - 0x3d0]
sub esp, 4
mov dword [esp + 0x10], str.findclose_failed
mov dword [esp + 0xc], 0x20d
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0042ce70
mov eax, dword [ebp - 0x378]
cmp eax, ebx
je 0x40b33f
mov dword [esp], eax
call fcn.004ed8c0
call fcn.0042c430
mov dword [esp], 0x13
mov dword [ebp - 0x3d0], eax
mov dword [ebp - 0x378], ebx
call fcn.004ed900
mov edx, 0x7365
mov dword [eax], 0x74736e49
mov dword [eax + 4], 0x446c6c61
mov dword [eax + 8], 0x65766972
mov dword [eax + 0xc], 0x6c694672
mov word [eax + 0x10], dx
mov byte [eax + 0x12], 0
mov dword [ebp - 0x378], eax
mov eax, dword [ebp - 0x3d0]
mov dword [esp + 0x10], str.InstallDirverFiles_exit
mov dword [esp + 0xc], 0x20f
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x370], 0x12
mov dword [ebp - 0x374], 0x12
call fcn.0042ce70
mov eax, dword [ebp - 0x378]
cmp eax, ebx
je 0x40b3da
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3cc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x390]
sub esp, 4
cmp eax, esi
je 0x40b3fe
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3a8]
lea esi, [ebp - 0x3a0]
cmp eax, esi
je 0x40b416
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3c0]
lea esi, [ebp - 0x3b8]
cmp eax, esi
je 0x40b42e
mov dword [esp], eax
call fcn.004ed8c0
lea esp, [ebp - 0xc]
mov ebx, 0x4e25
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 4
lea eax, [ebp - 0x3b8]
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x3c0]
mov dword [ebp - 0x3c0], eax
mov eax, dword [ebp + 8]
mov edx, dword [esi + 4]
mov eax, dword [eax]
add edx, eax
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00409050
mov eax, 0x7fffffff
sub eax, dword [ebp - 0x3bc]
sub esp, 8
cmp eax, 5
jbe 0x40bbca
lea ecx, [ebp - 0x3c0]
mov dword [esp + 4], 6
mov dword [esp], str..inf
call fcn.004cde40
lea eax, [ebp - 0x158]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c0]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
sub esp, 8
cmp eax, 0xffffffff
mov dword [ebp - 0x3e0], eax
je 0x40b970
lea eax, [ebp - 0x254]
mov dword [esp], 0x13
mov dword [ebp - 0x3d0], eax
mov dword [ebp - 0x25c], eax
call fcn.004ed900
mov ecx, 0x5c73
mov dword [ebp - 0x25c], eax
mov dword [eax], 0x7379735c
mov dword [eax + 4], 0x336d6574
mov dword [eax + 8], 0x72645c32
mov edx, ebx
mov dword [eax + 0xc], 0x72657669
mov word [eax + 0x10], cx
mov byte [eax + 0x12], 0
mov eax, dword [ebp - 0x3cc]
mov dword [ebp - 0x254], 0x12
mov dword [ebp - 0x258], 0x12
mov esi, eax
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x40b534
mov ecx, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
shr ecx, 0x10
test eax, 0x8080
mov dword [esp], 0
cmove eax, ecx
lea ecx, [edx + 2]
mov dword [ebp - 0x3cc], esi
cmove edx, ecx
mov ecx, eax
add cl, al
lea ecx, [ebp - 0x25c]
sbb edx, 3
sub edx, ebx
mov dword [esp + 0xc], edx
call fcn.004cb7a0
lea esi, [ebp - 0x3a0]
lea edx, [eax + 8]
sub esp, 0x10
mov dword [ebp - 0x3a8], esi
mov ecx, dword [eax]
cmp ecx, edx
je 0x40baa5
mov dword [ebp - 0x3a8], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x3a0], ecx
mov ecx, dword [eax + 4]
mov byte [eax + 8], 0
mov dword [ebp - 0x3a4], ecx
mov dword [eax], edx
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x25c]
cmp eax, dword [ebp - 0x3d0]
je 0x40b5e5
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3d0]
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp + 8]
mov esi, dword [eax]
mov ebx, dword [eax + 4]
mov eax, esi
add eax, ebx
je 0x40b607
test esi, esi
je 0x40bb68
cmp ebx, 0xf
ja 0x40b8f0
cmp ebx, 1
je 0x40b930
test ebx, ebx
mov eax, dword [ebp - 0x3d0]
jne 0x40b90f
mov dword [ebp - 0x258], ebx
mov byte [eax + ebx], 0
cmp dword [ebp - 0x258], 0x7fffffff
je 0x40bace
lea ecx, [ebp - 0x25c]
mov dword [esp + 4], 1
mov dword [esp], 0x4fb6f7
call fcn.004cde40
mov eax, dword [ebp - 0x3cc]
lea edx, [ebp - 0x12c]
sub esp, 8
mov esi, eax
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x40b66c
mov ecx, eax
mov dword [ebp - 0x3cc], esi
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
mov ebx, eax
cmove edx, ecx
add bl, al
lea eax, [ebp - 0x12c]
sbb edx, 3
sub edx, eax
mov eax, 0x7fffffff
sub eax, dword [ebp - 0x258]
cmp eax, edx
jb 0x40bb2a
lea eax, [ebp - 0x12c]
lea ecx, [ebp - 0x25c]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004cde40
lea esi, [ebp - 0x388]
lea edx, [eax + 8]
sub esp, 8
mov dword [ebp - 0x390], esi
mov ecx, dword [eax]
cmp ecx, edx
je 0x40b944
mov dword [ebp - 0x390], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x388], ecx
mov ecx, dword [eax + 4]
mov byte [eax + 8], 0
mov dword [ebp - 0x38c], ecx
mov dword [eax], edx
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x25c]
cmp eax, dword [ebp - 0x3d0]
je 0x40b72c
mov dword [esp], eax
call fcn.004ed8c0
lea edi, [ebp - 0x25c]
mov ecx, 0x41
xor eax, eax
rep stosd dword es:[edi], eax
call fcn.0042c430
mov edi, dword [ebp - 0x3a8]
lea ebx, [ebp - 0x370]
mov dword [esp], 0x13
mov dword [ebp - 0x3d8], eax
mov dword [ebp - 0x378], ebx
mov dword [ebp - 0x3dc], edi
mov edi, dword [ebp - 0x390]
call fcn.004ed900
mov edx, 0x7365
mov dword [eax], 0x74736e49
mov dword [eax + 4], 0x446c6c61
mov word [eax + 0x10], dx
mov dword [eax + 8], 0x65766972
mov dword [eax + 0xc], 0x6c694672
mov byte [eax + 0x12], 0
mov dword [ebp - 0x378], eax
mov edx, dword [ebp - 0x3dc]
mov eax, dword [ebp - 0x3d8]
mov dword [esp + 0x14], edi
lea edi, [ebp - 0x378]
mov dword [esp + 0x10], str.Copy_source_file__s______s
mov dword [esp + 0xc], 0x208
mov dword [esp + 0x18], edx
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x370], 0x12
mov dword [ebp - 0x374], 0x12
call fcn.0042ce70
mov eax, dword [ebp - 0x378]
cmp eax, ebx
je 0x40b802
mov dword [esp], eax
call fcn.004ed8c0
lea eax, [ebp - 0x3c4]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0x104
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 0x18], eax
lea eax, [ebp - 0x25c]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x3a8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x390]
mov dword [esp], eax
mov eax, dword [ebp - 0x3d4]
call eax
sub esp, 0x20
test eax, eax
je 0x40b220
lea eax, [ebp - 0x158]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3e0]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov edx, dword [ebp - 0x390]
sub esp, 8
mov ebx, eax
cmp edx, esi
je 0x40b8e5
mov dword [esp], edx
call fcn.004ed8c0
test ebx, ebx
jne 0x40b5e5
mov eax, dword [ebp - 0x3e0]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindClose]
sub esp, 4
test eax, eax
je 0x40ba40
mov eax, dword [ebp - 0x3a8]
lea esi, [ebp - 0x3a0]
cmp eax, esi
je 0x40b8c6
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3c0]
lea esi, [ebp - 0x3b8]
cmp eax, esi
je 0x40b8de
mov dword [esp], eax
call fcn.004ed8c0
xor ebx, ebx
jmp 0x40b1fe
test eax, eax
jne 0x40b5e5
jmp 0x40b894
test ebx, ebx
js 0x40bb5c
lea eax, [ebx + 1]
mov dword [esp], eax
call fcn.004ed900
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x254], ebx
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x25c]
jmp 0x40b627
movzx eax, byte [esi]
mov byte [ebp - 0x254], al
mov eax, dword [ebp - 0x3d0]
jmp 0x40b627
mov ecx, dword [eax + 8]
mov dword [ebp - 0x388], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x384], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x380], ecx
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x37c], ecx
jmp 0x40b700
call fcn.0042c430
lea edi, [ebp - 0x254]
mov dword [esp], 0x13
mov ebx, eax
mov esi, dword [ebp - 0x3c0]
mov dword [ebp - 0x3d0], edi
mov dword [ebp - 0x25c], edi
call fcn.004ed900
mov edx, 0x7365
mov dword [eax], 0x74736e49
mov dword [eax + 4], 0x446c6c61
mov dword [eax + 8], 0x65766972
mov dword [eax + 0xc], 0x6c694672
mov word [eax + 0x10], dx
mov byte [eax + 0x12], 0
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x25c]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], str.InstallDirverFiles_the_file__s_is_INVALID_HANDLE_VALUE
mov dword [esp + 0xc], 0x1fe
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ebx
mov dword [ebp - 0x254], 0x12
mov dword [ebp - 0x258], 0x12
call fcn.0042ce70
mov eax, dword [ebp - 0x25c]
cmp eax, edi
je 0x40ba1d
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3c0]
lea esi, [ebp - 0x3b8]
cmp eax, esi
je 0x40b1f9
mov dword [esp], eax
call fcn.004ed8c0
jmp 0x40b1f9
call fcn.0042c430
lea ecx, [ebp - 0x25c]
mov dword [esp], str.InstallDriverFiles
mov ebx, eax
call fcn.00409100
lea eax, [ebp - 0x25c]
sub esp, 4
mov dword [esp + 0x10], str.FindClose_failed
mov dword [esp + 0xc], 0x217
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ebx
call fcn.0042ce70
mov eax, dword [ebp - 0x25c]
cmp eax, dword [ebp - 0x3d0]
je 0x40b8ae
mov dword [esp], eax
call fcn.004ed8c0
jmp 0x40b8ae
mov ecx, dword [eax + 8]
mov dword [ebp - 0x3a0], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x39c], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x398], ecx
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x394], ecx
jmp 0x40b5b9
mov dword [esp], 0x4fb61a
call fcn.004e7d10
mov ebx, eax
mov eax, dword [ebp - 0x25c]
cmp eax, dword [ebp - 0x3d0]
je 0x40baf2
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3a8]
lea esi, [ebp - 0x3a0]
cmp eax, esi
je 0x40bb0a
mov dword [esp], eax
call fcn.004ed8c0
mov eax, dword [ebp - 0x3c0]
lea esi, [ebp - 0x3b8]
cmp eax, esi
je 0x40bb22
mov dword [esp], eax
call fcn.004ed8c0
mov dword [esp], ebx
call fcn.0043f8d0
mov dword [esp], 0x4fb61a
call fcn.004e7d10
jmp 0x40bada
mov dword [esp], 0x4fb392
call fcn.004e7d10
mov dword [esp], 0x4fb368
call fcn.004e7b80
mov ebx, eax
mov eax, dword [ebp - 0x25c]
cmp eax, dword [ebp - 0x3d0]
jne 0x40bb02
jmp 0x40bb0a
mov dword [esp], 0x4fb61a
call fcn.004e7d10
lea esi, [esi]
lea edi, [edi]