Function at 0x50c410
Capabilities:
Copy file
Get file attributes

Disassembly:
mov ecx, dword [0x683998]
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x24]
push ebp
mov ebp, dword [esp + 0x2c]
test ecx, ecx
je 0x50c47b
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x50c47b
mov ecx, ebp
test ebp, ebp
jne 0x50c43e
mov ecx, str._null_
mov eax, ebx
test ebx, ebx
jne 0x50c449
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], 0xac
mov dword [esp + 0x30], 0x14
call fcn.0050bb00
add esp, 0x14
cmp byte [esp + 0x30], 0
jne 0x50c49a
push 0
push ebp
call dword [sym.imp.MSVCR90.dll__access]
add esp, 8
test eax, eax
jne 0x50c49a
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 0x50c566
mov ecx, dword [0x683998]
cmp ecx, edi
je 0x50c55d
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0xa
jl 0x50c51d
mov ecx, ebp
cmp ebp, edi
jne 0x50c4e0
mov ecx, str._null_
mov eax, ebx
cmp ebx, edi
jne 0x50c4eb
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], 0xb8
mov dword [esp + 0x34], 0xa
call fcn.0050bb00
add esp, 0x14
mov ecx, dword [0x683998]
cmp ecx, edi
je 0x50c55d
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0x14
jl 0x50c55d
lea ecx, [esp + 0x18]
push str._EXIT__PzFile::Copy_File__:_false
push ecx
mov dword [esp + 0x20], str..._osfile.cpp
mov dword [esp + 0x24], 0xba
mov dword [esp + 0x28], 0x14
call fcn.0050bb00
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 0x50c5be
mov ecx, dword [0x683998]
cmp ecx, edi
je 0x50c5be
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0xa
jl 0x50c5be
mov dword [esp + 0x18], str..._osfile.cpp
mov dword [esp + 0x1c], 0xc4
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.0050bb00
add esp, 0xc
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test eax, 0x800
je 0x50c613
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.0050c360
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 0x50c685
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 0x50c67c
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.0050c360
mov ecx, dword [0x683998]
add esp, 4
pop esi
test ecx, ecx
je 0x50c6da
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x50c6da
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], 0xec
mov dword [esp + 0x2c], 0x14
call fcn.0050bb00
add esp, 0xc
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x1c
ret