Function at 0x40e8e0
Capabilities:
Check if file exists
Copy file
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x476360
mov eax, dword fs:[0]
push eax
sub esp, 0x408
mov eax, dword [0x4a6c44]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
lea edi, [esi + 0x800]
mov dword [ebp - 4], 0
mov ecx, 0x47e88c
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40e947
test dl, dl
je 0x40e943
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40e947
add eax, 2
add ecx, 2
test dl, dl
jne 0x40e927
xor eax, eax
jmp 0x40e94c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40e963
mov ax, word [0x47e894]
mov word [esi], ax
mov al, byte [0x47e896]
mov byte [esi + 2], al
jmp 0x40e98e
cmp byte [esi], 0
jne 0x40e98e
lea eax, [ebp - 0x414]
push eax
push 0x200
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x200
push esi
lea eax, [ebp - 0x414]
mov ecx, esi
push eax
call fcn.0040ee50
mov dword [esi + 0x123c], 0xfa000
mov eax, 0x47e88c
nop dword [eax]
mov cl, byte [edi]
cmp cl, byte [eax]
jne 0x40e9c0
test cl, cl
je 0x40e9bc
mov cl, byte [edi + 1]
cmp cl, byte [eax + 1]
jne 0x40e9c0
add edi, 2
add eax, 2
test cl, cl
jne 0x40e9a0
xor eax, eax
jmp 0x40e9c5
sbb eax, eax
or eax, 1
lea edi, [esi + 0x200]
test eax, eax
jne 0x40ea4a
push str.RunServerLog
push esi
push str._s_s.txt
push edi
call fcn.00407cd0
push str.RunServerLog
push esi
lea eax, [esi + 0x400]
push str._s_s.bak
push eax
call fcn.00407cd0
push str.RunServerLog
push esi
lea eax, [esi + 0x600]
push str._s_s.bak.bak
push eax
call fcn.00407cd0
mov edx, 0x4a95c8
add esp, 0x30
mov ecx, edi
sub edx, edi
nop word [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x40ea20
push esi
lea eax, [esi + 0x124c]
push str._sServerMemoryLog.txt
push eax
call fcn.00407cd0
push esi
push str._sServerMemoryLog.bak
jmp 0x40eb15
cmp byte [edi], 0
jne 0x40ea93
push str.rsp1024h
push esi
push str._s_s.txt
push edi
call fcn.00407cd0
push str.rsp1024h
push esi
lea eax, [esi + 0x400]
push str._s_s.bak
push eax
call fcn.00407cd0
push str.rsp1024h
push esi
lea eax, [esi + 0x600]
push str._s_s.bak.bak
push eax
call fcn.00407cd0
add esp, 0x30
jmp 0x40eae1
push edi
push esi
lea eax, [esi + 0x400]
push str._s_s
push eax
call fcn.00407cd0
lea edx, [esi + 0x400]
add esp, 0x10
mov ecx, edx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 0x201], al
test al, al
jne 0x40eab1
push edi
push str._s.bak
push edx
call fcn.00407cd0
push edi
lea eax, [esi + 0x600]
push str._s.bak.bak
push eax
call fcn.00407cd0
add esp, 0x18
mov edx, 0x4a95c8
mov ecx, edi
sub edx, edi
nop word [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x40eaf0
push esi
lea eax, [esi + 0x124c]
push str._sClientMemoryLog.txt
push eax
call fcn.00407cd0
push esi
push str._sClientMemoryLog.bak
lea eax, [esi + 0x144c]
push eax
call fcn.00407cd0
add esp, 0x18
lea eax, [esi + 0x164c]
mov ecx, esi
push 0x200
push eax
push edi
call fcn.0040eec0
push 0x200
lea eax, [esi + 0x1a4c]
mov ecx, esi
push eax
lea eax, [esi + 0x400]
push eax
call fcn.0040eec0
push 0x200
lea eax, [esi + 0x1e4c]
mov ecx, esi
push eax
lea eax, [esi + 0x600]
push eax
call fcn.0040eec0
push 0x200
lea eax, [esi + 0x224c]
mov ecx, esi
push eax
lea eax, [esi + 0x124c]
push eax
call fcn.0040eec0
push 0x200
lea eax, [esi + 0x264c]
mov ecx, esi
push eax
lea eax, [esi + 0x144c]
push eax
call fcn.0040eec0
lea eax, [esi + 0x1a4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40ebc8
push 0
lea eax, [esi + 0x1e4c]
push eax
lea eax, [esi + 0x1a4c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [esi + 0x164c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40ebf0
push 0
lea eax, [esi + 0x1a4c]
push eax
lea eax, [esi + 0x164c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [esi + 0x164c]
push 0x47dd78
push eax
call fcn.0044fa5e
add esp, 8
mov dword [esi + 0x1204], eax
test eax, eax
jne 0x40ec88
mov dword [0x4a91b8], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470f20
add esp, 4
push eax
push esi
push edi
push str.failed_to_create_log_file__s_in_MyLog::GetWorkingDirectory_____d
push 0x4a91c0
call fcn.00407cd0
add esp, 0x14
xor al, al
jmp 0x40ec93
push eax
call fcn.0044f88c
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00444138
mov esp, ebp
pop ebp
ret