Function at 0x4120a0
Capabilities:
Check if file exists
Copy file
Create process on windows
Get common file path
Query environment variable
Self delete

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a6bd3
mov eax, dword fs:[0]
push eax
sub esp, 0x6ac
mov eax, dword [0x4d1480]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x688], ecx
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push 0
mov dword [ebp - 0x684], eax
mov dword [ebp - 0x680], edi
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jns 0x4120f9
or eax, 0xffffffff
jmp 0x412a2f
cmp dword [0x4d5790], 0
mov dword [0x4d5794], 0x428b10
jne 0x4121fe
push 0x34
call fcn.004804da
mov edi, eax
add esp, 4
mov dword [ebp - 0x664], edi
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov byte [ebp - 4], 1
lea esi, [edi + 0x20]
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [ebp - 0x660], esi
push 0x18
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004804da
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [esi], eax
mov byte [ebp - 4], 2
lea esi, [edi + 0x2c]
mov dword [edi + 0x28], 0
mov dword [ebp - 0x660], esi
push 0x18
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004804da
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov dword [0x4d5790], edi
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0
push 0
push 0
push 0xfffffffffffffffd
push 0
push 0
push 0
push 0
push SysReAllocString
push 0x4c0228
push 0x4c4464
push 0
mov dword [edi + 0x18], eax
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 0x426590
push 0xfffffffffffffffc
push eax
mov dword [edi + 0x1c], eax
call dword [sym.imp.USER32.dll_SetWindowLongW]
mov edi, dword [ebp - 0x680]
push 0x20a
lea eax, [ebp - 0x62c]
push 0
push eax
call fcn.00482730
add esp, 0xc
lea eax, [ebp - 0x62c]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xorps xmm0, xmm0
mov dword [ebp - 0x634], 0
lea ecx, [ebp - 0x62c]
mov dword [ebp - 0x630], 0
movups xmmword [ebp - 0x644], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412250
sub ecx, edx
lea eax, [ebp - 0x62c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x644]
call fcn.004082b0
push 0xc
push 0x4c0afc
lea ecx, [ebp - 0x644]
mov dword [ebp - 4], 3
call fcn.0040d1f0
cmp dword [ebp - 0x630], 7
lea eax, [ebp - 0x644]
cmova eax, dword [ebp - 0x644]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4122ea
cmp dword [ebp - 0x630], 7
lea eax, [ebp - 0x644]
cmova eax, dword [ebp - 0x644]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
je 0x4122ea
cmp eax, 0xb7
je 0x4122ea
push eax
push str.make_dir_failed__error___d.
push 0xef
push str.utility::ufile::makeDir
call fcn.00426450
add esp, 0x10
mov ecx, dword [ebp - 0x634]
mov eax, SysReAllocString
sub eax, ecx
cmp eax, 0x11
jb 0x412a4c
cmp dword [ebp - 0x630], 7
lea eax, [ebp - 0x644]
push 0x11
cmova eax, dword [ebp - 0x644]
push str.oslinkInstall.log
push ecx
push eax
push ecx
push dword [ebp - 0x660]
lea ecx, [ebp - 0x6a0]
call fcn.0040e310
lea eax, [ebp - 0x6a0]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x67c]
call fcn.00413240
lea eax, [ebp - 0x67c]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x6b8]
call fcn.00408b10
lea eax, [ebp - 0x6b8]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x65c]
call fcn.00408b10
mov byte [ebp - 4], 7
cmp dword [ebp - 0x64c], 0
je 0x4123c0
cmp dword [0x4d59f4], 0
jne 0x4123c0
push 0x84
call fcn.004804da
mov esi, eax
mov dword [ebp - 0x660], esi
sub esp, 0x14
mov byte [ebp - 4], 8
mov ecx, esp
lea eax, [ebp - 0x65c]
mov dword [ebp - 0x664], ecx
push eax
call fcn.00408b10
mov ecx, esi
call fcn.00427bc0
mov dword [0x4d59f4], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x648]
cmp ecx, 7
jbe 0x412404
mov edx, dword [ebp - 0x65c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4123fa
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412a51
push ecx
push edx
call fcn.004804a9
add esp, 8
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x6a4]
cmp ecx, 7
jbe 0x412448
mov edx, dword [ebp - 0x6b8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x41243e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412a51
push ecx
push edx
call fcn.004804a9
add esp, 8
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x668]
cmp ecx, 7
jbe 0x41248c
mov edx, dword [ebp - 0x67c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x412482
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412a51
push ecx
push edx
call fcn.004804a9
add esp, 8
xor eax, eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x68c]
mov dword [ebp - 0x66c], 0
mov dword [ebp - 0x668], 7
mov word [ebp - 0x67c], ax
cmp ecx, 7
jbe 0x4124ed
mov edx, dword [ebp - 0x6a0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4124e3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412a51
push ecx
push edx
call fcn.004804a9
add esp, 8
push str.oslink_install_start_
push 0x19
push str.LDRemoteImpl::entrance
call fcn.00426450
push edi
push str.cmd:_s
push 0x1a
push str.LDRemoteImpl::entrance
call fcn.00426450
push 0x4c04a4
push 0x1b
push str.LDRemoteImpl::entrance
call fcn.00426450
add esp, 0x28
mov ecx, 0x4d5798
push edi
call fcn.00414a70
lea eax, [ebp - 0x6a0]
mov ecx, 0x4d5798
push eax
call fcn.0041e2a0
mov esi, eax
mov byte [ebp - 4], 9
cmp dword [esi + 0x14], 7
jbe 0x41254e
mov esi, dword [esi]
push dword [ebp - 0x684]
call fcn.0043ea60
push str.en_US
push esi
call fcn.0043eaf0
lea eax, [ebp - 0x94]
push eax
call fcn.00439ed0
add esp, 0x10
push str.skin
lea ecx, [ebp - 0x29c]
mov byte [ebp - 4], 0xa
push ecx
mov ecx, eax
call fcn.00436c20
mov ecx, eax
mov byte [ebp - 4], 0xb
call fcn.004058d0
push eax
call fcn.0043eee0
add esp, 4
lea ecx, [ebp - 0x29c]
call fcn.00436ae0
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 9
call fcn.00436ae0
push str.multi_language.tsv
push 0x83
call fcn.0043a5f0
mov byte [ebp - 4], 3
add esp, 8
mov ecx, dword [ebp - 0x68c]
cmp ecx, 7
jbe 0x41260e
mov edx, dword [ebp - 0x6a0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x412604
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412a56
push ecx
push edx
call fcn.004804a9
add esp, 8
cmp byte [0x4d5869], 0
je 0x41273a
push str.start_register_service
push 0x23
push str.LDRemoteImpl::entrance
call fcn.00426450
add esp, 0xc
mov ecx, 0x4d5798
call fcn.0041a690
push dword [0x4d5864]
push str.start_register_service_end._result__d
push 0x25
push str.LDRemoteImpl::entrance
call fcn.00426450
mov edi, dword [0x4d5864]
add esp, 0x10
test edi, edi
je 0x4129f1
push 0x100
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00482730
push 0x80
push str.reg_service_failed
push 0x80
lea eax, [ebp - 0x110]
push eax
push 0
call fcn.0048aea7
lea eax, [ebp - 0x110]
push eax
call fcn.0043a430
mov esi, eax
add esp, 0x24
test esi, esi
jne 0x4126c4
lea eax, [ebp - 0x110]
push eax
push eax
call fcn.004394f0
lea eax, [ebp - 0x110]
push eax
call fcn.0043a430
add esp, 0xc
mov esi, eax
push 0x100
lea eax, [ebp - 0x318]
push 0
push eax
call fcn.00482730
push 0x80
push str.tips
push 0x80
lea eax, [ebp - 0x318]
push eax
push 0
call fcn.0048aea7
lea eax, [ebp - 0x318]
push eax
call fcn.0043a430
add esp, 0x24
test eax, eax
jne 0x412723
lea eax, [ebp - 0x318]
push eax
push eax
call fcn.004394f0
lea eax, [ebp - 0x318]
push eax
call fcn.0043a430
add esp, 0xc
push 0
push eax
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edi, dword [0x4d5864]
jmp 0x4129f1
mov ecx, dword [ebp - 0x688]
call fcn.00412a80
call fcn.0043d340
mov ecx, dword [ebp - 0x634]
mov esi, SysReAllocString
mov edi, dword [0x4d5864]
mov eax, esi
sub eax, ecx
cmp eax, 0x11
jb 0x412a5b
cmp dword [ebp - 0x630], 7
lea eax, [ebp - 0x644]
push 0x11
cmova eax, dword [ebp - 0x644]
push str.oslinkInstall.log
push ecx
push eax
push ecx
push dword [ebp - 0x660]
lea ecx, [ebp - 0x67c]
call fcn.0040e310
mov byte [ebp - 4], 0xe
mov ecx, dword [0x4d57f0]
sub esi, ecx
cmp esi, 0xf
jb 0x412a60
cmp dword [0x4d57f4], 7
mov eax, 0x4d57e0
push 0xf
cmova eax, dword [0x4d57e0]
push str.loginstall.log
push ecx
push eax
push ecx
push dword [ebp - 0x660]
lea ecx, [ebp - 0x65c]
call fcn.0040e310
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x65c]
cmp dword [ebp - 0x648], 7
lea eax, [ebp - 0x67c]
push 0
cmova ecx, dword [ebp - 0x65c]
cmp dword [ebp - 0x668], 7
push ecx
cmova eax, dword [ebp - 0x67c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x41285e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x648], 7
lea edx, [ebp - 0x65c]
push eax
cmova edx, dword [ebp - 0x65c]
lea ecx, [ebp - 0x67c]
cmp dword [ebp - 0x668], 7
push 0
cmova ecx, dword [ebp - 0x67c]
push edx
push ecx
push str.copy_file_from____s___to____s___flag___d_failed__error___d.
push 0x104
push str.utility::ufile::copyFile
call fcn.00426450
add esp, 0x1c
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0x648]
cmp ecx, 7
jbe 0x4128a2
mov edx, dword [ebp - 0x65c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x412898
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412a65
push ecx
push edx
call fcn.004804a9
add esp, 8
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x668]
cmp ecx, 7
jbe 0x4128e6
mov edx, dword [ebp - 0x67c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4128dc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412a6a
push ecx
push edx
call fcn.004804a9
add esp, 8
mov ecx, 0x4d5798
call fcn.00416540
cmp dword [0x4d5790], 0
je 0x412934
call fcn.00426690
mov esi, dword [0x4d5790]
test esi, esi
je 0x41292a
lea ecx, [esi + 0x2c]
call fcn.00426960
lea ecx, [esi + 0x20]
call fcn.00426960
push esi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push 0x34
push esi
call fcn.004804a9
add esp, 8
mov dword [0x4d5790], 0
call dword [sym.imp.ole32.dll_CoUninitialize]
push str.update
mov ecx, 0x4d5848
call fcn.0040cba0
test al, al
je 0x4129f1
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4129f1
push 0x104
lea eax, [ebp - 0x218]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x4129f1
push str._c_del
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call esi
push str.____NUL
lea eax, [ebp - 0x420]
push eax
call esi
push 0x104
lea eax, [ebp - 0x218]
push eax
push str.ComSpec
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4129f1
push 0
push 0
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, dword [ebp - 0x630]
cmp ecx, 7
jbe 0x412a2d
mov edx, dword [ebp - 0x644]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x412a23
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412a6f
push ecx
push edx
call fcn.004804a9
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0048049b
mov esp, ebp
pop ebp
ret 8
call fcn.00408bc0
call fcn.00485a5d
call fcn.00485a5d
call fcn.00408bc0
call fcn.00408bc0
call fcn.00485a5d
call fcn.00485a5d
call fcn.00485a5d
int3