Function at 0x40c244
Capabilities:
Delete file
Receive data
Receive data on socket
Set file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push esi
push edi
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 1
xor edx, edx
mov dword [ebp - 0x14], edx
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov esi, 0x4c7a58
lea edi, [ebp - 0x120]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
push 0x80
push dword [ebp + 0xc]
call sub.KERNEL32.DLL_SetFileAttributesA
push dword [ebp + 0xc]
call sub.KERNEL32.DLL_DeleteFileA
push dword [ebp + 0xc]
lea eax, [ebp - 0x120]
push eax
call fcn.0049dac8
add esp, 8
push 0x5c
lea edx, [ebp - 0x120]
push edx
call fcn.0049dbfd
add esp, 8
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x40c2bf
mov eax, dword [ebp - 0x1c]
mov byte [eax], 0
lea edx, [ebp - 0x120]
push edx
call fcn.0049adac
pop ecx
push 0x4c7c2b
push dword [ebp + 0xc]
call fcn.0049fcb8
add esp, 8
mov dword [ebp - 4], eax
test eax, eax
jne 0x40c300
call sub.KERNEL32.DLL_GetLastError
push eax
push dword [ebp + 0xc]
push str.RecvFile__:_fopen__s__fail__error:__lu
call fcn.0049ad0c
add esp, 0xc
xor eax, eax
jmp 0x40c455
push 0x1388
push 0x4c7c55
push dword [ebp + 8]
call fcn.0040c6a0
add esp, 0xc
test eax, eax
je 0x40c33c
push dword [ebp - 4]
call fcn.0049f94c
pop ecx
call sub.KERNEL32.DLL_GetLastError
push eax
push str.RecvFile__:_tcp_status___fail__error:__lu
call fcn.0049ad0c
add esp, 8
xor eax, eax
jmp 0x40c455
push 0
push 4
lea edx, [ebp - 0x14]
push edx
push dword [ebp + 8]
call sub.WSOCK32.DLL_recv
test eax, eax
jge 0x40c373
push dword [ebp - 4]
call fcn.0049f94c
pop ecx
call sub.KERNEL32.DLL_GetLastError
push eax
push str.RecvFile__:_recv_filesize_fail__error:__lu
call fcn.0049ad0c
add esp, 8
xor eax, eax
jmp 0x40c455
push 0x401
call fcn.0049cfe8
pop ecx
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
cmp edx, ecx
jae 0x40c440
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
sub eax, edx
cmp eax, 0x400
jb 0x40c3b5
push 0
push 0x400
push dword [ebp - 8]
push dword [ebp + 8]
call sub.WSOCK32.DLL_recv
mov dword [ebp - 0xc], eax
jmp 0x40c3ce
push 0
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
sub ecx, eax
push ecx
push dword [ebp - 8]
push dword [ebp + 8]
call sub.WSOCK32.DLL_recv
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
test edx, edx
jge 0x40c3ef
xor ecx, ecx
mov dword [ebp - 0x10], ecx
call sub.KERNEL32.DLL_GetLastError
push eax
push str.RecvFile__:_recv_data_fail__error:__lu
call fcn.0049ad0c
add esp, 8
jmp 0x40c440
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x40c40b
call sub.KERNEL32.DLL_GetLastError
push eax
push str.RecvFile__:_recv_data_returned_0__error:__lu
call fcn.0049ad0c
add esp, 8
jmp 0x40c440
push dword [ebp - 4]
push dword [ebp - 0xc]
push 1
push dword [ebp - 8]
call fcn.004a016c
add esp, 0x10
mov edx, dword [ebp - 0xc]
add dword [ebp - 0x18], edx
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call fcn.0040bfb8
add esp, 8
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
cmp ecx, eax
jb 0x40c38f
push dword [ebp - 4]
call fcn.0049f94c
pop ecx
push dword [ebp - 8]
call fcn.0049ce20
pop ecx
mov eax, dword [ebp - 0x10]
pop edi
pop esi
mov esp, ebp
pop ebp
ret