Function at 0x4118c0
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
mov eax, 0x1050
call fcn.0042f240
mov eax, dword [0x46b600]
push ebx
push esi
push 0
push 0x8000080
push 2
push 0
push 1
mov dword [esp + 0x1068], eax
mov eax, dword [esp + 0x1078]
push 0x40000000
push eax
mov ebx, ecx
mov byte [esp + 0x27], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x10], esi
je 0x411b26
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
test eax, eax
mov dword [esp + 0xc], eax
je 0x411b1f
mov esi, dword [esp + 0x105c]
push 0x21
push eax
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x411b10
mov eax, dword [esp + 0x1060]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411944
mov ecx, dword [esp + 0xc]
push ebp
sub eax, edx
mov edx, dword [ebx + 0x3c]
push edi
lea ebp, [eax + 0xa]
mov eax, dword [esp + 0x1070]
push eax
xor edi, edi
mov dword [esp + 0x20], ecx
push edi
lea ecx, [esp + 0x24]
push ecx
push 2
mov dword [esp + 0x30], edx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x411b0e
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x28]
push edx
push eax
push esi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x411b0e
mov al, byte [esp + 0x28]
test al, 1
je 0x411ad0
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x411b0e
test edi, edi
jne 0x411a1a
push edi
push ebp
lea ecx, [esp + 0x5c]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebp
jne 0x411b0e
cmp word [esp + 0x58], 0x1011
mov edi, ebp
jne 0x411b0e
mov edx, dword [esp + 0x5a]
cmp edx, dword [ebx + 4]
jne 0x411b0e
mov eax, dword [esp + 0x1068]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4119f3
sub eax, edx
push eax
mov eax, dword [esp + 0x106c]
push eax
lea ecx, [esp + 0x66]
push ecx
call fcn.0043d7cb
add esp, 0xc
test eax, eax
jne 0x411b0e
push 0
push 0x1000
lea edx, [esp + 0x62]
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
je 0x411ab3
test esi, esi
je 0x411af5
add edi, esi
push edi
push str._d_received_n
call fcn.00416520
mov edx, dword [esp + 0x20]
add esp, 8
push 0
lea eax, [esp + 0x28]
push eax
push esi
lea ecx, [esp + 0x66]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411b0e
mov eax, dword [ebx + 0x3c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x411a92
mov ecx, dword [ebx + 0x18]
mov eax, dword [esp + 0x1074]
push ecx
mov edx, edi
sub edx, ebp
push edx
push eax
push 0x13
call dword [ebx + 0x14]
mov al, byte [esp + 0x28]
test al, 0x20
je 0x411ac9
push str.FD_CLOSE_and_FD_READ_set_at_the_same_time_n
call fcn.00416520
mov esi, dword [esp + 0x1068]
add esp, 4
jmp 0x4119b3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x411b0e
mov esi, dword [esp + 0x1064]
jmp 0x411ad4
mov esi, dword [esp + 0x1064]
test al, 0x20
jne 0x411afc
mov ecx, dword [esp + 0x1070]
push ecx
push 0
lea edx, [esp + 0x24]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x411981
jmp 0x411b0e
push str.CAutoFetch::DownloadFromSocket_socket_gracefully_closed_n
jmp 0x411b01
push str.CAutoFetch::DownloadFromSocket_FD_CLOSE_notified_n
call fcn.00416520
add esp, 4
mov byte [esp + 0x13], 1
pop edi
pop ebp
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1054]
mov al, byte [esp + 0xb]
pop esi
pop ebx
call fcn.0042f2ae
add esp, 0x1050
ret 0x14