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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4762f0
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, 0x47e854
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40e8d7
test dl, dl
je 0x40e8d3
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40e8d7
add eax, 2
add ecx, 2
test dl, dl
jne 0x40e8b7
xor eax, eax
jmp 0x40e8dc
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40e8f3
mov ax, word [0x47e85c]
mov word [esi], ax
mov al, byte [0x47e85e]
mov byte [esi + 2], al
jmp 0x40e91e
cmp byte [esi], 0
jne 0x40e91e
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.0040ede0
mov dword [esi + 0x123c], 0xfa000
mov eax, 0x47e854
nop dword [eax]
mov cl, byte [edi]
cmp cl, byte [eax]
jne 0x40e950
test cl, cl
je 0x40e94c
mov cl, byte [edi + 1]
cmp cl, byte [eax + 1]
jne 0x40e950
add edi, 2
add eax, 2
test cl, cl
jne 0x40e930
xor eax, eax
jmp 0x40e955
sbb eax, eax
or eax, 1
lea edi, [esi + 0x200]
test eax, eax
jne 0x40e9da
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 0x40e9b0
push esi
lea eax, [esi + 0x124c]
push str._sServerMemoryLog.txt
push eax
call fcn.00407cd0
push esi
push str._sServerMemoryLog.bak
jmp 0x40eaa5
cmp byte [edi], 0
jne 0x40ea23
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 0x40ea71
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 0x40ea41
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 0x40ea80
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.0040ee50
push 0x200
lea eax, [esi + 0x1a4c]
mov ecx, esi
push eax
lea eax, [esi + 0x400]
push eax
call fcn.0040ee50
push 0x200
lea eax, [esi + 0x1e4c]
mov ecx, esi
push eax
lea eax, [esi + 0x600]
push eax
call fcn.0040ee50
push 0x200
lea eax, [esi + 0x224c]
mov ecx, esi
push eax
lea eax, [esi + 0x124c]
push eax
call fcn.0040ee50
push 0x200
lea eax, [esi + 0x264c]
mov ecx, esi
push eax
lea eax, [esi + 0x144c]
push eax
call fcn.0040ee50
lea eax, [esi + 0x1a4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40eb58
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 0x40eb80
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 0x47dd40
push eax
call fcn.0044f9fe
add esp, 8
mov dword [esi + 0x1204], eax
test eax, eax
jne 0x40ec18
mov dword [0x4a91b8], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.00470ed0
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 0x40ec23
push eax
call fcn.0044f82c
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.004440d2
mov esp, ebp
pop ebp
ret