Function at 0x418830
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e266
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x4263e4]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x444], ecx
lea ecx, [ebp - 0x50]
call fcn.0041b4f0
mov dword [ebp - 4], 0
mov byte [ebp - 0x3a], 0
push 6
push 0
push 0
push 0
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0xffffffff
jne 0x4188ac
mov byte [ebp - 0x43d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.0041b4c0
mov al, byte [ebp - 0x43d]
jmp 0x418ebf
mov byte [ebp - 0x39], 0
mov byte [ebp - 0x51], 0
mov dword [ebp - 0x38], 0x1c
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x50]
call fcn.0041b490
mov byte [ebp - 0x3a], al
movzx ecx, byte [ebp - 0x3a]
test ecx, ecx
jne 0x418903
mov byte [ebp - 0x43e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.0041b4c0
mov al, byte [ebp - 0x43e]
jmp 0x418ebf
mov dword [ebp - 0x60], 0
jmp 0x418915
mov edx, dword [ebp - 0x60]
add edx, 1
mov dword [ebp - 0x60], edx
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x418e66
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x6c], 0
push 1
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
mov ecx, dword [ebp - 0x444]
call fcn.004172c0
mov dword [ebp - 0x68], eax
push 2
lea edx, [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 0x444]
call fcn.004172c0
mov dword [ebp - 0x64], eax
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x68]
push edx
mov ecx, dword [ebp - 0x444]
call fcn.004179a0
test eax, eax
jne 0x4189a2
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x64]
push ecx
mov ecx, dword [ebp - 0x444]
call fcn.004179a0
test eax, eax
je 0x4189a9
mov dword [ebp - 0x6c], 1
cmp dword [ebp - 0x6c], 0
je 0x418e3b
lea ecx, [ebp - 0xb0]
call fcn.00403ca0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x160]
call fcn.00403ca0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x88]
call fcn.00403ca0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x144]
call fcn.00403d00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1f4]
call fcn.00403da0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x88]
call fcn.00403e30
lea ecx, [ebp - 0x160]
call fcn.00403e30
lea ecx, [ebp - 0xb0]
call fcn.00403e30
lea edx, [ebp - 0xb0]
push edx
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp - 0x444]
call fcn.004179f0
movzx ecx, al
test ecx, ecx
je 0x418b16
lea edx, [ebp - 0x1f4]
push edx
lea eax, [ebp - 0x144]
push eax
lea ecx, [ebp - 0xb0]
call fcn.00402000
push eax
mov ecx, dword [ebp - 0x444]
call fcn.004183c0
movzx ecx, al
test ecx, ecx
je 0x418b16
mov byte [ebp - 0x2fc], 0
push 0x103
push 0
lea edx, [ebp - 0x2fb]
push edx
call fcn.00409340
add esp, 0xc
mov dword [ebp - 0x300], 0x104
lea ecx, [ebp - 0x1bc]
call fcn.00402000
push eax
lea ecx, [ebp - 0x160]
call fcn.004027d0
push 0
push str.oem
lea ecx, [ebp - 0x160]
call fcn.00403e90
mov dword [ebp - 0x304], eax
cmp dword [ebp - 0x304], 0xffffffff
je 0x418b16
lea eax, [ebp - 0x300]
push eax
lea ecx, [ebp - 0x2fc]
push ecx
lea ecx, [ebp - 0x1bc]
call fcn.00402000
push eax
call dword [ebp - 0x48]
test eax, eax
jne 0x418b16
push 0x5c
lea edx, [ebp - 0x2fc]
push edx
call fcn.00404240
add esp, 8
mov byte [eax], 0
lea eax, [ebp - 0x2fc]
push eax
lea ecx, [ebp - 0x88]
call fcn.004027d0
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x90], 0
mov ecx, dword [ebp + 0x10]
mov byte [ecx], 0
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx]
test eax, eax
je 0x418b44
mov dword [ebp - 0x94], 0x24
lea ecx, [ebp - 0x90]
push ecx
push 0
mov edx, dword [ebp - 0x94]
push edx
lea ecx, [ebp - 0x160]
call fcn.00402000
push eax
call dword [ebp - 0x4c]
test eax, eax
jne 0x418b93
mov byte [ebp - 0x39], 1
cmp dword [ebp - 0x90], 0
je 0x418b7a
mov eax, dword [ebp + 0x10]
mov byte [eax], 1
push str.RemoveDriver:_CDllDIFxAPIThis.m_pfn_DriverPackageUninstallA_Success._n
push 2
call fcn.004168e0
push eax
call fcn.00416130
add esp, 0xc
xor ecx, ecx
jne 0x418b7a
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x444]
call fcn.00417670
mov byte [ebp - 0x89], al
movzx eax, byte [ebp - 0x89]
test eax, eax
je 0x418bbf
mov dword [ebp - 0x448], str.true
jmp 0x418bc9
mov dword [ebp - 0x448], str.false
mov ecx, dword [ebp - 0x448]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.FindExistingDevice_HwId_s____s_n
push 2
call fcn.004168e0
push eax
call fcn.00416130
add esp, 0x14
xor eax, eax
jne 0x418ba8
movzx ecx, byte [ebp - 0x89]
test ecx, ecx
je 0x418df0
mov dword [ebp - 0x314], 8
mov dword [ebp - 0x310], 5
mov dword [ebp - 0x30c], 1
mov dword [ebp - 0x308], 0
push 0x10
lea edx, [ebp - 0x314]
push edx
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiSetClassInstallParamsA]
test eax, eax
je 0x418c72
lea edx, [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x5c]
push eax
push 5
call dword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
test eax, eax
je 0x418c72
mov byte [ebp - 0x39], 1
push str.RemoveDriver:_SetupDiCallClassInstaller_Success._n
push 2
call fcn.004168e0
push eax
call fcn.00416130
add esp, 0xc
xor ecx, ecx
jne 0x418c57
jmp 0x418cba
push str.RemoveDriver:_SetupDiCallClassInstaller_Failed._Use_SetupDiRemoveDevice_n
push 2
call fcn.004168e0
push eax
call fcn.00416130
add esp, 0xc
xor edx, edx
jne 0x418c72
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiRemoveDevice]
test eax, eax
je 0x418cba
push str.RemoveDriver:_SetupDiRemoveDevice_Success._n
push 2
call fcn.004168e0
push eax
call fcn.00416130
add esp, 0xc
xor edx, edx
jne 0x418c9d
mov byte [ebp - 0x39], 1
movzx eax, byte [ebp - 0x39]
test eax, eax
je 0x418d73
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
test edx, edx
je 0x418d73
lea ecx, [ebp - 0x160]
call fcn.00402790
test eax, eax
jbe 0x418d35
lea ecx, [ebp - 0x160]
call fcn.00402000
push eax
call fcn.0041b5d0
add esp, 4
movzx eax, al
test eax, eax
je 0x418d35
lea ecx, [ebp - 0x160]
call fcn.00402000
push eax
push str.RemoveDriver:_del_inf_file____s_n
push 2
call fcn.004168e0
push eax
call fcn.00416130
add esp, 0x10
xor ecx, ecx
jne 0x418cfe
lea ecx, [ebp - 0x160]
call fcn.00402000
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x88]
call fcn.00402790
test eax, eax
jbe 0x418d73
lea ecx, [ebp - 0x88]
call fcn.00402000
push eax
call fcn.0041b5d0
add esp, 4
movzx edx, al
test edx, edx
je 0x418d73
lea ecx, [ebp - 0x88]
call fcn.00402000
push eax
call fcn.0041b960
add esp, 4
movzx eax, byte [ebp - 0x39]
test eax, eax
je 0x418df0
push 0x128
push 0
lea ecx, [ebp - 0x43c]
push ecx
call fcn.00409340
add esp, 0xc
mov dword [ebp - 0x43c], 0x128
lea edx, [ebp - 0x43c]
push edx
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstallParamsA]
test eax, eax
je 0x418df0
mov edx, dword [ebp - 0x438]
and edx, 0x100
jne 0x418ddb
mov eax, dword [ebp - 0x438]
and eax, 0x80
jne 0x418ddb
mov dword [ebp - 0x44c], 0
jmp 0x418de5
mov dword [ebp - 0x44c], 1
mov ecx, dword [ebp + 0x10]
mov dl, byte [ebp - 0x44c]
mov byte [ecx], dl
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x1f4]
call fcn.00403df0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x144]
call fcn.00403d50
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x88]
call fcn.00401f50
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x160]
call fcn.00401f50
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xb0]
call fcn.00401f50
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp - 0x444]
call fcn.004173d0
mov ecx, dword [ebp - 0x64]
push ecx
mov ecx, dword [ebp - 0x444]
call fcn.004173d0
cmp dword [ebp - 0x6c], 0
je 0x418e61
jmp 0x418e66
jmp 0x41890c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x58], eax
mov edx, dword [ebp - 0x5c]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
cmp dword [ebp - 0x58], 0
je 0x418e94
cmp dword [ebp - 0x58], 0x103
je 0x418e94
mov dword [ebp - 0x450], 0
jmp 0x418e9e
mov dword [ebp - 0x450], 1
mov al, byte [ebp - 0x450]
mov byte [ebp - 0x43f], al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.0041b4c0
mov al, byte [ebp - 0x43f]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00405248
mov esp, ebp
pop ebp
ret 0xc