Function at 0x49b7e0
Capabilities:
Check if file exists
Copy file
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x579136
mov eax, dword fs:[0]
push eax
sub esp, 0x2ac
mov eax, dword [0x5fc150]
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
push 0
call fcn.0047d440
test al, al
je 0x49bbf8
xor eax, eax
mov dword [ebp - 0x2b0], eax
cmp dword [edi + 0x320], eax
jbe 0x49bbf8
lea ecx, [edi + 0x310]
lea esp, [esp]
push eax
call fcn.00439b00
mov ebx, eax
test ebx, ebx
jne 0x49b855
mov eax, dword [edi + 0x580]
mov ebx, dword [eax + 0x1c]
call fcn.00439ba0
mov al, byte [ebx + 0x70]
test al, al
jne 0x49bbd9
mov al, byte [ebx + 0x30]
test al, al
je 0x49bbd9
cmp dword [ebx + 0x64], 2
jne 0x49b885
push 0
push ebx
mov ecx, edi
call fcn.0049bc60
jmp 0x49bbd9
call fcn.0040baa0
mov esi, eax
mov eax, dword [esi + 0x1d8]
mov dword [ebp - 0x2a8], eax
test eax, eax
je 0x49bbc0
cmp dword [ebx + 0x88], 8
lea eax, [ebx + 0x74]
mov dword [ebp - 0x2a4], eax
jb 0x49b8ba
mov eax, dword [eax]
mov dword [ebp - 0x2a4], eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov dword [ebp - 0x2ac], eax
xor eax, eax
mov dword [ebp - 0x260], 0
mov dword [ebp - 0x25c], 0
mov dword [ebp - 0x25c], 7
mov dword [ebp - 0x260], 0
mov word [ebp - 0x270], ax
mov dword [ebp - 4], eax
cmp byte [esi + 0x1dc], al
je 0x49b9a9
cmp dword [esi + 0x1f0], eax
je 0x49b9a9
add esi, 0x1e0
lea eax, [ebp - 0x270]
cmp eax, esi
je 0x49b92f
push 0xffffffffffffffff
push 0
push esi
mov ecx, eax
call fcn.00406ac0
lea ecx, [ebp - 0x270]
call fcn.00497990
cmp word [eax], 0x5c
je 0x49b950
push 0x588408
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
mov esi, dword [ebp - 0x2a4]
push 0x208
lea eax, [ebp - 0x258]
push 0
push eax
call fcn.00544020
mov eax, dword [ebp - 0x270]
add esp, 0xc
cmp dword [ebp - 0x25c], 8
jae 0x49b981
lea eax, [ebp - 0x270]
push 0x104
lea ecx, [ebp - 0x258]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp word [ebp - 0x258], 0
jne 0x49ba3e
xor ecx, ecx
jmp 0x49ba56
mov esi, dword [ebp - 0x2a4]
lea ecx, [ebp - 0x288]
push esi
call fcn.004029a0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x288]
push eax
lea eax, [ebp - 0x2a0]
push eax
call fcn.00423dd0
add esp, 8
lea ecx, [ebp - 0x2a0]
call fcn.004038c0
cmp dword [ebp - 0x274], 8
mov eax, dword [ebp - 0x288]
jae 0x49b9f5
lea eax, [ebp - 0x288]
push eax
lea ecx, [ebp - 0x270]
call fcn.00403ef0
push 0x588408
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
cmp dword [ebp - 0x2a8], 2
jne 0x49ba2a
push str.nppBackup_
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x288]
call fcn.004038c0
jmp 0x49b956
lea ecx, [ebp - 0x258]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49ba47
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x258]
push eax
lea ecx, [ebp - 0x270]
call fcn.00406c80
cmp dword [ebp - 0x25c], 8
mov eax, dword [ebp - 0x270]
jae 0x49ba7e
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49baa7
cmp dword [ebp - 0x25c], 8
mov eax, dword [ebp - 0x270]
jae 0x49ba9e
lea eax, [ebp - 0x270]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
mov eax, dword [ebp - 0x2a8]
cmp eax, 1
jne 0x49baba
push dword [ebp - 0x2ac]
jmp 0x49bb1e
cmp eax, 2
jne 0x49bb39
push 0
call fcn.0054fb7f
mov dword [ebp - 0x2b8], eax
lea eax, [ebp - 0x2b8]
push eax
mov dword [ebp - 0x2b4], edx
call fcn.0054fad9
add esp, 8
test eax, eax
je 0x49bb39
push eax
push str._Y__m__d__H_M_S
lea eax, [ebp - 0x50]
push 0x20
push eax
call fcn.0054ee89
add esp, 0x10
lea ecx, [ebp - 0x270]
push dword [ebp - 0x2ac]
call fcn.0040a2e0
push 0x58823c
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
push str..bak
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
cmp dword [ebp - 0x25c], 8
mov eax, dword [ebp - 0x270]
jae 0x49bb4e
lea eax, [ebp - 0x270]
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x49bbae
cmp dword [ebp - 0x25c], 8
mov ecx, dword [ebp - 0x270]
jae 0x49bb71
lea ecx, [ebp - 0x270]
mov eax, dword [edi]
push ecx
push 0
push 0x14
push str.File_Backup_Failed
push str.The_previous_version_of_the_file_could_not_be_saved_into_the_backup_directory_at___STR_REPLACE__._r_rDo_you_want_to_save_the_current_file_anyways_
push dword [eax + 0xc]
lea ecx, [edi + 0x300]
push str.FileBackupFailed
call fcn.004607b0
cmp eax, 7
jne 0x49bbae
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x270]
call fcn.004038c0
jmp 0x49bbd9
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x270]
call fcn.004038c0
cmp dword [ebx + 0x88], 8
lea eax, [ebx + 0x74]
jb 0x49bbce
mov eax, dword [eax]
push 0
push eax
push ebx
mov ecx, edi
call fcn.004987f0
mov eax, dword [ebp - 0x2b0]
lea ecx, [edi + 0x310]
inc eax
mov dword [ebp - 0x2b0], eax
cmp eax, dword [edi + 0x320]
jb 0x49b840
push 1
mov ecx, edi
call fcn.0047d440
test al, al
je 0x49bc2d
xor esi, esi
cmp dword [edi + 0x3a4], esi
jbe 0x49bc2d
nop
push esi
lea ecx, [edi + 0x394]
call fcn.00439b00
push eax
mov ecx, edi
call fcn.0049b420
inc esi
cmp esi, dword [edi + 0x3a4]
jb 0x49bc10
mov ecx, edi
call fcn.0046ae20
mov al, 1
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.0052c233
mov esp, ebp
pop ebp
ret