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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x521084
mov eax, dword fs:[0]
push eax
mov eax, 0x1a38
call fcn.004ac5b0
mov eax, dword [0x56f790]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1a34], edi
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x1a20], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x1a1c], eax
mov dword [ebp - 0x1a24], esi
push esi
push dword [esi + 4]
mov dword [ebp - 4], 0
push dword [esi]
call fcn.004763c0
mov eax, dword [esi]
add esp, 0xc
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x1a20]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x479bfe
test ebx, ebx
je 0x479bfe
push 3
push ebx
push eax
call fcn.004e6780
add esp, 0xc
test eax, eax
je 0x4797f8
push dword [ebp - 0x1a1c]
mov ecx, edi
push ebx
push dword [ebp - 0x1a20]
call fcn.00479500
jmp 0x479c00
push 0x800
lea eax, [ebp - 0xa18]
push 0
push eax
call fcn.004b17e0
push 0x400
lea eax, [ebp - 0xa18]
push ebx
push eax
call fcn.004d151e
add esp, 0x18
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0xa18]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 3
push ebx
push dword [ebp - 0x1a20]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x479c00
push 0x53ae48
lea ecx, [ebp - 0x1a1c]
call fcn.004093d0
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1a1c]
push eax
lea ecx, [ebp - 0x1a30]
call fcn.00476aa0
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.0047d840
lea ecx, [ebp - 0x1a30]
call fcn.00477300
mov edx, dword [ebp - 0x1a1c]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4798bf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x800
lea eax, [ebp - 0x1218]
push 0
push eax
call fcn.004b17e0
add esp, 0xc
lea eax, [ebp - 0x1218]
push eax
push 0
push 0x53ae58
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x479a25
push 0x53ae60
lea ecx, [ebp - 0x1a1c]
call fcn.004093d0
mov dword [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1a1c]
push eax
lea ecx, [ebp - 0x1a30]
call fcn.00476aa0
push eax
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.0047d840
lea ecx, [ebp - 0x1a30]
call fcn.00477300
lea ecx, [ebp - 0x1a1c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408250
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004b17e0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x800
lea eax, [ebp - 0x1a18]
push 0
push eax
call fcn.004b17e0
add esp, 0xc
lea eax, [ebp - 0x1218]
mov ecx, 0x200
lea esi, [ebp - 0x1a18]
lea edi, [ebp - 0xa18]
rep movsd dword es:[edi], dword [esi]
push eax
push 0
push 0x53ae58
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x479a19
push 0x53ae74
lea ecx, [ebp - 0x1a1c]
call fcn.004093d0
mov dword [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1a1c]
push eax
lea ecx, [ebp - 0x1a30]
call fcn.00476aa0
mov esi, dword [ebp - 0x1a24]
mov ecx, esi
push eax
mov byte [ebp - 4], 6
call fcn.0047d840
lea ecx, [ebp - 0x1a30]
call fcn.00477300
lea ecx, [ebp - 0x1a1c]
jmp 0x479af7
mov esi, dword [ebp - 0x1a24]
mov edi, dword [ebp - 0x1a34]
push 3
lea eax, [ebp - 0x1218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x479aaa
lea eax, [ebp - 0x1218]
push eax
call fcn.004746f0
add esp, 4
test eax, eax
jne 0x479a5d
push 4
push eax
lea eax, [ebp - 0x1218]
mov ecx, edi
push eax
call fcn.00478dd0
push 3
push ebx
push dword [ebp - 0x1a20]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x479c00
push 0x53ae8c
lea ecx, [ebp - 0x1a24]
call fcn.004093d0
mov dword [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1a24]
push eax
lea ecx, [ebp - 0x1a30]
call fcn.00476aa0
mov byte [ebp - 4], 8
jmp 0x479ade
push str.T_rT
lea ecx, [ebp - 0x1a24]
call fcn.004093d0
mov dword [ebp - 4], 9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1a24]
push eax
lea ecx, [ebp - 0x1a30]
call fcn.00476aa0
mov byte [ebp - 4], 0xa
push eax
mov ecx, esi
call fcn.0047d840
lea ecx, [ebp - 0x1a30]
call fcn.00477300
lea ecx, [ebp - 0x1a24]
mov dword [ebp - 4], 0xffffffff
call fcn.00408250
push 0x800
lea eax, [ebp - 0x1a18]
push 0
push eax
call fcn.004b17e0
add esp, 0xc
lea eax, [ebp - 0x1a18]
push eax
push 0
push 0x53ae58
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 3
lea eax, [ebp - 0x1a18]
push eax
push dword [ebp - 0x1a20]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, dword [ebp - 0x1a34]
lea eax, [ebp - 0x1a18]
push 5
push ebx
push eax
mov ecx, edi
call fcn.00478dd0
mov dword [ebp - 0x1a20], eax
test eax, eax
jne 0x479bc9
push 0x53aeb0
lea ecx, [ebp - 0x1a38]
call fcn.004093d0
mov dword [ebp - 4], 0xb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1a38]
push eax
lea ecx, [ebp - 0x1a44]
call fcn.00476aa0
push eax
mov ecx, esi
mov byte [ebp - 4], 0xc
call fcn.0047d840
lea ecx, [ebp - 0x1a44]
call fcn.00477300
lea ecx, [ebp - 0x1a38]
mov dword [ebp - 4], 0xffffffff
call fcn.00408250
mov eax, dword [ebp - 0x1a20]
cmp dword [edi + 0x13c], 0
jne 0x479c00
push ebx
mov ecx, edi
call fcn.00478c90
test eax, eax
je 0x479bf6
push ebx
push str.check_file__s___need_reboot_now
call fcn.00441ac0
add esp, 8
mov dword [edi + 0x13c], 1
mov eax, dword [ebp - 0x1a20]
jmp 0x479c00
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ac4b8
mov esp, ebp
pop ebp
ret 0x14