Function at 0x402b20
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Get file attributes
Manipulate boot configuration
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x51a712
mov eax, dword fs:[0]
push eax
sub esp, 0xe00
mov eax, dword [0x5646d8]
xor eax, esp
mov dword [esp + 0xdf8], eax
push ebx
push esi
push edi
mov eax, dword [0x5646d8]
xor eax, esp
push eax
lea eax, [esp + 0xe10]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x44], edi
call fcn.00405521
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x402b82
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 + 0x14], eax
push 0x546814
lea ecx, [esp + 0x1c]
mov dword [esp + 0xe1c], ebx
call fcn.00401eb0
lea ecx, [esp + 0x7c]
mov byte [esp + 0xe18], 1
call fcn.00406688
mov byte [esp + 0xe18], 2
mov esi, vtable.CSetupCommandLineInfo.0
push 0x18
mov dword [esp + 0x80], esi
mov byte [esp + 0xac], 1
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xbc], ebx
call fcn.004048d7
add esp, 4
cmp eax, ebx
je 0x4035f5
mov dword [esp + 0xb4], eax
mov dword [eax], eax
mov eax, dword [esp + 0xb4]
mov dword [eax + 4], eax
mov eax, dword [esp + 0xb4]
mov dword [eax + 8], eax
mov ecx, dword [esp + 0xb4]
mov byte [ecx + 0x14], 1
mov edx, dword [esp + 0xb4]
mov byte [edx + 0x15], 1
mov dword [esp + 0xc0], ebx
mov dword [esp + 0xc4], ebx
mov dword [esp + 0xc8], ebx
lea eax, [esp + 0x7c]
push eax
mov ecx, edi
mov byte [esp + 0xe1c], 3
call fcn.00405c7b
cmp byte [esp + 0xa8], 1
je 0x402d4e
mov eax, dword [edi + 0xb8]
push ebx
push ebx
push eax
mov dword [edi + 0xbc], 0xfffffffe
call fcn.00407d92
mov dword [esp + 0x7c], esi
lea ebx, [esp + 0xc0]
call fcn.00403e30
lea ecx, [esp + 0xb0]
mov dword [esp + 0x2c], ecx
mov byte [esp + 0xe18], 5
mov eax, dword [esp + 0xb4]
mov ecx, dword [eax]
push eax
push ecx
lea edi, [esp + 0x38]
lea esi, [esp + 0xb8]
call fcn.00403e80
mov edx, dword [esp + 0xb4]
push edx
call fcn.00404906
add esp, 4
lea ecx, [esp + 0x7c]
mov byte [esp + 0xe18], 1
call fcn.004066f2
mov byte [esp + 0xe18], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402cfd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xe18], 0xffffffff
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 0x402d28
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0xe10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xdf8]
xor ecx, esp
call fcn.004f879b
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xb4]
mov eax, dword [ecx + 4]
cmp byte [eax + 0x15], 0
mov edx, ecx
mov esi, 0x546d58
jne 0x402d79
cmp dword [eax + 0xc], esi
jae 0x402d6f
mov eax, dword [eax + 8]
jmp 0x402d73
mov edx, eax
mov eax, dword [eax]
cmp byte [eax + 0x15], 0
je 0x402d65
mov dword [esp + 0x30], edx
cmp edx, ecx
je 0x402d8c
cmp dword [edx + 0xc], esi
ja 0x402d8c
lea eax, [esp + 0x30]
jmp 0x402d94
mov dword [esp + 0x24], ecx
lea eax, [esp + 0x24]
cmp dword [eax], ecx
setne al
cmp al, 1
jne 0x402de4
mov eax, dword [edi + 0xb8]
push ebx
push ebx
push eax
mov dword [edi + 0xbc], ebx
call fcn.00407d92
lea ecx, [esp + 0x7c]
push ecx
mov byte [esp + 0xe1c], 1
call fcn.00403850
mov byte [esp + 0xe18], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x402cf1
push 0x546d78
lea ecx, [esp + 0x24]
call fcn.00401eb0
mov esi, 0x546d70
lea edx, [esp + 0x7c]
mov byte [esp + 0xe18], 6
call fcn.00402820
cmp al, 1
jne 0x402e18
push 2
push esi
lea ecx, [esp + 0x28]
call fcn.00401d70
lea edx, [esp + 0x5d4]
push edx
xor ecx, ecx
push 0x208
mov word [esp + 0x5dc], cx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, ebx
jne 0x402ef1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x1c]
push str.Unable_to_obtain_temporary_path___u
push eax
call fcn.00403740
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp eax, ebx
je 0x402e6b
cmp word [eax], bx
je 0x402e6b
push ebx
push ebx
push eax
call fcn.00407d92
mov byte [esp + 0xe18], 3
mov eax, dword [esp + 0x20]
or esi, 0xffffffff
add eax, 0xfffffff0
mov dword [edi + 0xbc], esi
lea ecx, [eax + 0xc]
mov edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402e9b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x7c]
push ecx
mov byte [esp + 0xe1c], 1
call fcn.00403850
mov byte [esp + 0xe18], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402ed4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xe18], esi
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], esi
dec esi
test esi, esi
jmp 0x402d1c
lea ecx, [esp + 0x5d4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or esi, 0xffffffff
cmp eax, esi
jne 0x402f2c
mov byte [esp + 0xe18], 3
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [edi + 0xbc], esi
lea edx, [eax + 0xc]
mov ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x402e8f
lea ecx, [esp + 0x5d4]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401e60
push str.QualcommWindowsDriverInstaller.msi
lea ecx, [esp + 0x18]
call fcn.00401040
mov edx, dword [esp + 0x14]
push edx
call fcn.00402a70
add esp, 4
cmp eax, ebx
je 0x402fbc
push eax
lea eax, [esp + 0x1c]
push str.Error_extracting_MSI___u
push eax
call fcn.00403740
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp eax, ebx
je 0x402f84
cmp word [eax], bx
je 0x402f84
push ebx
push ebx
push eax
call fcn.00407d92
lea ecx, [esp + 0x20]
mov dword [edi + 0xbc], esi
call fcn.00402160
lea ecx, [esp + 0x7c]
push ecx
mov byte [esp + 0xe1c], 1
call fcn.00403850
lea ecx, [esp + 0x18]
call fcn.00402160
lea ecx, [esp + 0x14]
call fcn.00402160
jmp 0x402d28
push 0x546814
lea ecx, [esp + 0x20]
call fcn.00401eb0
mov esi, 0x546d60
lea edx, [esp + 0x7c]
mov byte [esp + 0xe18], 7
call fcn.00402820
mov edi, dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp al, 1
jne 0x403075
lea eax, [esp + 0x5d4]
push eax
xor edx, edx
push 0x208
mov word [esp + 0x5dc], dx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, ebx
je 0x403075
lea ecx, [esp + 0x5d4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403075
lea edx, [esp + 0x9ec]
push edx
push ebx
push str.usbdrivers
lea eax, [esp + 0x5e0]
push eax
call edi
cmp eax, ebx
je 0x403075
push esi
lea ecx, [esp + 0x20]
call fcn.00401e60
push 0x546820
lea ecx, [esp + 0x20]
call fcn.00401040
lea ecx, [esp + 0x9ec]
push ecx
lea ecx, [esp + 0x20]
call fcn.00401040
push 0x546820
lea ecx, [esp + 0x20]
call fcn.00401040
mov esi, 0x546d68
lea edx, [esp + 0x7c]
call fcn.00402820
cmp al, 1
jne 0x403091
push esi
lea ecx, [esp + 0x20]
call fcn.00401040
lea eax, [esp + 0x5d4]
push eax
xor edx, edx
push 0x208
mov word [esp + 0x5dc], dx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, ebx
je 0x4030dd
lea ecx, [esp + 0x5d4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4030dd
lea edx, [esp + 0x9ec]
push edx
push ebx
push str.usbdrivers
lea eax, [esp + 0x5e0]
push eax
call edi
lea ecx, [esp + 0x34]
call fcn.00403780
push str.Wow64DisableWow64FsRedirection
push 0x546d3c
mov byte [esp + 0xe20], 8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40343b
lea ecx, [esp + 0x2c]
push ecx
call eax
test eax, eax
je 0x40343b
lea edx, [esp + 0x9ec]
push edx
lea eax, [esp + 0x38]
push str.cmd.exe__c_bcdedit.exe_____s_
push eax
call fcn.00403740
push 0x44
lea ecx, [esp + 0x174]
push ebx
push ecx
call fcn.004fa610
mov ecx, dword [esp + 0x4c]
add esp, 0x18
xor eax, eax
lea edx, [esp + 0x4c]
push edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x168]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ecx
push ebx
mov dword [esp + 0x18c], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, eax
cmp esi, ebx
je 0x40343b
mov edx, dword [esp + 0x4c]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x4c]
lea eax, [esp + 0x30]
push eax
push ecx
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [esp + 0x4c]
push edx
mov ebx, eax
call edi
mov eax, dword [esp + 0x50]
push eax
call edi
test ebx, ebx
jne 0x4031c9
xor esi, esi
cmp dword [esp + 0x30], 0
je 0x4031d2
xor esi, esi
mov dword [esp + 0x24], 1
cmp esi, 1
jne 0x403439
lea ecx, [esp + 0x38]
call fcn.00403780
lea ecx, [esp + 0x9ec]
push ecx
lea edx, [esp + 0x3c]
push edx
mov byte [esp + 0xe20], 9
call fcn.00403740
mov ecx, dword [esp + 0x40]
add esp, 8
lea eax, [esp + 0x1ac]
push eax
call fcn.00402190
cmp dword [esp + 0x1b8], 0
jne 0x4032f1
lea ecx, [esp + 0x40]
call fcn.00403780
lea ecx, [esp + 0x1ac]
push ecx
lea ebx, [esp + 0x44]
mov byte [esp + 0xe1c], 0xb
call fcn.004023a0
cmp al, 1
jne 0x4032d8
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x40]
call fcn.004018d0
mov byte [esp + 0xe18], 0xc
mov eax, dword [esp + 0x3c]
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x40]
call fcn.00402100
mov esi, eax
push str.testsigning
push esi
call fcn.004f9746
add esp, 8
test eax, eax
je 0x40329f
push 0x546b68
push esi
call fcn.004f9746
add esp, 8
test eax, eax
jne 0x4032c7
lea ecx, [esp + 0x3c]
mov byte [esp + 0xe18], 0xb
call fcn.00402160
lea ecx, [esp + 0x1ac]
push ecx
lea ebx, [esp + 0x44]
call fcn.004023a0
cmp al, 1
je 0x403252
jmp 0x4032d8
lea ecx, [esp + 0x3c]
mov dword [esp + 0x24], 0
call fcn.00402160
lea edx, [esp + 0x9ec]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x40]
call fcn.00402160
jmp 0x4032f9
mov dword [esp + 0x24], 0
mov byte [esp + 0xe18], 9
mov eax, dword [esp + 0x1b0]
add eax, 0xfffffff0
mov dword [esp + method.cDB2TextFile.virtual_0], vtable.cDB2TextFile.0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40332f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x38]
mov byte [esp + 0xe18], 8
call fcn.00402160
cmp dword [esp + 0x24], 1
jne 0x403439
lea ecx, [esp + 0x34]
push str.bcdedit.exe__set_testsigning_on
push ecx
call fcn.00403740
push 0x44
lea edx, [esp + 0x128]
push 0
push edx
call fcn.004fa610
mov edx, dword [esp + 0x48]
add esp, 0x14
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x120]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push 0
mov dword [esp + 0x144], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x403439
mov eax, dword [esp + 0x5c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x38]
push ecx
push edx
mov dword [esp + 0x40], 0
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [esp + 0x5c]
push eax
call edi
mov ecx, dword [esp + 0x60]
push ecx
call edi
push 0x546814
lea ecx, [esp + 0x28]
call fcn.00401eb0
push 1
lea edx, [esp + 0x28]
push str._REBOOTNEEDED_d
push edx
mov byte [esp + 0xe24], 0xd
call fcn.00403740
mov eax, dword [esp + 0x30]
mov ecx, dword [eax - 0xc]
add esp, 0xc
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.00401470
lea ecx, [esp + 0x24]
mov byte [esp + 0xe18], 8
call fcn.00402160
xor ebx, ebx
push str.Wow64RevertWow64FsRedirection
push 0x546d3c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40345d
mov ecx, dword [esp + 0x2c]
push ecx
call eax
lea ecx, [esp + 0x34]
mov byte [esp + 0xe18], 7
call fcn.00402160
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x80]
push eax
call fcn.00402880
mov byte [esp + 0xe18], 0xe
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.00401470
lea ecx, [esp + 0x2c]
mov byte [esp + 0xe18], 7
call fcn.00402160
push 0x546814
lea ecx, [esp + 0x2c]
call fcn.00401eb0
mov byte [esp + 0xe18], 0xf
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
push ecx
push edx
push eax
lea ecx, [esp + 0x34]
push str.msiexec.exe__s___s___s
push ecx
call fcn.00403740
push 0x44
lea edx, [esp + 0xec]
push ebx
push edx
call fcn.004fa610
mov edx, dword [esp + 0x48]
add esp, 0x20
xor eax, eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0xd8]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edx
push ebx
mov dword [esp + 0xfc], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp eax, ebx
jne 0x403565
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x44]
mov dword [ecx + 0xbc], eax
lea ecx, [esp + 0x28]
call fcn.00402160
lea ecx, [esp + 0x1c]
call fcn.00402160
lea ecx, [esp + 0x20]
call fcn.00402160
lea edx, [esp + 0x7c]
push edx
jmp 0x402f98
mov eax, dword [esp + 0x6c]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x6c]
lea ecx, [esp + 0x48]
push ecx
push edx
mov dword [esp + 0x50], ebx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov esi, eax
mov eax, dword [esp + 0x6c]
push eax
call edi
mov ecx, dword [esp + 0x70]
push ecx
call edi
cmp esi, ebx
jne 0x4035cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x28]
mov dword [edx + 0xbc], eax
call fcn.00402160
lea ecx, [esp + 0x1c]
call fcn.00402160
lea ecx, [esp + 0x20]
call fcn.00402160
lea eax, [esp + 0x7c]
push eax
jmp 0x402f98
mov eax, dword [esp + 0x48]
cmp eax, ebx
jne 0x403536
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x44]
mov dword [ecx + 0xbc], ebx
jmp 0x403540
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x30], ebx
call fcn.004f8815
push 0x55c134
lea ecx, [esp + 0x50]
push ecx
mov dword [esp + 0x54], vtable.std::bad_alloc.0
call fcn.004f9f6e
int3