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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5790f6
mov eax, dword fs:[0]
push eax
sub esp, 0x2a4
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 ebx, ecx
mov dword [ebp - 0x2b0], ebx
mov esi, dword [ebp + 8]
test esi, esi
jne 0x49b466
mov eax, dword [ebx + 0x580]
mov esi, dword [eax + 0x1c]
call fcn.00439ba0
mov al, byte [esi + 0x70]
test al, al
jne 0x49b786
mov al, byte [esi + 0x30]
test al, al
je 0x49b786
cmp dword [esi + 0x64], 2
jne 0x49b496
push 0
push esi
mov ecx, ebx
call fcn.0049bc60
jmp 0x49b788
call fcn.0040baa0
mov edi, eax
mov eax, dword [edi + 0x1d8]
mov dword [ebp - 0x2a4], eax
test eax, eax
je 0x49b7be
cmp dword [esi + 0x88], 8
lea ebx, [esi + 0x74]
jb 0x49b4bf
mov ebx, dword [ebx]
push ebx
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 [edi + 0x1dc], al
je 0x49b5fd
cmp dword [edi + 0x1f0], eax
je 0x49b5fd
add edi, 0x1e0
lea eax, [ebp - 0x270]
cmp eax, edi
je 0x49b534
push 0xffffffffffffffff
push 0
push edi
mov ecx, eax
call fcn.00406ac0
lea ecx, [ebp - 0x270]
call fcn.00497990
cmp word [eax], 0x5c
je 0x49b555
push 0x588408
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
mov edi, 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 0x49b586
lea eax, [ebp - 0x270]
push 0x104
lea ecx, [ebp - 0x258]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x258]
push eax
lea ecx, [ebp - 0x270]
call fcn.00403ef0
cmp dword [ebp - 0x25c], 8
mov eax, dword [ebp - 0x270]
jae 0x49b5c0
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49b5e9
cmp dword [ebp - 0x25c], 8
mov eax, dword [ebp - 0x270]
jae 0x49b5e0
lea eax, [ebp - 0x270]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
cmp edi, 1
jne 0x49b68e
push dword [ebp - 0x2ac]
jmp 0x49b6f2
push ebx
lea ecx, [ebp - 0x288]
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 0x49b643
lea eax, [ebp - 0x288]
push eax
lea ecx, [ebp - 0x270]
call fcn.00403ef0
push 0x588408
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
mov edi, dword [ebp - 0x2a4]
cmp edi, 2
jne 0x49b67a
push str.nppBackup_
lea ecx, [ebp - 0x270]
call fcn.0040a2e0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x288]
call fcn.004038c0
jmp 0x49b55b
cmp edi, 2
jne 0x49b70d
push 0
call fcn.0054fb7f
mov dword [ebp - 0x2a8], eax
lea eax, [ebp - 0x2a8]
push eax
mov dword [ebp - 0x2a4], edx
call fcn.0054fad9
add esp, 8
test eax, eax
je 0x49b70d
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 0x49b722
lea eax, [ebp - 0x270]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x49b7a6
cmp dword [ebp - 0x25c], 8
mov ecx, dword [ebp - 0x270]
jae 0x49b745
lea ecx, [ebp - 0x270]
mov ebx, dword [ebp - 0x2b0]
push ecx
push 0
push 0x14
mov eax, dword [ebx]
lea ecx, [ebx + 0x300]
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]
push str.FileBackupFailed
call fcn.004607b0
cmp eax, 7
jne 0x49b7ac
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x270]
call fcn.004038c0
xor al, al
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 4
mov ebx, dword [ebp - 0x2b0]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x270]
call fcn.004038c0
cmp dword [esi + 0x88], 8
lea eax, [esi + 0x74]
jb 0x49b7cc
mov eax, dword [eax]
push 0
push eax
push esi
mov ecx, ebx
call fcn.004987f0
jmp 0x49b788