Function at 0x406790
Capabilities:
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46f9d4
mov eax, dword fs:[0]
push eax
mov eax, 0x10edc
call fcn.0044b8a0
mov eax, dword [0x496534]
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 ebx, ecx
mov dword [ebp - 0x10ebc], ebx
push 0x800
lea eax, [ebp - 0xa18]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.0044f210
push 0xfffe
lea eax, [ebp - 0x10a18]
push 0
push eax
call fcn.0044f210
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0044f210
push 0x250
lea eax, [ebp - 0x10c68]
push 0
push eax
call fcn.0044f210
push 0x250
lea eax, [ebp - 0x10eb8]
push 0
push eax
call fcn.0044f210
add esp, 0x3c
lea ecx, [ebp - 0x10ee8]
call fcn.0043ddbe
push 0x104
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 1
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea edi, [ebx + 4]
mov ecx, edi
mov dword [ebp - 0x10ec4], edi
call fcn.00401b60
add ebx, 8
mov ecx, ebx
mov dword [ebp - 0x10ec8], ebx
call fcn.00401b60
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
cmp word [ebp + eax*2 - 0x21a], 0x5c
je 0x4068a0
push 0x4857e0
lea eax, [ebp - 0x218]
push eax
call esi
mov eax, dword [ebp - 0x10ebc]
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jne 0x406909
push 0x485e50
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x10c68]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x40691c
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4068e5
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x10ebc]
push eax
call fcn.00401eb0
jmp 0x40693c
lea ecx, [ebp - 0x10eb8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x406935
mov ebx, dword [ebp - 0x10ebc]
mov ecx, ebx
call fcn.00401b60
mov dword [ebx + 0x10], 2
jmp 0x406d2f
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp + 8]
cmp dword [esi - 0xc], 0
je 0x406c57
push 0xfffe
lea eax, [ebp - 0x10a18]
push 0
push eax
call fcn.0044f210
mov eax, dword [ebp - 0x10ebc]
add esp, 0xc
push dword [eax]
lea eax, [ebp - 0x10a18]
push 0x7fff
push eax
push 0x486438
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
jne 0x4069a5
mov ecx, edi
call fcn.00401b60
mov ecx, ebx
call fcn.00401b60
mov eax, dword [ebp - 0x10ebc]
mov dword [eax + 0x10], 3
jmp 0x406d2f
call fcn.004339ad
mov ecx, eax
test ecx, ecx
jne 0x4069ba
push 0x80004005
call fcn.00401e60
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10ec0], esi
mov byte [ebp - 4], 2
lea eax, [ebp - 0x10a18]
mov ecx, 9
cmp word [eax], 0
jne 0x4069e7
cmp word [eax + 2], 0
je 0x4069ec
mov word [eax], cx
add eax, 2
jmp 0x4069d7
lea eax, [ebp - 0x10ed0]
mov dword [ebp - 0x10ed0], 0
push eax
lea eax, [ebp - 0x10a18]
push 0x485a5c
push eax
call fcn.00455d06
add esp, 0xc
test eax, eax
je 0x406a7d
or ebx, 0xffffffff
nop dword [eax + eax]
push eax
lea ecx, [ebp - 0x10ed4]
call fcn.00401ff0
push eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x10ee8]
push dword [ebp - 0x10ee0]
call fcn.0043e02a
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp - 0x10ed4]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x406a63
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x10ed0]
push eax
push 0x485a5c
push 0
call fcn.00455d06
add esp, 0xc
test eax, eax
jne 0x406a20
mov eax, dword [ebp - 0x10ee0]
xor ebx, ebx
test eax, eax
jle 0x406c3b
nop dword [eax]
test ebx, ebx
js 0x406c76
cmp ebx, eax
jge 0x406c76
mov ecx, dword [ebp - 0x10ebc]
mov eax, dword [ebp - 0x10ee4]
push dword [ecx]
lea ecx, [ebp - 0xa18]
push 0x400
push ecx
push 0x486438
push dword [eax + ebx*4]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0xa18]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406ad4
sub ecx, edx
lea eax, [ebp - 0xa18]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x10ec0]
call fcn.00401eb0
mov esi, dword [ebp - 0x10ec0]
cmp dword [esi - 0xc], 1
jl 0x406c2c
push str.Delete_Printer_Name
push dword [ebp + 8]
call fcn.00451d34
add esp, 8
test eax, eax
jne 0x406b82
lea ecx, [ebp - 0xa18]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406b23
sub ecx, edx
lea eax, [ebp - 0xa18]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.00401780
mov edx, dword [ebp - 0x10ec4]
mov eax, dword [edx]
mov ecx, dword [eax - 0xc]
mov dword [ebp - 0x10ecc], ecx
lea edi, [ecx + 1]
test edi, edi
js 0x406c6c
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or eax, ecx
jge 0x406c00
push edi
mov ecx, edx
call fcn.00401cb0
mov edx, dword [ebp - 0x10ec4]
jmp 0x406c00
push str.Delete_Driver_Name
push dword [ebp + 8]
call fcn.00451d34
add esp, 8
test eax, eax
jne 0x406c2c
lea ecx, [ebp - 0xa18]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406ba3
sub ecx, edx
lea eax, [ebp - 0xa18]
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x10ec8]
push eax
call fcn.00401780
mov edx, dword [ebp - 0x10ec8]
mov eax, dword [edx]
mov ecx, dword [eax - 0xc]
mov dword [ebp - 0x10ecc], ecx
lea edi, [ecx + 1]
test edi, edi
js 0x406c6c
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or eax, ecx
jge 0x406c00
push edi
mov ecx, edx
call fcn.00401cb0
mov edx, dword [ebp - 0x10ec8]
mov ecx, dword [ebp - 0x10ecc]
mov edi, 9
mov eax, dword [edx]
mov word [eax + ecx*2], di
lea edi, [ecx + 1]
mov eax, dword [edx]
cmp edi, dword [eax - 8]
jg 0x406c6c
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [edx]
mov word [eax + edi*2], cx
mov edi, dword [ebp - 0x10ec4]
mov eax, dword [ebp - 0x10ee0]
inc ebx
cmp ebx, eax
jl 0x406a90
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x406c57
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.004339ad
mov ecx, eax
test ecx, ecx
jne 0x406c7b
push 0x80004005
call fcn.00401e60
push 0x80070057
call fcn.00401e60
call fcn.0043340a
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10ec0], esi
mov ebx, dword [ebp - 0x10ebc]
mov ecx, 1
mov byte [ebp - 4], 4
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov edi, dword [ebx]
jge 0x406cbf
push 0x104
lea ecx, [ebp - 0x10ec0]
call fcn.00401cb0
mov esi, dword [ebp - 0x10ec0]
push edi
push 0x104
push esi
push 0x485ebc
push str.UninstDriverPackage
push str.Uninstaller_Info
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push dword [esi - 8]
push esi
call fcn.00451f0d
add esp, 8
test eax, eax
js 0x406c6c
cmp eax, dword [esi - 8]
jg 0x406c6c
xor ecx, ecx
mov dword [esi - 0xc], eax
push 0x485ebc
push esi
mov word [esi + eax*2], cx
call fcn.00455d48
add esp, 8
mov byte [ebp - 4], 1
neg eax
sbb eax, eax
add esi, 0xfffffff0
inc eax
mov dword [ebx + 0xc], eax
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x406d2f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x10ee8]
call fcn.0043ddd5
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x406d5c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.0044ae75
mov esp, ebp
pop ebp
ret 4