Function at 0x401d80
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53fd7b
mov eax, dword fs:[0]
push eax
sub esp, 0x694
mov eax, dword [0x5a1ec0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x674], ebx
call fcn.0040a604
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x401dd5
push 0x80004005
call fcn.00401b60
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x664], eax
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.00402860
mov ecx, esi
test eax, eax
jne 0x401e2d
call fcn.004028b0
cmp eax, 1
jne 0x401e17
push str.XP_x86_OS
call fcn.004011e0
add esp, 4
push 0xd
push str.Realtek.NTx86
jmp 0x401e61
push str.Vista_Win7_x86_OS
call fcn.004011e0
add esp, 4
push 0xf
push str.Realtek.NTx86.6
jmp 0x401e61
call fcn.004028b0
cmp eax, 1
jne 0x401e4d
push str.XP_x64OS
call fcn.004011e0
add esp, 4
push 0xf
push str.Realtek.NTamd64
jmp 0x401e61
push str.Vista_Win7_x64_OS
call fcn.004011e0
add esp, 4
push 0x11
push str.Realtek.NTamd64.6
lea ecx, [ebp - 0x664]
call fcn.00404250
mov esi, dword [sym.imp.SETUPAPI.dll_SetupGetInfFileListA]
lea eax, [ebp - 0x67c]
push eax
push 0
push 0
push 2
push ebx
mov dword [ebp - 0x680], 0
call esi
test eax, eax
jne 0x401ebe
mov edx, dword [ebp - 0x664]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x401eb7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x4023cd
push dword [ebp - 0x67c]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0
push dword [ebp - 0x67c]
mov dword [ebp - 0x678], eax
push eax
push 2
push ebx
call esi
test eax, eax
je 0x401e90
mov ecx, dword [ebp - 0x678]
mov esi, dword [ebp - 0x664]
cmp byte [ecx], 0
mov ebx, ecx
mov dword [ebp - 0x66c], ecx
je 0x402395
mov eax, dword [ebp - 0x670]
mov dword [ebp - 0x668], eax
lea ecx, [ecx]
mov eax, dword [ebp - 0x67c]
add eax, ecx
cmp ebx, eax
jae 0x40239d
lea ecx, [ebp - 0x50]
mov edi, ebx
mov eax, ecx
mov dword [ebp - 0x668], 0
mov edx, pe_nt_image_headers32
sub edi, eax
jmp 0x401f40
lea eax, [edx + 0x7ffffefe]
test eax, eax
je 0x401f59
mov al, byte [edi + ecx]
test al, al
je 0x401f59
mov byte [ecx], al
inc ecx
dec edx
jne 0x401f40
jmp 0x401f5d
test edx, edx
jne 0x401f5e
dec ecx
lea eax, [ebp - 0x50]
push eax
mov byte [ecx], 0
call fcn.005258f3
lea eax, [ebp - 0x50]
push 0x551a0c
push eax
mov word [ebp - 0x4d], 0
call fcn.00525733
add esp, 0xc
test eax, eax
jne 0x40236e
mov edi, dword [ebp - 0x674]
lea ecx, [ebp - 0x358]
mov eax, ecx
mov edx, pe_nt_image_headers32
sub edi, eax
mov edi, edi
lea eax, [edx + 0x7ffffefe]
test eax, eax
je 0x401fb9
mov al, byte [ecx + edi]
test al, al
je 0x401fb9
mov byte [ecx], al
inc ecx
dec edx
jne 0x401fa0
jmp 0x401fbd
test edx, edx
jne 0x401fbe
dec ecx
push ebx
push pe_nt_image_headers32
lea eax, [ebp - 0x358]
push eax
mov byte [ecx], 0
call fcn.004042f0
push 0
push 2
push 0
lea eax, [ebp - 0x358]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupOpenInfFileA]
mov ebx, eax
mov dword [ebp - 0x670], ebx
cmp ebx, 0xffffffff
je 0x402176
mov edi, dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
lea eax, [ebp - 0x690]
push eax
push str.Catalogfile
push str.Version
push ebx
call edi
test eax, eax
je 0x4021bb
push 0
push pe_nt_image_headers32
lea eax, [ebp - 0x458]
push eax
push 1
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
test eax, eax
je 0x4021bb
lea eax, [ebp - 0x458]
push str.rtsuvc.cat
push eax
call fcn.00525733
add esp, 8
test eax, eax
jne 0x4021bb
lea eax, [ebp - 0x358]
push eax
push str.Find_Matched_InfFile
mov dword [ebp - 0x668], 1
call fcn.00401120
add esp, 8
lea eax, [ebp - 0x690]
push eax
push 0
push esi
push ebx
call edi
test eax, eax
je 0x402176
mov esi, dword [ebp - 0x680]
mov eax, esi
shl eax, 8
lea edi, [ebp - 0x458]
sub edi, eax
lea ebx, [eax + 0x5a3548]
sub edi, 0x5a3548
lea esp, [esp]
push 0
push pe_nt_image_headers32
lea eax, [ebp - 0x458]
push eax
push 2
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
test eax, eax
je 0x402122
mov edx, pe_nt_image_headers32
mov eax, ebx
jmp 0x4020e0
lea ecx, [edx + 0x7ffffefe]
test ecx, ecx
je 0x4020f9
mov cl, byte [eax + edi]
test cl, cl
je 0x4020f9
mov byte [eax], cl
inc eax
dec edx
jne 0x4020e0
jmp 0x4020fd
test edx, edx
jne 0x4020fe
dec eax
mov byte [eax], 0
lea eax, [ebp - 0x458]
push eax
push str.Find_Matched_VIDPID
inc esi
sub edi, 0x100
add ebx, 0x100
call fcn.00401120
add esp, 8
lea eax, [ebp - 0x6a0]
push eax
lea eax, [ebp - 0x690]
push eax
mov dword [0x5a3544], esi
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
movq xmm0, qword [ebp - 0x6a0]
movq qword [ebp - 0x690], xmm0
movq xmm0, qword [ebp - 0x698]
movq qword [ebp - 0x688], xmm0
test eax, eax
jne 0x4020b0
mov ebx, dword [ebp - 0x670]
mov dword [ebp - 0x680], esi
mov esi, dword [ebp - 0x664]
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov edi, dword [ebp - 0x668]
mov ebx, dword [ebp - 0x66c]
test edi, edi
je 0x402374
lea ecx, [ebp - 0x55c]
mov edi, ebx
mov eax, ecx
mov edx, pe_nt_image_headers32
sub edi, eax
lea eax, [edx + 0x7ffffefe]
test eax, eax
je 0x4021cd
mov al, byte [ecx + edi]
test al, al
je 0x4021cd
mov byte [ecx], al
inc ecx
dec edx
jne 0x4021a2
jmp 0x4021d1
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov ebx, dword [ebp - 0x66c]
jmp 0x40236e
test edx, edx
jne 0x4021d2
dec ecx
mov byte [ecx], 0
lea ecx, [ebp - 0x660]
mov edi, ebx
mov eax, ecx
mov edx, pe_nt_image_headers32
sub edi, eax
lea eax, [edx + 0x7ffffefe]
test eax, eax
je 0x4021ff
mov al, byte [ecx + edi]
test al, al
je 0x4021ff
mov byte [ecx], al
inc ecx
dec edx
jne 0x4021e6
jmp 0x402203
test edx, edx
jne 0x402204
dec ecx
mov edi, dword [ebp - 0x674]
mov byte [ecx], 0
lea ecx, [ebp - 0x258]
mov eax, ecx
mov edx, pe_nt_image_headers32
sub edi, eax
lea esp, [esp]
lea eax, [edx + 0x7ffffefe]
test eax, eax
je 0x402239
mov al, byte [ecx + edi]
test al, al
je 0x402239
mov byte [ecx], al
inc ecx
dec edx
jne 0x402220
jmp 0x40223d
test edx, edx
jne 0x40223e
dec ecx
mov edi, dword [ebp - 0x674]
mov byte [ecx], 0
lea ecx, [ebp - 0x154]
mov eax, ecx
mov edx, pe_nt_image_headers32
sub edi, eax
lea eax, [edx + 0x7ffffefe]
test eax, eax
je 0x40226f
mov al, byte [edi + ecx]
test al, al
je 0x40226f
mov byte [ecx], al
inc ecx
dec edx
jne 0x402256
jmp 0x402273
test edx, edx
jne 0x402274
dec ecx
lea eax, [ebp - 0x660]
push 0x551a5c
push eax
mov byte [ecx], 0
call fcn.00525a22
add esp, 8
mov dword [eax], 0x464e502e
lea eax, [ebp - 0x55c]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x258]
push eax
call fcn.004042f0
lea eax, [ebp - 0x660]
push eax
push pe_nt_image_headers32
lea eax, [ebp - 0x154]
push eax
call fcn.004042f0
push str.Setupapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x402303
push str.SetupUninstallOEMInfA
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x402303
push 0
push 1
lea ecx, [ebp - 0x55c]
push ecx
call eax
lea eax, [ebp - 0x55c]
push eax
push str.UninstallOEMInfFn
call fcn.00401120
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x80
lea eax, [ebp - 0x258]
push eax
call edi
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x258]
push eax
push str.DeleteInfFiles
call fcn.00401120
add esp, 8
lea eax, [ebp - 0x154]
push 0x80
push eax
call edi
lea eax, [ebp - 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x154]
push eax
push str.DeletePnfFiles
call fcn.00401120
add esp, 8
mov edi, dword [ebp - 0x668]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp - 0x678]
inc ebx
add ebx, eax
mov dword [ebp - 0x66c], ebx
cmp byte [ebx], 0
jne 0x401f10
jmp 0x4023a3
mov edi, dword [ebp - 0x670]
jmp 0x4023a3
mov edi, dword [ebp - 0x668]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4023cb
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052505f
mov esp, ebp
pop ebp
ret 4