Function at 0x140003de0
Capabilities:
Check if file exists
Create process on windows
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0xe80]
sub rsp, 0xf80
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0xfc8], rbx
mov rax, qword [0x140010008]
xor rax, rsp
mov qword [rbp + 0xe70], rax
mov rsi, r8
mov rdi, rdx
mov r14, rcx
mov qword [rbp - 0x78], rdx
mov qword [rbp - 0x70], r8
cmp qword [rdx + 0x18], 8
jb 0x140003e36
mov r9, qword [rdx]
jmp 0x140003e39
mov r9, rdi
mov r8, r14
lea rdx, str.Rundll32Command_1__hImpersonationToken_d__WorkPath_s
lea rcx, [0x140010748]
call fcn.1400018a0
test r14, r14
je 0x140004178
cmp qword [rdi + 0x18], 8
jb 0x140003e64
mov rcx, qword [rdi]
jmp 0x140003e67
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140004178
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x50]
call sub.VCRUNTIME140.dll_memset
mov qword [rbp - 0x50], 7
xor r15d, r15d
mov qword [rbp - 0x58], r15
mov word [rbp - 0x68], r15w
xor r8d, r8d
lea rdx, [0x140009668]
lea rcx, [rbp - 0x68]
call fcn.140005860
nop
mov edx, 0x104
lea rcx, [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140003f24
xor edx, edx
mov r8d, 0x410
lea rcx, [rbp + 0x260]
call sub.VCRUNTIME140.dll_memset
lea r9, [rbp + 0x50]
lea r8, str._s_rundll32.exe
mov edx, 0x207
lea rcx, [rbp + 0x260]
call fcn.140006430
cmp word [rbp + 0x260], r15w
jne 0x140003f00
mov r8d, r15d
jmp 0x140003f1b
lea rax, [rbp + 0x260]
or r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x140003f10
lea rdx, [rbp + 0x260]
jmp 0x140003f31
mov r8d, 0x20
lea rdx, str.C:WindowsSystem32_rundll32.exe
lea rcx, [rbp - 0x68]
call fcn.140005860
lea rcx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rcx, qword [rbp - 0x68]
xor edx, edx
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__waccess_s]
test eax, eax
je 0x140003f76
lea rdx, str.Rundll32Command_2_failed__strRundll32Path_not_exist
lea rcx, [0x140010748]
call fcn.1400018a0
nop
lea rcx, [rbp - 0x68]
call fcn.140005600
jmp 0x14000419e
lea r8, str.LenovoBatteryGaugePackage.dll
mov rdx, rdi
lea rcx, [rbp - 0x48]
call fcn.140006110
nop
lea rbx, [rbp - 0x48]
cmp qword [rbp - 0x30], 8
cmovae rbx, qword [rbp - 0x48]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__waccess_s]
test eax, eax
jne 0x14000416c
mov rcx, rbx
call fcn.1400031f0
test al, al
je 0x14000416c
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp + 0x670]
call sub.VCRUNTIME140.dll_memset
cmp qword [rsi + 0x18], 8
jb 0x140003fdb
mov rax, qword [rsi]
jmp 0x140003fde
mov rax, rsi
mov qword [rsp + 0x20], rax
mov r9, rbx
lea r8, str.__s___s
mov edx, 0x3ff
lea rcx, [rbp + 0x670]
call fcn.140006430
lea r8, [rbp + 0x670]
lea rdx, str.Rundll32Command_5_cmd_s
lea rcx, [0x140010748]
call fcn.1400018a0
xor r8d, r8d
mov rdx, r14
lea rcx, [rsp + 0x68]
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x140004059
lea rdx, str.Rundll32Command_6__failed:_CreateEnvironmentBlock
lea rcx, [0x140010748]
call fcn.1400018a0
nop
lea rcx, [rbp - 0x48]
call fcn.140005600
nop
lea rcx, [rbp - 0x68]
call fcn.140005600
jmp 0x14000419e
mov qword [rsp + 0x70], r15
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
xor edx, edx
lea r8d, [rax + 0x60]
lea rcx, [rbp - 0x18]
call sub.VCRUNTIME140.dll_memset
mov dword [rbp - 0x20], 0x68
xor edx, edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__waccess_s]
test eax, eax
je 0x140004097
lea rdx, str.Rundll32Command_4__failed:_MainDll_file_not_exist_at_second_check
jmp 0x140004034
lea rdx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rdx, qword [rbp - 0x68]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r15
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x8000420
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea r8, [rbp + 0x670]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebx, eax
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
test ebx, ebx
je 0x140004160
mov edx, 0x7530
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, str.Rundll32Command_8_runcmd__OK_________
lea rcx, [0x140010748]
call fcn.1400018a0
nop
lea rcx, [rbp - 0x48]
call fcn.140005600
nop
lea rcx, [rbp - 0x68]
call fcn.140005600
nop
mov rcx, rdi
call fcn.140005600
nop
mov rcx, rsi
call fcn.140005600
mov al, 1
jmp 0x1400041b1
lea rdx, str.Rundll32Command_9_runcmd_failed.....
jmp 0x140004034
lea rdx, str.Rundll32Command_4__failed:_main_dll_file_not_valid
jmp 0x140004034
cmp qword [rdi + 0x18], 8
jb 0x140004184
mov r9, qword [rdi]
jmp 0x140004187
mov r9, rdi
mov r8, r14
lea rdx, str.Rundll32Command_2_error:_not_impersonate_or_path_not_exist.__hImpersonationToken_d__WorkPath_s
lea rcx, [0x140010748]
call fcn.1400018a0
nop
mov rcx, rdi
call fcn.140005600
nop
mov rcx, rsi
call fcn.140005600
xor al, al
mov rcx, qword [rbp + 0xe70]
xor rcx, rsp
call fcn.140007350
mov rbx, qword [rsp + 0xfc8]
add rsp, 0xf80
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret