Function at 0x40a360
Capabilities:
Copy file
Delete file
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418dc0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x664
push ebx
push esi
push edi
lea eax, [ebp - 0x120]
mov dword [ebp - 0x10], esp
push 0x104
push eax
mov ebx, ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x120]
push 0x5c
push ecx
call fcn.00401450
add esp, 8
test eax, eax
je 0x40aa60
mov ecx, dword [ebx + 0xa8]
test ecx, ecx
jne 0x40a423
mov ecx, dword [ebx + 0x2c0]
lea edx, [eax + 1]
test ecx, ecx
je 0x40a3f1
mov edi, str.uninstal.log
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40a4e9
mov edi, str.install.log
or ecx, 0xffffffff
xor eax, eax
push 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0040bff0
add esp, 8
jmp 0x40a4e9
lea edx, [eax + 1]
mov edi, str.client.log
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x2e
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x42c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x120]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x42c]
push ecx
call fcn.00401450
add esp, 8
test eax, eax
je 0x40aa60
lea edx, [eax + 1]
mov edi, 0x41da44
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x120]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x42c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40a4e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x42c]
lea ecx, [ebp - 0x120]
push eax
push ecx
push 0xe
push ebx
call fcn.0040bff0
add esp, 0x14
mov eax, dword [ebx + 0xa8]
test eax, eax
jne 0x40a942
mov eax, dword [ebx + 0x2c0]
test eax, eax
jne 0x40a942
mov edx, dword [ebx]
push 0
push 0
push str.Copy_install_log
push 0xcf
push 1
mov ecx, ebx
call dword [edx + 4]
mov esi, dword [ebp + 8]
test esi, esi
jne 0x40a53a
push 0xbd5
push str.E:_nsmsrc_nsm11301130ctl32pcirisvr.cpp
push str.szPath
call fcn.00403830
add esp, 0xc
push 0
push str.defaults.inc
push esi
call fcn.0040eea0
add esp, 0xc
test eax, eax
je 0x40a662
mov eax, dword [ebx]
push 0
push 0
push str.16bit_install
push 0xcf
push 1
mov ecx, ebx
call dword [eax + 4]
lea ecx, [ebp - 0x224]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edx, [ebp - 0x224]
push 0x5c
push edx
call fcn.00401450
add esp, 8
test eax, eax
je 0x40aa60
lea edx, [eax + 1]
mov edi, str.nsmsetup.log
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x224]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx]
push 0xcf
push 1
mov ecx, ebx
call dword [edx + 4]
mov edx, dword [ebx]
push 0
lea eax, [ebp - 0x120]
push 0
push eax
push 0xcf
push 1
mov ecx, ebx
call dword [edx + 4]
lea ecx, [ebp - 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [ebp - 0x120]
lea eax, [ebp - 0x224]
push edx
push eax
push 0xd
push ebx
call fcn.0040bff0
add esp, 0x10
lea ecx, [ebp - 0x120]
lea edx, [ebp - 0x224]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40a9ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x120]
lea ecx, [ebp - 0x224]
push eax
push ecx
push 0xe
push ebx
call fcn.0040bff0
add esp, 0x14
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea edx, [ebx + 0x200]
push 0x41d9f4
push edx
call fcn.004118a0
add esp, 8
test eax, eax
je 0x40aa60
add eax, 3
push eax
push esi
lea eax, [ebp - 0x530]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x530]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test eax, eax
mov dword [ebp + 8], eax
je 0x40aa60
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea edx, [edi + 1]
push edx
call fcn.0040e3e0
mov esi, eax
add esp, 4
test esi, esi
mov dword [ebp - 0x14], esi
jne 0x40a6ff
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x1c]
push 0
push ecx
push edi
mov edi, dword [ebp + 8]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a738
push esi
call fcn.0040f9ad
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push str.MAINDIR
push esi
mov byte [ebp - 0x328], 0
mov dword [ebp - 4], 0
call fcn.004118a0
add esp, 8
test eax, eax
je 0x40a794
push 0x3d
push eax
call fcn.00401310
add esp, 8
test eax, eax
je 0x40a794
lea ecx, [eax + 1]
mov al, byte [eax + 1]
test al, al
je 0x40a794
xor edx, edx
mov al, byte [ecx]
test al, al
je 0x40a78c
cmp al, 0xa
je 0x40a78c
cmp al, 0xd
je 0x40a78c
mov byte [ebp + edx - 0x328], al
inc edx
inc ecx
jmp 0x40a773
mov byte [ebp + edx - 0x328], 0
mov al, byte [ebp - 0x328]
test al, al
jne 0x40a833
lea edx, [ebp - 0x328]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x328]
push 0x5c
push eax
call fcn.00401310
add esp, 8
test eax, eax
jne 0x40a7d0
push eax
push eax
call fcn.00411977
lea edx, [eax + 1]
mov edi, str.Program_FilesNetSupport_Manager
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
push str.install.log
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [ebp - 0x18], edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x328]
push ecx
call fcn.0040eea0
add esp, 0xc
test eax, eax
jne 0x40a833
mov edi, str.Program_FilesNetSupport
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [ebp - 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0
lea edx, [ebp - 0x328]
push str.install.log
push edx
mov dword [ebp - 4], 0xffffffff
call fcn.0040eea0
add esp, 0xc
test eax, eax
je 0x40a90b
lea eax, [ebp - 0x328]
push str.install.log
push eax
lea ecx, [ebp - 0x224]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [ebx]
add esp, 0x10
lea eax, [ebp - 0x224]
mov ecx, ebx
push 0
push 0
push eax
push 0xcf
push 1
call dword [edx + 4]
mov edx, dword [ebx]
push 0
lea eax, [ebp - 0x120]
push 0
push eax
push 0xcf
push 1
mov ecx, ebx
call dword [edx + 4]
lea ecx, [ebp - 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [ebp - 0x120]
lea eax, [ebp - 0x224]
push edx
push eax
push 0xf
push ebx
call fcn.0040bff0
add esp, 0x10
lea ecx, [ebp - 0x120]
lea edx, [ebp - 0x224]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40a90b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x120]
lea ecx, [ebp - 0x224]
push eax
push ecx
push 0xe
push ebx
call fcn.0040bff0
add esp, 0x14
mov edx, dword [ebp - 0x14]
push edx
call fcn.0040f9ad
mov eax, dword [ebp + 8]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40a9ee
lea ecx, [ebp - 0x224]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x224]
push 0x2e
push edx
call fcn.00401450
add esp, 8
test eax, eax
je 0x40aa60
lea edx, [eax + 1]
mov edi, 0x41d9a8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edx, [ebp - 0x120]
push 0
lea eax, [ebp - 0x224]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40a9ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x120]
push eax
lea edx, [ebp - 0x224]
push ecx
push edx
push 0xe
push ebx
call fcn.0040bff0
add esp, 0x14
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
push 0x1c
mov ecx, ebx
call fcn.0040aab0
lea eax, [ebp - 0x670]
lea ecx, [ebp - 0x120]
push eax
push ecx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40aa49
cmp edi, 0x3c
jge 0x40aa73
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x670]
lea eax, [ebp - 0x120]
push edx
push eax
inc edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40aa16
mov eax, dword [ebx]
push 0
push 0
push str.Log_copied__continue
push 0xcf
push 1
mov ecx, ebx
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp esi, 0xffffffff
je 0x40aa49
mov edx, dword [ebx]
push 0
push 0
push str.Log_not_copied
push 0xcf
push 1
mov ecx, ebx
call dword [edx + 4]
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4