Function at 0x41b520
Capabilities:
Check if file exists
Delete file
Get common file path
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x503c52
mov eax, dword fs:[0]
push eax
mov eax, 0x1528
call fcn.0049a0d0
mov eax, dword [0x5473d8]
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 dword [ebp - 0x1530], edx
mov edi, ecx
mov dword [ebp - 0x152c], edi
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jne 0x41b56f
xor eax, eax
jmp 0x41b9f7
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call ebx
test eax, eax
je 0x41b568
call fcn.00405dc0
mov ecx, eax
test ecx, ecx
je 0x41ba13
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1528], esi
push 0x208
lea eax, [ebp - 0x318]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.004c5380
push 0x208
lea eax, [ebp - 0x520]
push 0
push eax
call fcn.004c5380
add esp, 0x18
lea eax, [ebp - 0x520]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x520]
push eax
call fcn.004d21f3
mov eax, dword [edi]
add esp, 4
cmp dword [eax - 0xc], 0
jl 0x41ba1d
movzx eax, word [eax]
push eax
call fcn.004d0f7c
movzx eax, ax
add esp, 4
cmp word [ebp - 0x520], ax
jne 0x41b622
lea eax, [ebp - 0x318]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x41b676
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jl 0x41ba27
movzx eax, word [eax]
push eax
push str._c:.temp
lea eax, [ebp - 0x318]
push 0x104
push eax
call fcn.0041a790
add esp, 0x10
lea eax, [ebp - 0x318]
push eax
call ebx
test eax, eax
jne 0x41b676
lea eax, [ebp - 0x318]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 2
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
call fcn.00405dc0
mov ecx, eax
test ecx, ecx
je 0x41ba31
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1524], eax
lea eax, [ebp - 0x318]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x1524]
call fcn.00404d20
test al, al
jne 0x41b6d8
lea ecx, [ebp - 0x318]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41b6b6
sub ecx, edx
lea eax, [ebp - 0x318]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x1524]
call fcn.004051c0
mov byte [ebp - 4], 2
mov edi, dword [ebp - 0x1524]
cmp dword [edi - 0xc], 0x104
jg 0x41b7c9
push 0x800
lea eax, [ebp - 0x1520]
push 0
push eax
call fcn.004c5380
push 0x800
lea eax, [ebp - 0xd20]
push 0
push eax
call fcn.004c5380
push edi
lea eax, [ebp - 0x1520]
push 0x400
push eax
call fcn.004cba67
push 0x100
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.004c5380
add esp, 0x30
xor ebx, ebx
nop
lea ecx, [ebp - 0x110]
call fcn.00416560
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x1520]
push eax
lea eax, [ebp - 0xd20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push str..tmp
lea eax, [ebp - 0xd20]
push 0x400
push eax
call fcn.004d27bd
add esp, 0xc
lea eax, [ebp - 0xd20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41b798
inc ebx
cmp ebx, 0xa
jl 0x41b740
jmp 0x41b7c9
lea ecx, [ebp - 0xd20]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41b7a1
sub ecx, edx
lea eax, [ebp - 0xd20]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x1528]
call fcn.004051c0
mov esi, dword [ebp - 0x1528]
or ebx, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x41b7e7
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, dword [ebp - 0x152c]
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x41b960
call fcn.00405dc0
mov ecx, eax
test ecx, ecx
je 0x41ba3b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1524], eax
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push dword [edi]
lea eax, [ebp - 0x1524]
push str.move__s_to__s__failed__error_d
push eax
call fcn.00407640
lea ecx, [ebp - 0x1534]
call fcn.00418e90
add esp, 0xc
mov byte [ebp - 4], 4
mov ebx, dword [eax]
lea ecx, [ebp - 0xa8]
call fcn.0040b430
mov byte [ebp - 4], 5
mov eax, 0x531ef4
mov edi, dword [ebp - 0x1524]
test edi, edi
cmovne eax, edi
push eax
lea eax, [ebp - 0xa8]
push eax
call fcn.00409e50
mov eax, dword [ebx]
lea ecx, [ebp - 0xa8]
add esp, 8
push ecx
mov ecx, ebx
call dword [eax + 0xc]
mov eax, dword [ebp - 0xa8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xa8], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xac], eax
lea ecx, [ebp - 0xa4]
call fcn.0040c1d0
mov eax, dword [ebp - 0xa8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xa8], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0xac], eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 6
push eax
mov dword [ebp - 0x58], vtable.std::ios_base.0
call fcn.0041c00c
add esp, 4
mov byte [ebp - 4], 7
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x1530]
mov dword [ebp - 0x152c], ecx
test ecx, ecx
je 0x41b93e
mov eax, ebx
lock xadd dword [ecx + 4], eax
jne 0x41b93e
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x152c]
mov eax, ebx
lock xadd dword [ecx + 8], eax
jne 0x41b93e
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x41b973
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
xor edi, edi
jmp 0x41b9d9
push dword [edi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41b977
mov ecx, esi
call fcn.0041afb0
xor edi, edi
jmp 0x41b9d9
mov edx, dword [ebp - 0x1530]
lea ecx, [esi - 0x10]
mov edi, dword [edx]
sub edi, 0x10
cmp ecx, edi
je 0x41b9d4
cmp dword [edi + 0xc], 0
jl 0x41b9c9
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x41b9c9
call fcn.004075e0
mov dword [ebp - 0x152c], eax
lea edx, [edi + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41b9bc
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x152c]
mov ecx, dword [ebp - 0x1530]
add eax, 0x10
mov dword [ecx], eax
jmp 0x41b9d4
push dword [esi - 0xc]
mov ecx, edx
push esi
call fcn.004051c0
mov edi, 1
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x41b9f5
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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.00499723
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00405ba0
push 0x80070057
call fcn.00405ba0
push 0x80070057
call fcn.00405ba0
push 0x80004005
call fcn.00405ba0
push 0x80004005
call fcn.00405ba0
int3