Function at 0x4e3650
Capabilities:
Check if file exists
Clear file content
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
test ebx, ebx
je case.0x4e3695.5
mov esi, dword [ebp + 0x14]
test esi, esi
je case.0x4e3695.5
mov eax, dword [ebp + 0xc]
add eax, 0xfffffffc
cmp eax, 0x10
ja case.0x4e3695.5
movzx eax, byte [eax + 0x4e3ecc]
jmp dword [eax*4 + 0x4e3eb8]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
sub eax, ecx
add eax, dword [esi]
cmp eax, 0x24
jb case.0x4e3695.5
movzx eax, byte [ecx + 7]
cdq
mov ecx, eax
mov eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
shl ecx, 8
movzx eax, byte [eax + 6]
cdq
add ecx, eax
mov eax, dword [ebp - 0x18]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
shl ecx, 8
movzx eax, byte [eax + 5]
cdq
add ecx, eax
mov eax, dword [ebp - 0x18]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
shl ecx, 8
movzx eax, byte [eax + 4]
cdq
add ecx, eax
mov eax, dword [ebp - 0x18]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
shl ecx, 8
movzx eax, byte [eax + 3]
cdq
add ecx, eax
mov eax, dword [ebp - 0x18]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
shl ecx, 8
movzx eax, byte [eax + 2]
cdq
add ecx, eax
mov eax, dword [ebp - 0x18]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
shl ecx, 8
movzx eax, byte [eax + 1]
cdq
add ecx, eax
mov eax, dword [ebp - 0x18]
adc eax, edx
shld eax, ecx, 8
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
shl ecx, 8
movzx eax, byte [eax]
cdq
add ecx, eax
mov dword [ebp - 0x24], ecx
adc dword [ebp - 0x18], edx
mov ecx, dword [esi + 4]
add ecx, 8
mov dword [esi + 4], ecx
movzx eax, byte [ecx + 7]
cdq
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 4], eax
movzx eax, byte [ecx + 6]
mov dword [ebp - 8], edx
cdq
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
adc dword [ebp - 8], edx
mov edx, dword [ebp - 8]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 4], eax
movzx eax, byte [ecx + 5]
mov dword [ebp - 8], edx
cdq
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
adc dword [ebp - 8], edx
mov edx, dword [ebp - 8]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 4], eax
movzx eax, byte [ecx + 4]
mov dword [ebp - 8], edx
cdq
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
adc dword [ebp - 8], edx
mov edx, dword [ebp - 8]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 4], eax
movzx eax, byte [ecx + 3]
mov dword [ebp - 8], edx
cdq
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
adc dword [ebp - 8], edx
mov edx, dword [ebp - 8]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 4], eax
movzx eax, byte [ecx + 2]
mov dword [ebp - 8], edx
cdq
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
adc dword [ebp - 8], edx
mov edx, dword [ebp - 8]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 4], eax
movzx eax, byte [ecx + 1]
mov dword [ebp - 8], edx
cdq
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
adc dword [ebp - 8], edx
mov edx, dword [ebp - 8]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 4], eax
movzx eax, byte [ecx]
mov dword [ebp - 8], edx
cdq
add dword [ebp - 4], eax
adc dword [ebp - 8], edx
add ecx, 8
mov dword [esi + 4], ecx
movzx eax, byte [ecx + 7]
cdq
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 0xc], eax
movzx eax, byte [ecx + 6]
mov dword [ebp - 0x10], edx
cdq
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
adc dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x10]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 0xc], eax
movzx eax, byte [ecx + 5]
mov dword [ebp - 0x10], edx
cdq
add dword [ebp - 0xc], eax
adc dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 0xc], eax
movzx eax, byte [ecx + 4]
mov dword [ebp - 0x10], edx
cdq
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
adc dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x10]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 0xc], eax
movzx eax, byte [ecx + 3]
mov dword [ebp - 0x10], edx
cdq
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
adc dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x10]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 0xc], eax
movzx eax, byte [ecx + 2]
mov dword [ebp - 0x10], edx
cdq
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
adc dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x10]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 0xc], eax
movzx eax, byte [ecx + 1]
mov dword [ebp - 0x10], edx
cdq
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
adc dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x10]
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 0xc], eax
movzx eax, byte [ecx]
mov dword [ebp - 0x10], edx
cdq
add dword [ebp - 0xc], eax
adc dword [ebp - 0x10], edx
add ecx, 8
mov dword [esi + 4], ecx
movzx eax, byte [ecx + 7]
cdq
shld edx, eax, 8
shl eax, 8
mov dword [ebp - 0x14], eax
movzx eax, byte [ecx + 6]
mov dword [ebp + 8], edx
cdq
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
adc dword [ebp + 8], edx
shld dword [ebp + 8], eax, 8
shl eax, 8
mov dword [ebp - 0x14], eax
movzx eax, byte [ecx + 5]
cdq
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
adc dword [ebp + 8], edx
shld dword [ebp + 8], eax, 8
shl eax, 8
mov dword [ebp - 0x14], eax
movzx eax, byte [ecx + 4]
cdq
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
adc dword [ebp + 8], edx
shld dword [ebp + 8], eax, 8
shl eax, 8
mov dword [ebp - 0x14], eax
movzx eax, byte [ecx + 3]
cdq
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
adc dword [ebp + 8], edx
shld dword [ebp + 8], eax, 8
shl eax, 8
mov dword [ebp - 0x14], eax
movzx eax, byte [ecx + 2]
cdq
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
adc dword [ebp + 8], edx
shld dword [ebp + 8], eax, 8
shl eax, 8
mov dword [ebp - 0x14], eax
movzx eax, byte [ecx + 1]
cdq
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
adc dword [ebp + 8], edx
shld dword [ebp + 8], eax, 8
shl eax, 8
mov dword [ebp - 0x14], eax
movzx eax, byte [ecx]
cdq
add dword [ebp - 0x14], eax
adc dword [ebp + 8], edx
add ecx, 8
mov dword [esi + 4], ecx
movzx edx, byte [ecx + 3]
movzx eax, byte [ecx + 2]
shl edx, 8
add edx, eax
movzx eax, byte [ecx + 1]
shl edx, 8
add edx, eax
movzx eax, byte [ecx]
shl edx, 8
add edx, eax
lea eax, [ecx + 4]
mov dword [esi + 4], eax
push dword [ebx + 0x264]
mov dword [ebp - 0x28], edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je case.0x4e3695.5
cmp dword [ebx + 8], 0xffffffff
jne 0x4e3a79
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je case.0x4e3695.5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebx + 0x264]
push str.Unable_to_set_file_time__s___I32d_
push str.drive_file_set_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_file.c
push 0x22f
push 4
push 0
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x24
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x24]
mov eax, ecx
mov edx, dword [ebp - 0x18]
or eax, edx
je 0x4e3a91
lea eax, [ebp - 0x38]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 4]
mov eax, ecx
mov edx, dword [ebp - 8]
or eax, edx
je 0x4e3aa9
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0xc]
mov eax, edx
mov esi, dword [ebp - 0x10]
or eax, esi
je 0x4e3abe
mov dword [ebp - 0x2c], esi
lea edi, [ebp - 0x30]
mov dword [ebp - 0x30], edx
mov ecx, dword [ebp - 0x14]
mov eax, ecx
or eax, dword [ebp + 8]
je 0x4e3ade
mov eax, dword [ebp + 8]
cmp eax, esi
jb 0x4e3ade
ja 0x4e3ad5
cmp ecx, edx
jbe 0x4e3ade
mov dword [ebp - 0x2c], eax
lea edi, [ebp - 0x30]
mov dword [ebp - 0x30], ecx
push dword [ebp - 0x28]
push dword [ebx + 0x264]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x4e3e99
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je case.0x4e3695.5
push dword [ebx + 0x264]
push str.Unable_to_set_file_time_to__s
push str.drive_file_set_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_file.c
push 0x254
push 4
push 0
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
sub eax, ecx
add eax, dword [esi]
cmp eax, 8
jb case.0x4e3695.5
movzx eax, byte [ecx + 7]
cdq
mov esi, eax
mov edi, edx
movzx eax, byte [ecx + 6]
shld edi, esi, 8
cdq
shl esi, 8
add esi, eax
movzx eax, byte [ecx + 5]
adc edi, edx
cdq
shld edi, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [ecx + 4]
adc edi, edx
cdq
shld edi, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [ecx + 3]
adc edi, edx
cdq
shld edi, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [ecx + 2]
adc edi, edx
cdq
shld edi, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [ecx + 1]
adc edi, edx
cdq
shld edi, esi, 8
shl esi, 8
add esi, eax
movzx eax, byte [ecx]
adc edi, edx
cdq
shld edi, esi, 8
shl esi, 8
add esi, eax
lea eax, [ecx + 8]
mov ecx, dword [ebp + 0x14]
adc edi, edx
mov dword [ecx + 4], eax
mov eax, dword [ebx + 8]
cmp eax, 0xffffffff
jne 0x4e3c64
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je case.0x4e3695.5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push dword [ebx + 0x264]
push str.Unable_to_truncate__s_to__I64d___I32d_
push str.drive_file_set_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_file.c
push 0x267
push 4
push 0
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x2c
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x4e3cba
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je case.0x4e3695.5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push dword [ebx + 0x264]
push str.Unable_to_truncate__s_to__d___I32d_
push str.drive_file_set_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_file.c
push 0x26f
jmp 0x4e3c41
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4e3e99
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je case.0x4e3695.5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push dword [ebx + 0x264]
push str.Unable_to_truncate__s_to__d___I32d_
push str.drive_file_set_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_file.c
push 0x277
jmp 0x4e3c41
cmp dword [ebx + 4], edi
je 0x4e3d2c
push dword [ebx + 0x264]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryEmptyW]
test eax, eax
je 0x4e3e99
cmp dword [ebp + 0x10], edi
je 0x4e3d55
mov eax, dword [esi + 8]
mov edx, dword [esi + 4]
sub eax, edx
add eax, dword [esi]
cmp eax, 1
jb case.0x4e3695.5
mov cl, byte [edx]
lea eax, [edx + 1]
mov byte [ebp + 0xb], cl
mov dword [esi + 4], eax
test cl, cl
je 0x4e3d7d
jmp 0x4e3d59
mov byte [ebp + 0xb], 1
push dword [ebx + 0x264]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x4e3d7a
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [ebp + 0xb]
pop edi
movzx eax, cl
mov dword [ebx + 0x26c], eax
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esi]
mov eax, edi
mov edx, dword [esi + 4]
sub eax, edx
add eax, dword [esi + 8]
cmp eax, 6
jb case.0x4e3695.5
mov al, byte [edx]
add edx, 2
mov dword [esi + 4], edx
mov byte [ebp + 0xb], al
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 2]
shl ecx, 8
add ecx, eax
movzx eax, byte [edx + 1]
shl ecx, 8
add ecx, eax
movzx eax, byte [edx]
add edx, 4
shl ecx, 8
sub edi, edx
mov dword [esi + 4], edx
add edi, dword [esi + 8]
add ecx, eax
cmp edi, ecx
jb case.0x4e3695.5
push ecx
push edx
push dword [ebx + 0x260]
call fcn.004e2860
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4e3e4f
push 4
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je case.0x4e3695.5
push str.drive_file_combine_fullpath_failed_
push str.drive_file_set_information
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPchannelsdriveclientdrive_file.c
push 0x2ae
push 4
push esi
push str.com.freerdp.channels.drive.client
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 8]
cmp eax, 0xffffffff
je 0x4e3e65
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 8], 0xffffffff
xor eax, eax
cmp byte [ebp + 0xb], al
setne al
or eax, 2
push eax
push esi
push dword [ebx + 0x264]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
test eax, eax
je 0x4e3ea5
push ebx
call fcn.004e35e0
add esp, 8
test eax, eax
je case.0x4e3695.5
push ebx
call fcn.004e2a30
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00580204
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret