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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x51a060
mov eax, dword fs:[0]
push eax
sub esp, 0x920
mov eax, dword [0x5636d8]
xor eax, esp
mov dword [esp + 0x918], eax
push ebx
push esi
push edi
mov eax, dword [0x5636d8]
xor eax, esp
push eax
lea eax, [esp + 0x930]
mov dword fs:[0], eax
mov ebx, ecx
call fcn.00404f01
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x4028ae
push 0x80004005
call fcn.00402030
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
push 0x545804
lea ecx, [esp + 0x18]
mov dword [esp + 0x93c], edi
call fcn.00401eb0
lea ecx, [esp + 0x44]
mov byte [esp + 0x938], 1
call fcn.0040604e
mov byte [esp + 0x938], 2
mov esi, vtable.CSetupCommandLineInfo.0
push 0x18
mov dword [esp + 0x48], esi
mov byte [esp + 0x74], 1
mov dword [esp + 0x78], edi
mov dword [esp + 0x84], edi
call fcn.004042b7
add esp, 4
cmp eax, edi
je 0x402fbe
mov dword [esp + 0x7c], eax
mov dword [eax], eax
mov eax, dword [esp + 0x7c]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x7c]
mov dword [eax + 8], eax
mov ecx, dword [esp + 0x7c]
mov byte [ecx + 0x14], 1
mov edx, dword [esp + 0x7c]
mov byte [edx + 0x15], 1
mov dword [esp + 0x88], edi
mov dword [esp + 0x8c], edi
mov dword [esp + 0x90], edi
lea eax, [esp + 0x44]
push eax
mov ecx, ebx
mov byte [esp + 0x93c], 3
call fcn.0040563b
cmp byte [esp + 0x70], 1
je 0x402a56
mov eax, dword [ebx + 0xb8]
push edi
push edi
push eax
mov dword [ebx + 0xbc], 0xfffffffe
call fcn.00407758
mov dword [esp + 0x44], esi
lea ebx, [esp + 0x88]
call fcn.00403810
lea ecx, [esp + 0x78]
mov dword [esp + 0x28], ecx
mov byte [esp + 0x938], 5
mov eax, dword [esp + 0x7c]
mov ecx, dword [eax]
push eax
push ecx
lea edi, [esp + 0x28]
lea esi, [esp + 0x80]
call fcn.00403860
mov edx, dword [esp + 0x7c]
push edx
call fcn.004042e6
add esp, 4
lea ecx, [esp + 0x44]
mov byte [esp + 0x938], 1
call fcn.004060b8
mov byte [esp + 0x938], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402a05
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x938], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402a30
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x930]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, esp
call fcn.004f817b
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x7c]
mov eax, dword [ecx + 4]
cmp byte [eax + 0x15], 0
mov edx, ecx
mov esi, 0x545d00
jne 0x402a84
lea ebx, [ebx]
cmp dword [eax + 0xc], esi
jae 0x402a7a
mov eax, dword [eax + 8]
jmp 0x402a7e
mov edx, eax
mov eax, dword [eax]
cmp byte [eax + 0x15], 0
je 0x402a70
mov dword [esp + 0x40], edx
cmp edx, ecx
je 0x402a97
cmp dword [edx + 0xc], esi
ja 0x402a97
lea eax, [esp + 0x40]
jmp 0x402a9f
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x20]
cmp dword [eax], ecx
setne al
cmp al, 1
jne 0x402aef
mov eax, dword [ebx + 0xb8]
push edi
push edi
push eax
mov dword [ebx + 0xbc], edi
call fcn.00407758
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0x93c], 1
call fcn.00403230
mov byte [esp + 0x938], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4029f9
push 0x545d20
lea ecx, [esp + 0x20]
call fcn.00401eb0
mov esi, 0x545d18
lea edx, [esp + 0x44]
mov byte [esp + 0x938], 6
call fcn.00402490
cmp al, 1
jne 0x402b23
push 2
push esi
lea ecx, [esp + 0x24]
call fcn.00401d70
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [esp + 0xf4]
push edx
xor ecx, ecx
push 0x208
mov word [esp + 0xfc], cx
call edi
test eax, eax
jne 0x402c01
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x18]
push str.Unable_to_obtain_temporary_path___u
push eax
call fcn.00403120
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
je 0x402b7b
cmp word [eax], 0
je 0x402b7b
push 0
push 0
push eax
call fcn.00407758
mov byte [esp + 0x938], 3
mov eax, dword [esp + 0x1c]
or esi, 0xffffffff
add eax, 0xfffffff0
mov dword [ebx + 0xbc], esi
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402bab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0x93c], 1
call fcn.00403230
mov byte [esp + 0x938], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402be4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x938], esi
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jmp 0x402a24
lea ecx, [esp + 0xf4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or esi, 0xffffffff
cmp eax, esi
jne 0x402c3c
mov byte [esp + 0x938], 3
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [ebx + 0xbc], esi
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x402b9f
lea ecx, [esp + 0xf4]
push ecx
lea ecx, [esp + 0x14]
call fcn.00401e60
push str.QualcommWindowsDriverInstaller.msi
lea ecx, [esp + 0x14]
call fcn.00401040
mov edx, dword [esp + 0x10]
push edx
call fcn.004026e0
add esp, 4
test eax, eax
je 0x402ccf
push eax
lea eax, [esp + 0x18]
push str.Error_extracting_MSI___u
push eax
call fcn.00403120
mov eax, dword [esp + 0x20]
add esp, 0xc
test eax, eax
je 0x402c97
cmp word [eax], 0
je 0x402c97
push 0
push 0
push eax
call fcn.00407758
mov dword [ebx + 0xbc], esi
lea ecx, [esp + 0x1c]
call fcn.00402160
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0x93c], 1
call fcn.00403230
lea ecx, [esp + 0x14]
call fcn.00402160
lea ecx, [esp + 0x10]
call fcn.00402160
jmp 0x402a30
push 0x545804
lea ecx, [esp + 0x1c]
call fcn.00401eb0
mov esi, 0x545d08
lea edx, [esp + 0x44]
mov byte [esp + 0x938], 7
call fcn.00402490
cmp al, 1
jne 0x402d83
lea eax, [esp + 0xf4]
push eax
xor edx, edx
push 0x208
mov word [esp + 0xfc], dx
call edi
test eax, eax
je 0x402d83
lea ecx, [esp + 0xf4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402d83
lea edx, [esp + 0x50c]
push edx
push 0
push str.usbdrivers
lea eax, [esp + 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x402d83
push esi
lea ecx, [esp + 0x1c]
call fcn.00401e60
push 0x545808
lea ecx, [esp + 0x1c]
call fcn.00401040
lea ecx, [esp + 0x50c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401040
push 0x545808
lea ecx, [esp + 0x1c]
call fcn.00401040
mov esi, 0x545d10
lea edx, [esp + 0x44]
call fcn.00402490
cmp al, 1
jne 0x402d9f
push esi
lea ecx, [esp + 0x1c]
call fcn.00401040
lea eax, [esp + 0xf4]
push eax
xor edx, edx
push 0x208
mov word [esp + 0xfc], dx
call edi
test eax, eax
je 0x402dec
lea ecx, [esp + 0xf4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402dec
lea edx, [esp + 0x50c]
push edx
push 0
push str.usbdrivers
lea eax, [esp + 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea ecx, [esp + 0x20]
call fcn.00403160
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.Wow64DisableWow64FsRedirection
push 0x545ce4
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push str.Wow64RevertWow64FsRedirection
push 0x545ce4
call esi
push eax
call edi
lea ecx, [esp + 0x20]
call fcn.00402160
call fcn.00402790
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.004024f0
mov byte [esp + 0x938], 8
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00401470
lea ecx, [esp + 0x20]
mov byte [esp + 0x938], 7
call fcn.00402160
push 0x545804
lea ecx, [esp + 0x28]
call fcn.00401eb0
mov byte [esp + 0x938], 9
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
push eax
push esi
push ecx
lea edx, [esp + 0x30]
push str.msiexec.exe__s___s___s
push edx
call fcn.00403120
add esp, 0x14
push 0x44
lea eax, [esp + 0xb0]
push 0
push eax
call fcn.004f9ff0
add esp, 0xc
xor eax, eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0xb0]
push edx
push eax
push eax
push eax
push eax
push eax
push eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x44]
push eax
push 0
mov dword [esp + 0xd4], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x402f14
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x24]
mov dword [ebx + 0xbc], eax
call fcn.00402160
lea ecx, [esp + 0x18]
call fcn.00402160
jmp 0x402c9d
mov edx, dword [esp + 0x30]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x2c]
push eax
push ecx
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [esp + 0x30]
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x402ef1
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x402f88
lea ecx, [esp + 0x24]
mov dword [ebx + 0xbc], eax
call fcn.00402160
lea ecx, [esp + 0x18]
call fcn.00402160
lea ecx, [esp + 0x1c]
call fcn.00402160
lea edx, [esp + 0x44]
push edx
jmp 0x402cab
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x24]
mov dword [ebx + 0xbc], 0
call fcn.00402160
lea ecx, [esp + 0x18]
call fcn.00402160
lea ecx, [esp + 0x1c]
call fcn.00402160
lea eax, [esp + 0x44]
push eax
jmp 0x402cab
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0xa4]
mov dword [esp + 0x2c], edi
call fcn.004f81f5
push 0x55b07c
lea edx, [esp + 0xa4]
push edx
mov dword [esp + 0xa8], vtable.std::bad_alloc.0
call fcn.004f994e
int3