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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407516
mov eax, dword fs:[0]
push eax
sub esp, 0xeac
mov eax, dword [0x40d00c]
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 edi, ecx
mov dword [ebp - 4], 1
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push eax
push edi
push str.Rundll32Command_1__hImpersonationToken_d__WorkPath_s
push 0x40d028
call fcn.004016f0
add esp, 0x10
test edi, edi
je 0x403a21
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403a21
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0xe40]
push 0x408380
call fcn.00404aa0
push 0x104
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x4037b9
push 0x410
lea eax, [ebp - 0x628]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push str._s_rundll32.exe
lea eax, [ebp - 0x628]
push 0x207
push eax
call fcn.00405800
add esp, 0x10
cmp word [ebp - 0x628], 0
jne 0x403794
xor ecx, ecx
lea eax, [ebp - 0x628]
push ecx
push eax
jmp 0x4037c0
lea ecx, [ebp - 0x628]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4037a0
sub ecx, edx
lea eax, [ebp - 0x628]
sar ecx, 1
push ecx
push eax
jmp 0x4037c0
push 0x20
push str.C:WindowsSystem32_rundll32.exe
lea ecx, [ebp - 0xe40]
call fcn.00404bf0
cmp dword [ebp - 0xe2c], 8
lea eax, [ebp - 0xe40]
mov ebx, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__waccess_s]
cmovae eax, dword [ebp - 0xe40]
push 0
push eax
call ebx
add esp, 8
test eax, eax
je 0x40380a
push str.Rundll32Command_2_failed__strRundll32Path_not_exist
push 0x40d028
call fcn.004016f0
add esp, 8
xor bl, bl
jmp 0x4039ea
push str.LenovoBatteryGaugePackage.dll
lea edx, [ebp + 8]
lea ecx, [ebp - 0xe58]
call fcn.00405470
add esp, 4
mov byte [ebp - 4], 3
lea esi, [ebp - 0xe58]
cmp dword [ebp - 0xe44], 8
push 0
cmovae esi, dword [ebp - 0xe58]
push esi
call ebx
add esp, 8
test eax, eax
jne 0x4039a1
mov ecx, esi
call fcn.00402ae0
test al, al
je 0x4039a1
push 0x800
lea eax, [ebp - 0xe28]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp + 0x20]
cmp dword [ebp + 0x34], 8
cmovae eax, dword [ebp + 0x20]
push eax
push esi
push str.__s___s
lea eax, [ebp - 0xe28]
push 0x3ff
push eax
call fcn.00405800
add esp, 0x14
lea eax, [ebp - 0xe28]
push eax
push str.Rundll32Command_5_cmd_s
push 0x40d028
call fcn.004016f0
add esp, 0xc
lea eax, [ebp - 0xea4]
push 0
push edi
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x4038ca
push str.Rundll32Command_6__failed:_CreateEnvironmentBlock
jmp 0x4039a6
push 0x40
lea eax, [ebp - 0xe9c]
xorps xmm0, xmm0
push 0
push eax
movups xmmword [ebp - 0xeb4], xmm0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0xea0], 0x44
push 0
push esi
call ebx
add esp, 8
test eax, eax
je 0x403907
push str.Rundll32Command_4__failed:_MainDll_file_not_exist_at_second_check
jmp 0x4039a6
cmp dword [ebp - 0xe2c], 8
lea ecx, [ebp - 0xeb4]
push ecx
lea ecx, [ebp - 0xea0]
push ecx
push 0
push dword [ebp - 0xea4]
lea ecx, [ebp - 0xe28]
push 0x8000420
push 0
push 0
push 0
lea eax, [ebp - 0xe40]
cmovae eax, dword [ebp - 0xe40]
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
push dword [ebp - 0xea4]
mov esi, eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
test esi, esi
je 0x40399a
push 0x7530
push dword [ebp - 0xeb4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0xeb4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0xeb0]
call esi
push str.Rundll32Command_8_runcmd__OK_________
push 0x40d028
call fcn.004016f0
add esp, 8
mov bl, 1
jmp 0x4039b5
push str.Rundll32Command_9_runcmd_failed.....
jmp 0x4039a6
push str.Rundll32Command_4__failed:_main_dll_file_not_valid
push 0x40d028
call fcn.004016f0
add esp, 8
xor bl, bl
mov eax, dword [ebp - 0xe44]
cmp eax, 8
jb 0x4039cd
inc eax
push eax
push dword [ebp - 0xe58]
call fcn.00404e80
xor eax, eax
mov dword [ebp - 0xe44], 7
mov dword [ebp - 0xe48], 0
mov word [ebp - 0xe58], ax
mov eax, dword [ebp - 0xe2c]
cmp eax, 8
jb 0x403a02
inc eax
push eax
push dword [ebp - 0xe40]
call fcn.00404e80
xor eax, eax
mov dword [ebp - 0xe2c], 7
mov dword [ebp - 0xe30], 0
mov word [ebp - 0xe40], ax
jmp 0x403a42
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
push edi
push str.Rundll32Command_2_error:_not_impersonate_or_path_not_exist.__hImpersonationToken_d__WorkPath_s
push 0x40d028
call fcn.004016f0
add esp, 0x10
xor bl, bl
mov eax, dword [ebp + 0x1c]
cmp eax, 8
jb 0x403a54
inc eax
push eax
push dword [ebp + 8]
call fcn.00404e80
mov ecx, dword [ebp + 0x34]
xor eax, eax
mov dword [ebp + 0x1c], 7
mov dword [ebp + 0x18], 0
mov word [ebp + 8], ax
cmp ecx, 8
jb 0x403a7a
inc ecx
push ecx
push dword [ebp + 0x20]
call fcn.00404e80
mov al, bl
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.00406283
mov esp, ebp
pop ebp
ret