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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10e70]
mov eax, 0x10f70
call fcn.140193d30
sub rsp, rax
mov qword [rbp - 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x10fc0], rbx
mov rax, qword [0x140260d50]
xor rax, rsp
mov qword [rbp + 0x10e60], rax
mov r14, rdx
mov qword [rbp - 0x78], rdx
mov rdi, rcx
mov qword [rbp - 0x68], rdx
lea rcx, [rsp + 0x60]
call fcn.14004f524
nop
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp + 0x660]
call fcn.140193010
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x450]
call fcn.140193010
mov edx, 0x104
lea rcx, [rbp + 0x450]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rbx, [rdi + 0x38]
mov qword [rbp - 0x70], rbx
mov rcx, rbx
call fcn.140001450
lea r12, [rdi + 0x40]
mov qword [rsp + 0x58], r12
mov rcx, r12
call fcn.140001450
lea rcx, [rbp + 0x450]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
cmp word [rbp + rcx*2 + 0x44e], 0x5c
je 0x140004945
lea rdx, [0x14021120c]
lea rcx, [rbp + 0x450]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
add rdi, 0x30
mov qword [rsp + 0x38], rdi
mov rcx, qword [rdi]
or rsi, 0xffffffffffffffff
cmp dword [rcx - 0x10], 0
jne 0x140004a3b
lea rdx, [0x140211210]
lea rcx, [rbp + 0x450]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rdx, [rbp + 0x200]
lea rcx, [rbp + 0x450]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, rsi
jne 0x140004a06
mov rax, qword [rdi]
lea rdx, [rax - 0x18]
mov rdi, qword [rdx]
or rsi, rsi
cmp dword [rdx + 8], 0
je 0x1400049f6
cmp dword [rdx + 0x10], 0
jge 0x1400049cb
cmp dword [rax - 0xc], 0
jge 0x1400049b6
mov ecx, 0x80070057
call fcn.140001000
int3
xor r13d, r13d
mov dword [rax - 0x10], r13d
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx]
mov word [rax], r13w
jmp 0x1400049f6
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400049e1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov rcx, qword [rsp + 0x38]
mov qword [rcx], rax
lea rcx, [rsp + 0x60]
call fcn.14004f9c0
nop
jmp 0x140004e82
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
mov rcx, rsi
lea rdi, [rbp + 0x450]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rbp + 0x450]
mov rdi, qword [rsp + 0x38]
mov rcx, rdi
call fcn.1400014d0
jmp 0x140004a71
lea rdx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
jne 0x140004a68
mov rcx, rdi
call fcn.140001450
nop
lea rcx, [rsp + 0x60]
call fcn.14004f9c0
nop
or rsi, 0xffffffffffffffff
jmp 0x140004e82
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FindClose]
xor edx, edx
mov r8d, 0xfffe
lea rcx, [rbp + 0xe60]
call fcn.140193010
mov rdx, qword [rdi]
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x20], 0x7fff
lea r9, [rbp + 0xe60]
lea r8, [0x1402145dc]
xor edx, edx
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
jne 0x140004ad3
mov rcx, rbx
call fcn.140001450
mov rcx, r12
call fcn.140001450
nop
lea rcx, [rsp + 0x60]
call fcn.14004f9c0
nop
jmp 0x140004e82
call fcn.14004cde4
mov rdx, rax
xor r13d, r13d
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
jne 0x140004af6
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
lea rax, [rbp + 0xe60]
mov ecx, 9
cmp word [rax], 0
jne 0x140004b24
cmp word [rax + 2], 0
je 0x140004b2a
mov word [rax], cx
add rax, 2
jmp 0x140004b14
mov qword [rsp + 0x50], r13
lea r8, [rsp + 0x50]
lea rdx, [0x14021122c]
lea rcx, [rbp + 0xe60]
call fcn.14018f918
mov r12, rax
test rax, rax
je 0x140004c3c
call fcn.14004cde4
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
je 0x140004c31
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
test r12, r12
je 0x140004bbe
test r12, 0xffffffffffff0000
jne 0x140004bab
movzx edi, r12w
mov ecx, edi
call fcn.14004cbb8
test rax, rax
je 0x140004bd2
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.1400012a0
jmp 0x140004bd2
xor eax, eax
mov rcx, rsi
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x140004bc1
mov ecx, r13d
mov r8d, ecx
mov rdx, r12
lea rcx, [rsp + 0x40]
call fcn.1400014d0
nop
lea r8, [rsp + 0x40]
mov rdx, qword [rsp + 0x70]
lea rcx, [rsp + 0x60]
call fcn.14004fb34
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140004c06
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea r8, [rsp + 0x50]
lea rdx, [0x14021122c]
xor ecx, ecx
call fcn.14018f918
mov r12, rax
test rax, rax
jne 0x140004b53
mov rbx, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x38]
jmp 0x140004c3c
mov ecx, 0x80004005
call fcn.140001000
int3
mov r12d, r13d
mov dword [rsp + 0x30], r13d
mov r15, r13
mov rcx, qword [rsp + 0x70]
test rcx, rcx
jle 0x140004e5c
nop word [rax + rax]
mov rdx, qword [rdi]
test r15, r15
js 0x140004e56
cmp r15, rcx
jge 0x140004e56
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x20], 0x400
lea r9, [rbp + 0x660]
lea r8, [0x1402145dc]
mov rdx, qword [rax + r15*8]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor eax, eax
mov rcx, rsi
lea rdi, [rbp + 0x660]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x140004d16
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x140004d9b
cmp dword [rdx + 0x10], eax
jge 0x140004ce9
cmp dword [rbx - 0xc], eax
jl 0x140004e35
mov dword [rbx - 0x10], r13d
mov word [rbx], r13w
jmp 0x140004d9b
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140004cff
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
jmp 0x140004d9b
mov r14d, dword [rbx - 0x10]
lea r12, [rbp + 0x660]
sub r12, rbx
sar r12, 1
test ecx, ecx
js 0x140004e4b
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x140004d51
mov edx, edi
lea rcx, [rsp + 0x48]
call fcn.1400015c0
mov rbx, qword [rsp + 0x48]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp r12, r14
lea r14, [rax + rax]
mov r9, r14
ja 0x140004d75
lea r8, [rbx + r12*2]
call fcn.14018e5f0
jmp 0x140004d81
lea r8, [rbp + 0x660]
call fcn.14018e7d0
cmp edi, dword [rbx - 0xc]
jg 0x140004e40
mov dword [rbx - 0x10], edi
mov word [r14 + rbx], r13w
mov r12d, dword [rsp + 0x30]
mov r14, qword [rbp - 0x78]
cmp dword [rbx - 0x10], 1
jl 0x140004e13
lea rdx, str.Delete_Printer_Name
mov rcx, qword [r14]
call fcn.14018ea5c
test eax, eax
jne 0x140004dc9
xor eax, eax
mov rcx, rsi
lea rdi, [rbp + 0x660]
repne scasw ax, word [rdi]
mov rdi, qword [rbp - 0x70]
jmp 0x140004df0
lea rdx, str.Delete_Driver_Name
mov rcx, qword [r14]
call fcn.14018ea5c
test eax, eax
jne 0x140004e13
xor eax, eax
mov rcx, rsi
lea rdi, [rbp + 0x660]
repne scasw ax, word [rdi]
mov rdi, qword [rsp + 0x58]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rbp + 0x660]
mov rcx, rdi
call fcn.140006350
mov edx, 9
mov rcx, rdi
call fcn.140005e70
inc r12d
mov dword [rsp + 0x30], r12d
inc r15
movsxd rax, r12d
mov rcx, qword [rsp + 0x70]
cmp rax, rcx
jge 0x140004e5c
mov rdi, qword [rsp + 0x38]
jmp 0x140004c60
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, 0x80070057
call fcn.140001000
int3
call fcn.14004d690
nop
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140004e77
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rcx, [rsp + 0x60]
call fcn.14004f9c0
nop
mov rdx, qword [r14]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140004e9d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp + 0x10e60]
xor rcx, rsp
call fcn.14018e5d0
mov rbx, qword [rsp + 0x10fc0]
add rsp, 0x10f70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret