Function at 0x440610
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Convert ip address from string
Create tcp socket
Download and write a file
Initialize winsock library
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x85ac
call fcn.0058fc10
mov eax, dword [0x69cffc]
xor eax, esp
mov dword [esp + 0x85a8], eax
push ebx
push esi
push edi
lea eax, [esp + 0x20]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x44065e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup_failed:__d_n
call fcn.00408440
add esp, 8
jmp 0x4407ed
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x44068a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Socket_creation_failed:__d_n
call fcn.00408440
add esp, 8
jmp 0x4407e7
push 4
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 1
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, 2
push 0x13a1
mov word [esp + 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0x14]
push eax
push str.192.168.1.251
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
push 0x10
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4406f7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Connection_failed:__d_n
jmp 0x4407d8
mov edx, dword [ebp + 0x1c]
lea ecx, [ebp + 8]
mov esi, dword [ebp + 8]
cmp edx, 0x10
cmovae ecx, esi
lea ebx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x440710
sub ecx, ebx
lea eax, [ebp + 8]
cmp edx, 0x10
cmovae eax, esi
push eax
push ecx
push str.192.168.1.251:5025
lea eax, [esp + 0x5bc]
push str.POST__api_secure_logManage_usbLog_r_nHost:__s_r_nContent_Type:_application_json__charsetutf_8_r_nContent_Length:__d_r_n_r_n_s
push eax
call fcn.00414ff0
lea ecx, [esp + 0x5c4]
add esp, 0x14
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x440748
push 0
sub ecx, edx
lea eax, [esp + 0x5b4]
push ecx
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x440776
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Send_failed:__d_n
jmp 0x4407d8
mov ebx, dword [sym.imp.WS2_32.dll_recv]
lea eax, [esp + 0x1b0]
push 0
push 0x400
push eax
push edi
call ebx
mov esi, eax
test esi, esi
jle 0x4407ca
push 1
call fcn.005f38bc
add esp, 4
push eax
push esi
lea eax, [esp + 0x1b8]
push 1
push eax
call fcn.005f2082
add esp, 0x10
lea eax, [esp + 0x1b0]
push 0
push 0x400
push eax
push edi
call ebx
mov esi, eax
test esi, esi
jg 0x440794
jns 0x4407e0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Receive_failed:__d_n
call fcn.00408440
add esp, 8
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x44081d
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x440813
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x440832
push edx
push ecx
call fcn.0058f106
add esp, 8
mov ecx, dword [esp + 0x85b4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0058f0d5
mov esp, ebp
pop ebp
ret
call fcn.005ef2cd
int3