Function at 0x51e310
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x580798
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x5b107c]
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
xor ebx, ebx
mov dword [ebp - 4], ebx
xor esi, esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
mov byte [ebp - 4], 2
mov ecx, dword [0x6825ac]
mov edi, dword [0x6825a8]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x51e39a
cmp byte [ebp + 0x24], bl
je 0x51e4e9
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
jmp 0x51e63e
cmp byte [ebp + 0x24], bl
je 0x51e4e9
mov dword [ebp - 0x50], edi
cmp edi, dword [0x6825ac]
je 0x51e619
push 0x656b68
or eax, 0xffffffff
xor ebx, ebx
lea ecx, [ebp - 0x2c]
call fcn.00404e10
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x54], esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
push edi
or eax, 0xffffffff
mov byte [ecx], bl
call fcn.00404e10
lea esi, [ebp - 0x48]
call fcn.0051e670
push eax
lea ebx, [ebp - 0x64]
mov byte [ebp - 4], 3
call fcn.005202e0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x34], 0x10
jb 0x51e40d
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x54], esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push edi
or eax, 0xffffffff
xor ebx, ebx
mov byte [ecx], 0
call fcn.00404e10
lea esi, [ebp - 0x48]
call fcn.0051f900
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 4
call fcn.00523850
mov byte [ebp - 4], 2
cmp dword [ebp - 0x34], 0x10
jb 0x51e45c
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
sub esp, 0x1c
mov ecx, esp
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x54], esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push edx
or eax, 0xffffffff
xor ebx, ebx
mov byte [ecx], 0
call fcn.00404e10
call fcn.0051e710
lea eax, [ebp - 0x64]
call fcn.005203a0
lea esi, [ebp - 0x2c]
call fcn.00523850
mov esi, dword [ebp - 0x2c]
mov ebx, 0x10
cmp dword [ebp - 0x18], ebx
jae 0x51e4a8
lea esi, [ebp - 0x2c]
lea eax, [ebp - 0x50]
call fcn.00467d20
cmp dword [eax + 0x14], ebx
jb 0x51e4b7
mov eax, dword [eax]
push 1
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x51e4d2
push edi
lea esi, [ebp - 0x4c]
call fcn.005203c0
mov edi, dword [eax]
jmp 0x51e4d5
add edi, 0x1c
mov dword [ebp - 0x50], edi
cmp edi, dword [0x6825ac]
jne 0x51e3b2
jmp 0x51e601
push 0x656b68
or eax, 0xffffffff
xor ebx, ebx
lea ecx, [ebp - 0x2c]
call fcn.00404e10
sub esp, 0x1c
mov ecx, esp
lea eax, [ebp + 8]
mov dword [ebp - 0x4c], esp
push eax
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
or eax, 0xffffffff
mov byte [ecx], bl
call fcn.00404e10
lea esi, [ebp - 0x48]
call fcn.0051e670
push eax
lea ebx, [ebp - 0x64]
mov byte [ebp - 4], 5
call fcn.005202e0
mov edi, 0x10
mov byte [ebp - 4], 2
cmp dword [ebp - 0x34], edi
jb 0x51e54b
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
sub esp, 0x1c
mov ecx, esp
lea edx, [ebp + 8]
mov dword [ebp - 0x4c], esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push edx
or eax, 0xffffffff
xor ebx, ebx
mov byte [ecx], 0
call fcn.00404e10
lea esi, [ebp - 0x48]
call fcn.0051f900
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 6
call fcn.00523850
mov byte [ebp - 4], 2
cmp dword [ebp - 0x34], edi
jb 0x51e59c
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
sub esp, 0x1c
mov ecx, esp
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x4c], esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
push edx
or eax, 0xffffffff
xor ebx, ebx
mov byte [ecx], 0
call fcn.00404e10
call fcn.0051e710
lea eax, [ebp - 0x64]
call fcn.005203a0
lea esi, [ebp - 0x2c]
call fcn.00523850
mov ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x18], edi
jae 0x51e5e2
mov ecx, esi
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x1c], edi
jae 0x51e5ed
lea eax, [ebp + 8]
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x51e601
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x18], 0x10
jb 0x51e614
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov esi, dword [ebp - 0x64]
xor ebx, ebx
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
cmp esi, ebx
je 0x51e63e
mov edi, dword [ebp - 0x60]
mov eax, esi
call fcn.004b7890
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp dword [ebp + 0x1c], 0x10
jb 0x51e651
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
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.005762ee
mov esp, ebp
pop ebp
ret 0x20