Function at 0x40e1b0
Capabilities:
Get common file path
Move file

Disassembly:
push 0xffffffffffffffff
push 0x4c04ae
mov eax, dword fs:[0]
push eax
mov eax, 0x1830
call fcn.00484d50
mov eax, dword [0x4e7d04]
xor eax, esp
mov dword [esp + 0x1828], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e7d04]
xor eax, esp
push eax
lea eax, [esp + 0x1844]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x1858]
mov eax, dword [esp + 0x1854]
mov edi, dword [esp + 0x185c]
mov ebx, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebx
mov esi, edx
test ebp, ebp
jne 0x40e21b
xor eax, eax
jmp 0x40e5d5
push 3
push ebp
push ebx
call fcn.0048a97b
add esp, 0xc
test eax, eax
je 0x40e23e
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, esi
mov esi, ebp
call fcn.0040e640
jmp 0x40e5d5
push 0x800
lea edx, [esp + 0x840]
push 0
push edx
call fcn.00482260
add esp, 0xc
push 0x400
lea eax, [esp + 0x840]
push ebp
push eax
call fcn.004856e8
add esp, 0xc
lea ecx, [esp + 0x83c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x83c]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 3
push ebp
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileExW]
call ebx
test eax, eax
jne 0x40e5d5
push 0x4d2848
lea ecx, [esp + 0x1c]
call fcn.00403ac0
mov dword [esp + 0x184c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
mov ecx, eax
call fcn.0040cec0
push eax
mov byte [esp + 0x1850], 1
call fcn.0040ef40
lea esi, [esp + 0x24]
call fcn.0040e600
mov dword [esp + 0x184c], 0xffffffff
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 0x40e30f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x800
lea ecx, [esp + 0x40]
push 0
push ecx
call fcn.00482260
add esp, 0xc
lea edx, [esp + 0x3c]
push edx
push 0
push 0x4d2858
lea eax, [esp + 0x848]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x40e3bc
push 0x4d2860
lea ecx, [esp + 0x1c]
call fcn.00403ac0
mov dword [esp + 0x184c], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
mov ecx, eax
call fcn.0040cec0
push eax
mov byte [esp + 0x1850], 3
call fcn.0040ef40
lea esi, [esp + 0x24]
call fcn.0040e600
mov dword [esp + 0x184c], 0xffffffff
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 0x40e4b9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40e4b9
push 3
lea ecx, [esp + 0x40]
push ecx
push ebp
call ebx
test eax, eax
je 0x40e45e
lea edx, [esp + 0x3c]
push edx
call fcn.00454510
add esp, 4
test eax, eax
jne 0x40e412
push 4
push eax
lea eax, [esp + 0x44]
push eax
call ebx
test eax, eax
jne 0x40e3ff
push 4
push eax
lea ebx, [esp + 0x44]
call fcn.0040d510
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [esp + 0x3c]
push ecx
push ebp
push str.move_exist_file__s_to__s__delete_it_by_pending
call fcn.0041aa00
add esp, 0xc
mov edx, dword [esp + 0x1c]
push 3
push ebp
push edx
call ebx
test eax, eax
jne 0x40e5d5
push 0x4d28d8
lea ecx, [esp + 0x1c]
call fcn.00403ac0
mov dword [esp + 0x184c], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
mov ecx, eax
call fcn.0040cec0
mov byte [esp + 0x184c], 5
jmp 0x40e496
push str.T_rT
lea ecx, [esp + 0x1c]
call fcn.00403ac0
mov dword [esp + 0x184c], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
mov ecx, eax
call fcn.0040cec0
mov byte [esp + 0x184c], 7
push eax
call fcn.0040ef40
lea esi, [esp + 0x24]
call fcn.0040e600
lea ecx, [esp + 0x18]
mov dword [esp + 0x184c], 0xffffffff
call fcn.00404680
push 0x800
lea eax, [esp + 0x1040]
push 0
push eax
call fcn.00482260
add esp, 0xc
lea ecx, [esp + 0x103c]
push ecx
push 0
push 0x4d2858
lea edx, [esp + 0x848]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov ecx, dword [esp + 0x1c]
push 3
lea eax, [esp + 0x1040]
push eax
push ecx
call ebx
push 5
push ebp
lea edx, [esp + 0x1044]
push edx
call ebx
test eax, eax
je 0x40e519
mov dword [esp + 0x18], 1
jmp 0x40e52c
push 5
push ebp
lea ebx, [esp + 0x1044]
call fcn.0040d510
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x103c]
push eax
push ecx
push str.copy__s_to__s__replace_until_reboot
call fcn.0041aa00
add esp, 0xc
cmp dword [esp + 0x18], 0
jne 0x40e5a8
push 0x4d2948
lea ecx, [esp + 0x20]
call fcn.00403ac0
mov dword [esp + 0x184c], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x34]
push ecx
mov ecx, eax
call fcn.0040cec0
push eax
mov byte [esp + 0x1850], 9
call fcn.0040ef40
lea esi, [esp + 0x30]
call fcn.0040e600
lea ecx, [esp + 0x1c]
mov dword [esp + 0x184c], 0xffffffff
call fcn.00404680
mov edi, dword [esp + 0x20]
cmp dword [edi + 0x74], 0
jne 0x40e5d1
push ebp
call fcn.0040ea50
test eax, eax
je 0x40e5d1
push ebp
push str.check_file__s___need_reboot_now
call fcn.0041aa00
add esp, 8
mov dword [edi + 0x74], 1
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1844]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1828]
xor ecx, esp
call fcn.004820d9
add esp, 0x183c
ret 0xc