Function at 0x42aa14
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbb0
push esi
push edi
mov eax, 0x57041c
call fcn.00503e60
mov esi, 0x56f894
lea edi, [ebp - 0x144]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x144]
push eax
push 0x104
call sub.KERNEL32.DLL_GetCurrentDirectoryA
mov edx, dword [ebp + 0xc]
movsx ecx, byte [edx]
cmp ecx, 0x5c
je 0x42aa6c
push 0x570298
lea eax, [ebp - 0x144]
push eax
call fcn.00503980
add esp, 8
push 0x3a
push dword [ebp + 0xc]
call fcn.00503b80
add esp, 8
test eax, eax
jne 0x42aa91
push dword [ebp + 0xc]
lea edx, [ebp - 0x144]
push edx
call fcn.00503980
add esp, 8
jmp 0x42aaa3
push dword [ebp + 0xc]
lea ecx, [ebp - 0x144]
push ecx
call fcn.00503a5c
add esp, 8
push 0xf003f
push 0
push 0
call sub.ADVAPI32.DLL_OpenSCManagerA
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x42ab39
mov esi, 0x56f999
lea edi, [ebp - 0x248]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
call sub.KERNEL32.DLL_GetLastError
push eax
push str.Failed_to_open_service_manager__error_code__lu
lea eax, [ebp - 0x248]
push eax
call fcn.00506898
add esp, 0xc
lea edx, [ebp - 0x248]
push edx
call fcn.0042a588
pop ecx
mov word [ebp - 0x20], 8
lea edx, [ebp - 0x248]
lea eax, [ebp - 4]
call fcn.0050efe0
inc dword [ebp - 0x14]
mov edx, dword [eax]
mov eax, dword [sym.xscan_gui.exe__MainForm]
mov eax, dword [eax]
call fcn.00417710
dec dword [ebp - 0x14]
lea eax, [ebp - 4]
mov edx, 2
call fcn.0050f140
xor eax, eax
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
jmp 0x42ac96
lea ecx, [ebp - 0x144]
push ecx
push dword [ebp + 8]
push dword [ebp - 0x34]
call fcn.0042a590
add esp, 0xc
mov dword [ebp - 0x3c], eax
push dword [ebp + 8]
push dword [ebp - 0x34]
call fcn.0042a61c
add esp, 8
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x42abee
mov esi, 0x56fa9d
lea edi, [ebp - 0x34c]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
call sub.KERNEL32.DLL_GetLastError
push eax
push dword [ebp + 8]
push str.Failed_to_start_driver___s___error_code:__lu
lea eax, [ebp - 0x34c]
push eax
call fcn.00506898
add esp, 0x10
lea edx, [ebp - 0x34c]
push edx
call fcn.0042a588
pop ecx
mov word [ebp - 0x20], 0x14
lea edx, [ebp - 0x34c]
lea eax, [ebp - 8]
call fcn.0050efe0
inc dword [ebp - 0x14]
mov edx, dword [eax]
mov eax, dword [sym.xscan_gui.exe__MainForm]
mov eax, dword [eax]
call fcn.00417710
dec dword [ebp - 0x14]
lea eax, [ebp - 8]
mov edx, 2
call fcn.0050f140
xor eax, eax
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
jmp 0x42ac96
push dword [ebp - 0x34]
call sub.ADVAPI32.DLL_CloseServiceHandle
push dword [ebp + 8]
call fcn.0042a79c
pop ecx
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x42ac87
mov esi, 0x56fba1
lea edi, [ebp - 0x450]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
call sub.KERNEL32.DLL_GetLastError
push eax
push dword [ebp + 8]
push str.Failed_to_open_driver___s___error_code__lu
lea eax, [ebp - 0x450]
push eax
call fcn.00506898
add esp, 0x10
lea edx, [ebp - 0x450]
push edx
call fcn.0042a588
pop ecx
mov word [ebp - 0x20], 0x20
lea edx, [ebp - 0x450]
lea eax, [ebp - 0xc]
call fcn.0050efe0
inc dword [ebp - 0x14]
mov edx, dword [eax]
mov eax, dword [sym.xscan_gui.exe__MainForm]
mov eax, dword [eax]
call fcn.00417710
dec dword [ebp - 0x14]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.0050f140
xor eax, eax
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
jmp 0x42ac96
mov eax, 1
mov edx, dword [ebp - 0x30]
mov dword fs:[0], edx
pop edi
pop esi
mov esp, ebp
pop ebp
ret