Function at 0x50d220
Capabilities:
Copy file
Get file attributes

Disassembly:
mov ecx, dword [0x686ac0]
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x24]
push ebp
mov ebp, dword [esp + 0x2c]
test ecx, ecx
je 0x50d28b
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x50d28b
mov ecx, ebp
test ebp, ebp
jne 0x50d24e
mov ecx, str._null_
mov eax, ebx
test ebx, ebx
jne 0x50d259
mov eax, str._null_
movzx edx, byte [esp + 0x30]
push edx
push ecx
push eax
lea eax, [esp + 0x20]
push str._ENTER__PzFile::Copy_File_src_s__dst_s__overwrite_d_
push eax
mov dword [esp + 0x28], str..._osfile.cpp
mov dword [esp + 0x2c], 0xb2
mov dword [esp + 0x30], 0x14
call fcn.0050c8a0
add esp, 0x14
cmp byte [esp + 0x30], 0
jne 0x50d2aa
push 0
push ebp
call dword [sym.imp.MSVCR90.dll__access]
add esp, 8
test eax, eax
jne 0x50d2aa
pop ebp
xor al, al
pop ebx
add esp, 0x1c
ret
xor ecx, ecx
cmp byte [esp + 0x30], cl
push edi
sete cl
push ecx
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
xor edi, edi
mov dword [esp + 0x14], eax
cmp eax, edi
jne 0x50d376
mov ecx, dword [0x686ac0]
cmp ecx, edi
je 0x50d36d
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0xa
jl 0x50d32d
mov ecx, ebp
cmp ebp, edi
jne 0x50d2f0
mov ecx, str._null_
mov eax, ebx
cmp ebx, edi
jne 0x50d2fb
mov eax, str._null_
movzx edx, byte [esp + 0x34]
push edx
push ecx
push eax
lea eax, [esp + 0x24]
push str.FAILED:_CopyFileEx_src_s__dst_s__overwrite_d_
push eax
mov dword [esp + 0x2c], str..._osfile.cpp
mov dword [esp + 0x30], 0xbe
mov dword [esp + 0x34], 0xa
call fcn.0050c8a0
add esp, 0x14
mov ecx, dword [0x686ac0]
cmp ecx, edi
je 0x50d36d
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0x14
jl 0x50d36d
lea ecx, [esp + 0x18]
push str._EXIT__PzFile::Copy_File__:_false
push ecx
mov dword [esp + 0x20], str..._osfile.cpp
mov dword [esp + 0x24], 0xc0
mov dword [esp + 0x28], 0x14
call fcn.0050c8a0
add esp, 8
pop edi
pop ebp
xor al, al
pop ebx
add esp, 0x1c
ret
push edi
push ebp
call dword [sym.imp.MSVCR90.dll__utime32]
add esp, 8
test eax, eax
je 0x50d3ce
mov ecx, dword [0x686ac0]
cmp ecx, edi
je 0x50d3ce
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0xa
jl 0x50d3ce
mov dword [esp + 0x18], str..._osfile.cpp
mov dword [esp + 0x1c], 0xca
mov dword [esp + 0x20], 0xa
call dword [sym.imp.MSVCR90.dll__errno]
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x1c]
push str.FAILED:__utime:__d
push edx
call fcn.0050c8a0
add esp, 0xc
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test eax, 0x800
je 0x50d423
push edi
push 0x80
push 3
push edi
push edi
push 0xc0000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push edi
mov esi, eax
lea eax, [esp + 0x3c]
push eax
push edi
push edi
push 2
lea ecx, [esp + 0x28]
push ecx
push 0x9c040
push esi
mov dword [esp + 0x34], 1
mov dword [esp + 0x58], edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.SeSecurityPrivilege
mov eax, 1
call fcn.0050d170
add esp, 4
lea edx, [esp + 0x10]
push edx
push edi
push edi
push 0xf000000f
mov dword [esp + 0x20], edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityA]
push ebx
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x50d495
mov eax, dword [esp + 0x10]
push eax
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
mov edx, dword [esp + 0x14]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
push edx
mov esi, eax
push esi
push 0xf000000f
push ebx
call edi
test eax, eax
je 0x50d48c
push esi
push 0xf000000f
push ebp
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
push esi
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
add esp, 4
push str.SeSecurityPrivilege
xor eax, eax
call fcn.0050d170
mov ecx, dword [0x686ac0]
add esp, 4
pop esi
test ecx, ecx
je 0x50d4ea
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x50d4ea
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push str._EXIT__PzFile::Copy_File__:__d
push ecx
mov dword [esp + 0x24], str..._osfile.cpp
mov dword [esp + 0x28], 0xf2
mov dword [esp + 0x2c], 0x14
call fcn.0050c8a0
add esp, 0xc
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x1c
ret