Function at 0x41c740
Capabilities:
Act as tcp client
Check if file exists
Connect socket
Connect tcp socket
Create tcp socket
Delete file
Download and write a file
Initialize winsock library
Read .ini file
Read and send data from client to server
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Set socket configuration
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x536290
mov eax, dword fs:[0]
push eax
mov eax, 0x49dc
call fcn.004b0a90
mov eax, dword [0x58c758]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov word [ebp - 0x814], ax
push 0x7fe
push 0
lea ecx, [ebp - 0x812]
push ecx
call fcn.004b0ac0
add esp, 0xc
mov dword [ebp - 0x4708], 0x50
push 0x540e68
lea edx, [ebp - 0x2780]
push edx
call fcn.0041acc0
add esp, 8
mov dword [ebp - 4], 0
mov dword [ebp - 0x46fc], 0
movzx eax, byte [0x58f700]
test eax, eax
jne 0x41c828
mov ecx, 0x202
mov word [ebp - 0x48a0], cx
lea edx, [ebp - 0x489c]
push edx
movzx eax, word [ebp - 0x48a0]
push eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x48a4], eax
cmp dword [ebp - 0x48a4], 0
je 0x41c821
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x48a8], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x48a8]
jmp 0x41cea0
mov byte [0x58f700], 1
lea ecx, [ebp - 0x2780]
call fcn.0043e290
push eax
push 0
push str.port
push str.proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x4708], eax
lea ecx, [ebp - 0x2780]
call fcn.0043e290
push eax
push 0x3ff
lea ecx, [ebp - 0x814]
push ecx
push 0x540868
push 0x540e40
push str.proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp dword [ebp - 0x4708], 0
je 0x41c895
lea edx, [ebp - 0x814]
push edx
call fcn.004b0eb7
add esp, 4
test eax, eax
jne 0x41c8bc
mov dword [ebp - 0x48ac], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x48ac]
jmp 0x41cea0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x2778], eax
cmp dword [ebp - 0x2778], 0xffffffff
jne 0x41c900
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x48b0], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x48b0]
jmp 0x41cea0
mov eax, 2
mov word [ebp - 0x46f0], ax
lea ecx, [ebp - 0x814]
push ecx
lea ecx, [ebp - 0x4934]
call fcn.004087b0
mov dword [ebp - 0x49e0], eax
mov ecx, dword [ebp - 0x49e0]
call fcn.0043e290
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x46ec], eax
lea ecx, [ebp - 0x4934]
call fcn.004087e0
movzx edx, word [ebp - 0x4708]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x46ee], ax
mov dword [ebp - 0x277c], 0x2710
push 4
lea eax, [ebp - 0x277c]
push eax
push 0x1005
push 0xffff
mov ecx, dword [ebp - 0x2778]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x41c9ae
push 4
lea edx, [ebp - 0x277c]
push edx
push 0x1006
push 0xffff
mov eax, dword [ebp - 0x2778]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x41c9f0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x46fc], eax
mov ecx, dword [ebp - 0x2778]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp - 0x46fc]
mov dword [ebp - 0x4938], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x4938]
jmp 0x41cea0
push 0x10
lea eax, [ebp - 0x46f0]
push eax
mov ecx, dword [ebp - 0x2778]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x41ca4d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x46fc], eax
mov edx, dword [ebp - 0x2778]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x46fc]
mov dword [ebp - 0x493c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x493c]
jmp 0x41cea0
lea ecx, [ebp - 0x4700]
call fcn.00403840
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
push str.GET__s_HTTP_1.1_r_n_r_n
lea eax, [ebp - 0x4700]
push eax
call fcn.00409170
add esp, 0xc
lea ecx, [ebp - 0x4700]
call fcn.0043e290
push eax
lea ecx, [ebp - 0x49c0]
call fcn.004087b0
mov dword [ebp - 0x49e4], eax
mov ecx, dword [ebp - 0x49e4]
mov dword [ebp - 0x49e8], ecx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x49e8]
call fcn.0043e290
push eax
lea ecx, [ebp - 0x46e0]
call fcn.00408660
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x49c0]
call fcn.004087e0
push 0
lea ecx, [ebp - 0x46e0]
call fcn.004086e0
push eax
lea ecx, [ebp - 0x46e0]
call fcn.0043e290
push eax
mov edx, dword [ebp - 0x2778]
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x41cb55
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x46fc], eax
mov eax, dword [ebp - 0x2778]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x46fc]
mov dword [ebp - 0x49c4], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x46e0]
call fcn.00401eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4700]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x49c4]
jmp 0x41cea0
mov byte [ebp - 0x2774], 0
push 0x1f57
push 0
lea edx, [ebp - 0x2773]
push edx
call fcn.004b0ac0
add esp, 0xc
push 0
push 0x1f58
lea eax, [ebp - 0x2774]
push eax
mov ecx, dword [ebp - 0x2778]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x41cbf2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x46fc], eax
mov edx, dword [ebp - 0x2778]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x46fc]
mov dword [ebp - 0x49c8], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x46e0]
call fcn.00401eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4700]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x49c8]
jmp 0x41cea0
mov ecx, dword [ebp - 0x2778]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
lea edx, [ebp - 0x2774]
push edx
call fcn.004b1d80
add esp, 4
test eax, eax
je 0x41cc2a
push 0x542000
lea eax, [ebp - 0x2774]
push eax
call fcn.00408640
add esp, 8
test eax, eax
jne 0x41cc6f
mov dword [ebp - 0x49cc], 1
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x46e0]
call fcn.00401eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4700]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x49cc]
jmp 0x41cea0
mov dword [ebp - 0x4704], 0
push str._r_n_r_n
lea ecx, [ebp - 0x2774]
push ecx
call fcn.00408640
add esp, 8
mov dword [ebp - 0x4704], eax
cmp dword [ebp - 0x4704], 0
jne 0x41cce1
mov dword [ebp - 0x49d0], 2
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x46e0]
call fcn.00401eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4700]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x49d0]
jmp 0x41cea0
mov edx, dword [ebp - 0x4704]
add edx, 4
mov dword [ebp - 0x46f4], edx
mov byte [ebp - 0x46dc], 0
push 0x1f57
push 0
lea eax, [ebp - 0x46db]
push eax
call fcn.004b0ac0
add esp, 0xc
mov ecx, dword [ebp - 0x46f4]
push ecx
lea edx, [ebp - 0x46dc]
push edx
call fcn.004b1e10
add esp, 8
mov ecx, dword [ebp + 8]
call fcn.0043e290
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41cd45
mov ecx, dword [ebp + 8]
call fcn.0043e290
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov ecx, dword [ebp + 8]
call fcn.0043e290
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2784], eax
cmp dword [ebp - 0x2784], 0xffffffff
jne 0x41cdba
mov dword [ebp - 0x49d4], 3
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x46e0]
call fcn.00401eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4700]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x49d4]
jmp 0x41cea0
lea eax, [ebp - 0x46dc]
push eax
call fcn.004b1d80
add esp, 4
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x46f8], 0
push 0
lea ecx, [ebp - 0x46f8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
lea eax, [ebp - 0x46dc]
push eax
mov ecx, dword [ebp - 0x2784]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x818], eax
mov edx, dword [ebp - 0x2784]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x818], 0
je 0x41ce1e
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x46f8]
je 0x41ce60
mov dword [ebp - 0x49d8], 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x46e0]
call fcn.00401eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4700]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x49d8]
jmp 0x41cea0
mov dword [ebp - 0x49dc], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x46e0]
call fcn.00401eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4700]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2780]
call fcn.00401eb0
mov eax, dword [ebp - 0x49dc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004b0a79
mov esp, ebp
pop ebp
ret