Function at 0x51c18c
Capabilities:
Copy file

Disassembly:
push 0xe64
mov eax, 0x48f68b
call fcn.0047ec24
mov dword [ebp - 0xe68], edx
mov edi, ecx
test byte [0x5a4e00], 2
mov eax, dword [ebp + 8]
mov dword [ebp - 0xe6c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xe70], eax
je 0x51c1f9
mov edx, edi
lea ecx, [ebp - 0xe60]
call fcn.004d89c9
push dword [0x5a3fcc]
mov ecx, 0x425d00
push dword [0x5a3fc8]
mov edx, dword [eax]
call fcn.004d9d0d
cmp dword [ebp - 0xe60], 0
je 0x51c1f9
push dword [ebp - 0xe60]
call dword [sym.imp.tbbmalloc.dll_scalable_free]
pop ecx
cmp dword [0x5a30e8], 0
je 0x51c58e
xor ebx, ebx
lea eax, [ebp - 0xe64]
push 0x425898
push ebx
push ebx
push eax
mov dword [ebp - 0xe64], ebx
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wgetenv_s]
cmp dword [ebp - 0xe64], ebx
lea eax, [ebp - 0x428]
push 0x100
push eax
push 0x10a
lea eax, [ebp - 0x228]
seta byte [0x5b4010]
push eax
push ebx
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
lea esi, [ebp - 0x228]
add esp, 0x34
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x51c25e
push 0x104
lea eax, [ebp - 0x838]
mov byte [ebp - 0xe59], 0
sub esi, ecx
xor ebx, ebx
push edi
push eax
sar esi, 1
inc ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfullpath]
add esp, 0xc
lea ecx, [ebp - 0x838]
mov edx, 0x5b4014
call fcn.0050b663
test eax, eax
je 0x51c2d0
push 0x100
lea ecx, [ebp - 0x428]
push ecx
push 0x10a
lea ecx, [ebp - 0x228]
push ecx
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push dword [eax + 8]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
add esp, 0x24
jmp 0x51c4b5
push dword [0x5a30e8]
lea eax, [ebp - 0xe58]
push 0x30f
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0xe58]
push 0x4012f8
push 0x30f
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 0xc
lea eax, [ebp - 0x228]
push eax
lea eax, [ebp - 0xe58]
push 0x30f
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 0xc
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0xe58]
push 0x30f
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 0xc
xor eax, eax
push eax
push 0x80
push 1
push eax
push eax
push eax
lea eax, [ebp - 0xe58]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x51c3a9
cmp byte [0x5b4010], 0
jne 0x51c4b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7b
je 0x51c39a
inc ebx
mov eax, 0x10a
push ebx
sub eax, esi
push 0x4258ec
push eax
lea eax, [ebp - 0x228]
lea eax, [eax + esi*2]
push eax
call fcn.00470ccb
add esp, 0x10
jmp 0x51c2d0
push 0x7b
push edi
push 0x55a
push 0
call fcn.0047dc0b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp + 0x14], 0
je 0x51c41e
push 0x4258f4
mov esi, 0x104
lea eax, [ebp - 0x630]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0x228]
push eax
push esi
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea eax, [ebp - 0x630]
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x630]
push 0x104
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x630]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x51c41e
mov byte [ebp - 0xe59], 1
push 0
lea eax, [ebp - 0xe58]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
mov edx, 0x401c80
mov al, byte [ebp + 0x10]
test al, al
je 0x51c44d
test esi, esi
je 0x51c44d
cmp ebx, 1
jbe 0x51c44d
lea ecx, [ebp - 0xe58]
jmp 0x51c45c
mov ecx, edx
test al, al
je 0x51c463
test esi, esi
je 0x51c463
cmp ebx, 1
jbe 0x51c463
mov eax, 0x4258fc
jmp 0x51c473
mov eax, edx
test esi, esi
jne 0x51c473
mov edx, 0x425908
mov ecx, 0x401c80
push ecx
push eax
push edx
push edi
push 0x42591c
call fcn.004320dd
add esp, 0x14
test esi, esi
je 0x51c4b0
lea ecx, [ebp - 0xe58]
call fcn.0045c3b6
lea ecx, [ebp - 0x838]
mov esi, eax
call fcn.0045c3b6
push 0
push esi
push eax
mov edx, 0x5b4014
xor ecx, ecx
call fcn.00470834
call fcn.004316ca
mov esi, 0x5a3a28
push esi
mov dword [ebp - 0xe60], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
and dword [ebp - 4], 0
mov eax, dword [ebp - 0xe68]
test eax, eax
je 0x51c55c
push eax
push 0x425944
push dword [0x5a352c]
call fcn.004fd8fd
mov eax, dword [ebp - 0xe6c]
add esp, 0xc
test eax, eax
je 0x51c50b
push eax
push 0x42594c
push dword [0x5a352c]
call fcn.004fd8fd
add esp, 0xc
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x228]
push eax
push 0x425954
push dword [0x5a352c]
call fcn.004fd8fd
mov eax, dword [ebp - 0xe70]
add esp, 0x10
test eax, eax
je 0x51c54a
push eax
push 0x425964
push dword [0x5a352c]
call fcn.004fd8fd
add esp, 0xc
push 0x42596c
push dword [0x5a352c]
call fcn.004fd8fd
pop ecx
pop ecx
cmp byte [ebp - 0xe59], 0
je 0x51c587
push edi
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x228]
push eax
push 0x425974
push dword [0x5a352c]
call fcn.004fd8fd
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0047ebd3
ret 0x10