Function at 0x10004a00
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Download and write a file
Initialize winsock library
Receive and write data from server to client
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration
Write file on windows

Disassembly:
mov eax, 0x31ccc
call fcn.10015420
mov eax, dword [0x10035b10]
xor eax, esp
mov dword [esp + 0x31cc4], eax
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x48]
push eax
push 0x202
mov edi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10004a39
xor eax, eax
jmp 0x10004e4d
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
movzx edx, byte [0x1002fa4c]
mov ecx, dword [str.5l98]
mov ebx, eax
mov ax, word [0x1002fa50]
mov byte [esp + 0x1dc], dl
mov dword [esp + 0x1d8], ecx
mov cl, byte [0x1002fa52]
mov edx, 0x77
mov word [esp + 0x14], dx
movzx edx, byte [0x1002fa5a]
mov word [esp + 0x24], ax
mov byte [esp + 0x26], cl
mov cx, word [0x1002fa58]
mov eax, 0x2e
mov word [esp + 0x18], ax
mov eax, 0x77
push 0x50
mov byte [esp + 0x22], dl
mov word [esp + 0x20], cx
lea edx, [esp + 0x1e4]
mov ecx, eax
push 0
push edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 0x38
mov word [esp + 0x2c], ax
mov word [esp + 0x34], cx
call fcn.10012780
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x1f0]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x20c]
push str._s_s_s_s_s_s_s_s
push edx
call fcn.10011672
add esp, 0x34
lea eax, [esp + 0x1e0]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
je 0x10004a32
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
xor eax, eax
mov ecx, 2
mov dword [esp + 0x38], eax
push 0x50
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov word [esp + 0x3c], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
mov edx, dword [esi + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push 4
lea edx, [esp + 0x38]
push edx
push 1
push 0xffff
push ebx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x48], 0xa
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x10
lea eax, [esp + 0x3c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
push 0x3ff
lea ecx, [esp + 0x235]
push 0
push ecx
mov byte [esp + 0x23c], 0
call fcn.10012780
lea eax, [esp + 0x23c]
add esp, 0xc
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10004bc0
mov edx, dword [str.GET]
mov cl, byte [0x1002f98c]
mov dword [eax], edx
mov byte [eax + 4], cl
mov eax, edi
mov ecx, edi
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10004be0
lea edi, [esp + 0x230]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10004bf3
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x230]
rep movsb byte es:[edi], byte [esi]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10004c11
mov edx, dword [str._HTTP_1.1_r_n]
mov ecx, dword [0x1002f994]
mov dword [eax], edx
mov edx, dword [0x1002f998]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
lea eax, [esp + 0x230]
dec eax
jmp 0x10004c40
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10004c40
mov ecx, dword [str.HOST:]
mov dx, word [0x1002f9a0]
mov dword [eax], ecx
mov cl, byte [0x1002f9a2]
mov word [eax + 4], dx
mov byte [eax + 6], cl
lea eax, [esp + 0x230]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10004c70
mov edx, dword [0x1002fa70]
mov ecx, dword [0x1002fa74]
mov dword [eax], edx
mov edx, dword [0x1002fa78]
mov dword [eax + 4], ecx
mov ecx, dword [0x1002fa7c]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
lea eax, [esp + 0x230]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10004ca3
mov dx, word [0x1002f5fc]
mov cl, byte [0x1002f5fe]
mov word [eax], dx
mov byte [eax + 2], cl
lea eax, [esp + 0x230]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10004cc6
mov edx, dword [str.Connection:_Close_r_n_r_n]
mov ecx, dword [0x1002f9a8]
mov dword [eax], edx
mov edx, dword [0x1002f9ac]
mov dword [eax + 4], ecx
mov ecx, dword [0x1002f9b0]
mov dword [eax + 8], edx
mov edx, dword [0x1002f9b4]
mov dword [eax + 0xc], ecx
mov cx, word [0x1002f9b8]
mov dword [eax + 0x10], edx
mov word [eax + 0x14], cx
lea eax, [esp + 0x230]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004d10
push 0
sub eax, edx
push eax
lea edx, [esp + 0x238]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_send]
push 0x1002f9bc
push str.MFC71CHT.dll
call fcn.10011568
mov edi, eax
add esp, 8
test edi, edi
je 0x10004a32
push 0x3169f
lea eax, [esp + 0x635]
push 0
push eax
mov byte [esp + 0x63c], 0
call fcn.10012780
mov ebx, dword [sym.imp.WS2_32.dll_recv]
add esp, 0xc
xor ebp, ebp
mov edi, edi
mov edx, dword [esp + 0x2c]
push 0
push 0x316a0
lea ecx, [esp + 0x638]
push ecx
push edx
call ebx
mov esi, eax
test esi, esi
jle 0x10004dfb
test ebp, ebp
jne 0x10004dc1
xor eax, eax
test esi, esi
jle 0x10004daf
cmp byte [esp + eax + 0x630], 0x4d
jne 0x10004daa
cmp byte [esp + eax + 0x631], 0x5a
je 0x10004daf
inc eax
cmp eax, esi
jl 0x10004d96
push edi
mov ecx, esi
sub ecx, eax
push ecx
push 1
lea edx, [esp + eax + 0x63c]
push edx
jmp 0x10004dcd
push edi
push esi
push 1
lea eax, [esp + 0x63c]
push eax
call fcn.10011e0b
add esp, 0x10
push 0x316a0
lea ecx, [esp + 0x634]
push 0
push ecx
add ebp, esi
call fcn.10012780
push esi
push str.Bytes_received:__dn
call fcn.10011927
add esp, 0x14
jmp 0x10004e11
je 0x10004e1b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.recv_failed:__dn
call fcn.10011927
add esp, 8
test esi, esi
jg 0x10004d70
jmp 0x10004e28
push str.Connection_closedn
call fcn.10011927
add esp, 4
push edi
call fcn.100115f6
mov edx, dword [esp + 0x30]
add esp, 4
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
cmp ebp, 0x9c40
setge al
mov ecx, dword [esp + 0x31cd4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1001116a
add esp, 0x31ccc
ret