Function at 0x401510
Capabilities:
Copy file

Disassembly:
sub esp, 0x218
push esi
push 0x40a700
push 0x40a780
push str.Using_PortMonDLL__s_for_port__s_r_n
call fcn.004010a0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 0xc
push 0x40a4f0
lea eax, [esp + 0x11c]
push eax
call esi
mov ecx, dword [0x40a6fc]
push 0x40a780
lea edx, [esp + ecx + 0x11c]
push edx
call esi
lea eax, [esp + 0x118]
push eax
push 0x40a4f0
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeA]
lea ecx, [esp + 4]
push ecx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0xc], 0
call fcn.004014b0
and eax, 0x80000000
add esp, 8
cmp eax, 0x80000000
jne 0x40159e
mov eax, dword [0x40a888]
pop esi
add esp, 0x218
ret
push 0x40a780
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [eax + 0x40a77f]
cmp eax, 0x40a780
jbe 0x4015cd
cmp byte [eax], 0x5c
je 0x4015c5
dec eax
cmp eax, 0x40a780
ja 0x4015b6
jmp 0x4015cd
cmp eax, 0x40a780
jbe 0x4015cd
inc eax
push edi
push eax
mov eax, dword [esp + 0xc]
lea ecx, [esp + eax + 0x1c]
push ecx
call esi
push 0
lea edx, [esp + 0x1c]
push edx
push 0x40a4f0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edi, eax
test edi, edi
mov eax, 0x40756c
jne 0x4015fc
mov eax, str.Failed
push ebx
push ebp
push eax
lea eax, [esp + 0x24]
push eax
push 0x40a4f0
push str.Copying_PortMonDLL:_s____s____s_r_n
call fcn.004010a0
lea ecx, [esp + 0x30]
push ecx
push str.Checking_File:__s_r_n
call fcn.004010a0
add esp, 0x18
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call ebp
push esi
push str.File_HANDLE:__.8lx_r_n
mov ebx, eax
call fcn.004010a0
add esp, 8
cmp esi, 0xffffffff
je 0x4017c0
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push str.File_size:__d_r_n
call fcn.004010a0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x4016e6
push 0x40a700
call fcn.00401250
mov ecx, dword [0x40a888]
mov edx, ecx
and edx, 0x80000000
add esp, 4
cmp edx, 0x80000000
jne 0x4016bb
pop ebp
pop ebx
pop edi
mov eax, ecx
pop esi
add esp, 0x218
ret
test eax, eax
jne 0x40174c
push ebx
call section..text
push eax
push str.Error_in_copying_PortMonDll:__s._But_it_exist_in_system._r_n
call fcn.004010a0
mov eax, dword [0x40a88c]
add esp, 0xc
or eax, 0x10000002
mov dword [0x40a88c], eax
mov eax, dword [0x40a034]
test eax, eax
mov dword [esp + 0x14], 0x40a700
mov dword [esp + 0x18], str.Windows_NT_x86
jne 0x401707
mov dword [esp + 0x18], str.Windows_4.0
lea ecx, [esp + 0x14]
push ecx
push 2
lea eax, [esp + 0x28]
push 0
mov dword [esp + 0x28], eax
call sub.WINSPOOL.DRV_AddMonitorA
mov esi, eax
call ebp
mov edi, eax
cmp edi, 0xbbe
jne 0x401759
push 0x40a700
push str.PortMonitor_for_port___s____Already_installed_r_n
call fcn.004010a0
mov eax, dword [0x40a88c]
add esp, 8
or eax, 0x10000400
mov dword [0x40a88c], eax
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x218
ret
test esi, esi
mov eax, 0x40756c
jne 0x401767
mov eax, str.Failed
push eax
push 0x40a700
push str.Adding_PortMonitor_for_port___s_____s_r_n
call fcn.004010a0
add esp, 0xc
test esi, esi
jne 0x40174c
push edi
call section..text
push eax
push str.AddPortMonitor_Failed_error___s_r_n
call fcn.004010a0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
push str.AddPortMonitor_parameters:_r_n__mi.pName_s_r_n__mi.pEnvironment_s_r_n__mi.pDLLName_s_r_n
call fcn.004010a0
add esp, 0x1c
pop ebp
pop ebx
mov eax, 4
pop edi
mov dword [0x40a888], eax
pop esi
add esp, 0x218
ret
push ebx
call section..text
push eax
push str.Error_in_copying_PortMonDll:__s._And_it_not_exist_in_system._r_n
call fcn.004010a0
add esp, 0xc
pop ebp
pop ebx
mov eax, 0x10
pop edi
mov dword [0x40a888], eax
pop esi
add esp, 0x218
ret