Function at 0x440c20
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Get file attributes
Self delete
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4940ee
mov eax, dword fs:[0]
push eax
sub esp, 0xb94
mov eax, dword [0x4c1280]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xb50], ecx
mov dword [ebp - 0x84], 0
lea ecx, [ebp - 0x64]
call fcn.00401c50
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00401c50
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x48]
call fcn.00401c50
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x80]
call fcn.00401c50
mov byte [ebp - 4], 3
mov dword [ebp - 0x6ac], 0x104
xor eax, eax
mov word [ebp - 0xabc], ax
push 0x206
push 0
lea ecx, [ebp - 0xaba]
push ecx
call fcn.00472990
add esp, 0xc
lea edx, [ebp - 0x694]
push edx
mov eax, dword [ebp - 0x6ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0xb08], eax
mov ecx, dword [ebp - 0xb08]
cmp ecx, dword [ebp - 0x6ac]
ja 0x440ce8
cmp dword [ebp - 0xb08], 0
jne 0x440d01
push 0x4a0f80
push 0x104
lea edx, [ebp - 0x694]
push edx
call fcn.00472a0a
add esp, 0xc
lea eax, [ebp - 0xabc]
push eax
push 0
push 0x4a0f88
lea ecx, [ebp - 0x694]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov dword [ebp - 0x698], eax
cmp dword [ebp - 0x698], 0
jne 0x440d30
jmp 0x4411d6
lea edx, [ebp - 0xabc]
push edx
lea ecx, [ebp - 0x48]
call fcn.00401f70
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb0c], esp
push 0x4a0f90
call fcn.00401c70
mov dword [ebp - 0xb54], eax
mov eax, dword [ebp - 0xb54]
mov dword [ebp - 0xb58], eax
mov byte [ebp - 4], 4
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb10], esp
push str.CH340.zip
call fcn.00401c70
mov dword [ebp - 0xb5c], eax
mov ecx, dword [ebp - 0xb5c]
mov dword [ebp - 0xb60], ecx
mov byte [ebp - 4], 5
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb14], esp
lea edx, [ebp - 0x48]
push edx
call fcn.00401cb0
mov dword [ebp - 0xb64], eax
mov byte [ebp - 4], 3
mov ecx, 0x4c3688
call fcn.0045ef90
mov dword [ebp - 0xb68], eax
cmp dword [ebp - 0xb68], 0
jne 0x440dd1
jmp 0x4411d6
push str.start_install_ch340
push 0x4a0fec
call fcn.00401340
add esp, 4
push eax
call fcn.004013f0
add esp, 8
lea eax, [ebp - 0x694]
push eax
lea ecx, [ebp - 0x64]
call fcn.00401f70
lea ecx, [ebp - 0x64]
call fcn.00401d40
sub eax, 1
push eax
lea ecx, [ebp - 0x64]
call fcn.00441da0
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x440e21
push 0x5c
lea ecx, [ebp - 0x64]
call fcn.0042dd60
lea edx, [ebp - 0x64]
push edx
lea ecx, [ebp - 0x2c]
call fcn.00407700
push str.CH340
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0xb30]
push ecx
call fcn.00444a70
add esp, 0xc
mov dword [ebp - 0xb6c], eax
mov edx, dword [ebp - 0xb6c]
mov dword [ebp - 0xb70], edx
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0xb70]
push eax
lea ecx, [ebp - 0x80]
call fcn.00407700
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xb30]
call fcn.00401ce0
push str.7z.exe
lea ecx, [ebp - 0x64]
call fcn.00441d80
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb34], esp
push 0x4a103c
call fcn.00401c70
mov dword [ebp - 0xb74], eax
mov ecx, dword [ebp - 0xb74]
mov dword [ebp - 0xb78], ecx
mov byte [ebp - 4], 7
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb38], esp
push str.7Z.EXE
call fcn.00401c70
mov dword [ebp - 0xb7c], eax
mov edx, dword [ebp - 0xb7c]
mov dword [ebp - 0xb80], edx
mov byte [ebp - 4], 8
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb3c], esp
lea eax, [ebp - 0x64]
push eax
call fcn.00401cb0
mov dword [ebp - 0xb84], eax
mov byte [ebp - 4], 3
mov ecx, 0x4c3688
call fcn.0045ef90
mov dword [ebp - 0xb88], eax
cmp dword [ebp - 0xb88], 0
jne 0x440f33
push str.make_7z.exe_failed
push 0x4a1068
call fcn.00401340
add esp, 4
push eax
call fcn.00401590
add esp, 8
jmp 0x4411d6
push str.7z.dll
lea ecx, [ebp - 0x2c]
call fcn.00441d80
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb40], esp
push 0x4a10ac
call fcn.00401c70
mov dword [ebp - 0xb8c], eax
mov ecx, dword [ebp - 0xb8c]
mov dword [ebp - 0xb90], ecx
mov byte [ebp - 4], 9
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb44], esp
push str.7Z.DLL
call fcn.00401c70
mov dword [ebp - 0xb94], eax
mov edx, dword [ebp - 0xb94]
mov dword [ebp - 0xb98], edx
mov byte [ebp - 4], 0xa
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb48], esp
lea eax, [ebp - 0x2c]
push eax
call fcn.00401cb0
mov dword [ebp - 0xb9c], eax
mov byte [ebp - 4], 3
mov ecx, 0x4c3688
call fcn.0045ef90
mov dword [ebp - 0xba0], eax
cmp dword [ebp - 0xba0], 0
jne 0x440fed
push str.make_7z.dll_failed
push 0x4a10d8
call fcn.00401340
add esp, 4
push eax
call fcn.00401590
add esp, 8
jmp 0x4411d6
push 0
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0x48]
call fcn.00401ff0
push eax
lea ecx, [ebp - 0x64]
call fcn.00401ff0
push eax
mov ecx, dword [ebp - 0xb50]
call fcn.00440220
test eax, eax
je 0x441019
jmp 0x4411d6
xor edx, edx
mov word [ebp - 0x48c], dx
push 0x3fe
push 0
lea eax, [ebp - 0x48a]
push eax
call fcn.00472990
add esp, 0xc
lea ecx, [ebp - 0x80]
call fcn.00401ff0
push eax
push str.__s_setup.exe___S
push 0x200
lea ecx, [ebp - 0x48c]
push ecx
call fcn.00474cf2
add esp, 0x10
push 0x44
push 0
lea edx, [ebp - 0xb04]
push edx
call fcn.00472990
add esp, 0xc
mov dword [ebp - 0xb04], 0x44
mov dword [ebp - 0xad8], 1
xor eax, eax
mov word [ebp - 0xad4], ax
push 0x10
push 0
lea ecx, [ebp - 0x6a8]
push ecx
call fcn.00472990
add esp, 0xc
lea edx, [ebp - 0x8b4]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [ebp - 0x80]
call fcn.00401ff0
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x6a8]
push eax
lea ecx, [ebp - 0xb04]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x48c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x441126
lea eax, [ebp - 0x8b4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x48c]
push ecx
push str.CreateProcess__s_0x_x
push 0x4a1130
call fcn.00401340
add esp, 4
push eax
call fcn.00401590
add esp, 0x10
jmp 0x4411d6
lea edx, [ebp - 0x8b4]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0xffffffffffffffff
mov eax, dword [ebp - 0x6a8]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x88], 0xffffffff
lea ecx, [ebp - 0x88]
push ecx
mov edx, dword [ebp - 0x6a8]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x441188
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Get_ch340_exitcode_error:0x_x
push 0x4a1168
call fcn.00401340
add esp, 4
push eax
call fcn.00401590
add esp, 0xc
jmp 0x4411d6
mov eax, dword [ebp - 0x6a8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x6a4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x88]
push edx
push str.install_ch340_ret:0x_x
push 0x4a11b0
call fcn.00401340
add esp, 4
push eax
call fcn.004013f0
add esp, 0xc
mov dword [ebp - 0x84], 1
xor eax, eax
jne 0x440c8e
lea ecx, [ebp - 0x64]
call fcn.0040a370
movzx ecx, al
test ecx, ecx
jne 0x441237
lea ecx, [ebp - 0x64]
call fcn.00401ff0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x441237
lea ecx, [ebp - 0x64]
call fcn.00401ff0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x441237
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x64]
call fcn.00401ff0
push eax
push 0x4a11f8
push 0x4a11ec
call fcn.00401340
add esp, 4
push eax
call fcn.00401590
add esp, 0x10
lea ecx, [ebp - 0x2c]
call fcn.0040a370
movzx edx, al
test edx, edx
jne 0x441298
lea ecx, [ebp - 0x2c]
call fcn.00401ff0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x441298
lea ecx, [ebp - 0x2c]
call fcn.00401ff0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x441298
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00401ff0
push eax
push 0x4a1228
push 0x4a121c
call fcn.00401340
add esp, 4
push eax
call fcn.00401590
add esp, 0x10
lea ecx, [ebp - 0x48]
call fcn.0040a370
movzx eax, al
test eax, eax
jne 0x4412f9
lea ecx, [ebp - 0x48]
call fcn.00401ff0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4412f9
lea ecx, [ebp - 0x48]
call fcn.00401ff0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4412f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x48]
call fcn.00401ff0
push eax
push 0x4a1258
push 0x4a124c
call fcn.00401340
add esp, 4
push eax
call fcn.00401590
add esp, 0x10
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0xb4c], ecx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x80]
call fcn.00401ce0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x48]
call fcn.00401ce0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00401ce0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.00401ce0
mov eax, dword [ebp - 0xb4c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00472a79
mov esp, ebp
pop ebp
ret