Function at 0x4149c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create thread
Create udp socket
Download and write a file
Get socket status
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x23f8
call fcn.004169f0
mov eax, dword [0x42f140]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
mov eax, dword [ebp + 0x14]
mov dword [eax], 0xffffffff
cmp dword [ebp + 0x18], 1
jne 0x4149f1
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
push str.http:__
mov edx, dword [ebp + 8]
push edx
call fcn.00415460
add esp, 8
mov dword [ebp - 0x2138], eax
cmp dword [ebp - 0x2138], 0
jne 0x414a19
or eax, 0xffffffff
jmp 0x415156
mov eax, dword [ebp - 0x2138]
add eax, 7
mov dword [ebp - 0x2138], eax
push 0x427bc0
mov ecx, dword [ebp - 0x2138]
add ecx, 7
push ecx
call fcn.00415460
add esp, 8
mov dword [ebp - 0x214c], eax
cmp dword [ebp - 0x214c], 0
je 0x414a87
mov edx, dword [ebp - 0x214c]
sub edx, dword [ebp - 0x2138]
push edx
mov eax, dword [ebp - 0x2138]
push eax
lea ecx, [ebp - 0x21b8]
push ecx
call fcn.00416750
add esp, 0xc
mov edx, dword [ebp - 0x214c]
sub edx, dword [ebp - 0x2138]
mov byte [ebp + edx - 0x21b8], 0
jmp 0x414aa0
mov eax, dword [ebp - 0x2138]
add eax, 7
push eax
lea ecx, [ebp - 0x21b8]
push ecx
call fcn.00415da0
add esp, 8
push 0x427bc4
lea edx, [ebp - 0x21b8]
push edx
call fcn.00415460
add esp, 8
mov dword [ebp - 0x2138], eax
cmp dword [ebp - 0x2138], 0
je 0x414ae6
mov eax, dword [ebp - 0x2138]
mov byte [eax], 0
mov ecx, dword [ebp - 0x2138]
add ecx, 1
push ecx
call fcn.004166be
add esp, 4
mov dword [ebp - 0x21bc], eax
jmp 0x414af0
mov dword [ebp - 0x21bc], 0x50
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x2128], eax
cmp dword [ebp - 0x2128], 0xffffffff
jne 0x414b13
or eax, 0xffffffff
jmp 0x415156
lea edx, [ebp - 0x22d4]
push edx
push 0
lea eax, [ebp - 0x21b8]
push eax
push 0x4152a0
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [ebp - 0x22d0], eax
push 0x3e8
mov ecx, dword [ebp - 0x22d0]
push ecx
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
cmp eax, 0x102
jne 0x414b59
or eax, 0xffffffff
jmp 0x415156
push 0x10
push 0
lea edx, [ebp - 0x2148]
push edx
call fcn.00416a50
add esp, 0xc
mov eax, 2
mov word [ebp - 0x2148], ax
lea ecx, [ebp - 0x21b8]
push ecx
call fcn.00415170
add esp, 4
mov dword [ebp - 0x2144], eax
movzx edx, word [ebp - 0x21bc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2146], ax
mov dword [ebp - 4], 1
lea eax, [ebp - 4]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 0x22c8], 0
mov dword [ebp - 0x22dc], 0
jmp 0x414be4
mov edx, dword [ebp - 0x22dc]
add edx, 1
mov dword [ebp - 0x22dc], edx
mov eax, dword [ebp - 0x22dc]
cmp eax, dword [ebp - 0x22c8]
jae 0x414c0b
mov ecx, dword [ebp - 0x22dc]
mov edx, dword [ebp + ecx*4 - 0x22c4]
cmp edx, dword [ebp - 0x2128]
jne 0x414c09
jmp 0x414c0b
jmp 0x414bd5
mov eax, dword [ebp - 0x22dc]
cmp eax, dword [ebp - 0x22c8]
jne 0x414c44
cmp dword [ebp - 0x22c8], 0x40
jae 0x414c44
mov ecx, dword [ebp - 0x22dc]
mov edx, dword [ebp - 0x2128]
mov dword [ebp + ecx*4 - 0x22c4], edx
mov eax, dword [ebp - 0x22c8]
add eax, 1
mov dword [ebp - 0x22c8], eax
xor ecx, ecx
jne 0x414bc9
push 0x10
lea edx, [ebp - 0x2148]
push edx
mov eax, dword [ebp - 0x2128]
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x2134], 0
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x2130], ecx
mov ecx, 0x41
lea esi, [ebp - 0x22c8]
lea edi, [ebp - 0x2120]
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x2134]
push edx
push 0
lea eax, [ebp - 0x2120]
push eax
push 0
push 1
call dword [sym.imp.WS2_32.dll_select]
lea ecx, [ebp - 0x2120]
push ecx
mov edx, dword [ebp - 0x2128]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x414cca
mov eax, dword [ebp - 0x2128]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x415156
lea ecx, [ebp - 0x21b8]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.GET__s_HTTP_1.1_r_nHost:__s_r_n_r_n
lea eax, [ebp - 0x2010]
push eax
call fcn.00416205
add esp, 0x10
lea ecx, [ebp - 0x2010]
push ecx
call fcn.00415920
add esp, 4
mov dword [ebp - 0x2018], eax
push 0
mov edx, dword [ebp - 0x2018]
push edx
lea eax, [ebp - 0x2010]
push eax
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x2014], eax
mov edx, dword [ebp - 0x2014]
cmp edx, dword [ebp - 0x2018]
je 0x414d44
mov eax, dword [ebp - 0x2128]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x415156
mov dword [ebp - 0x212c], 0
mov byte [ebp - 0x22c9], 0
cmp dword [ebp + 0x18], 0
jne 0x414d90
push 0x427be8
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0041932c
add esp, 8
mov dword [ebp - 0x2124], eax
cmp dword [ebp - 0x2124], 0
jne 0x414d90
mov edx, dword [ebp - 0x2128]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x415156
mov dword [ebp - 0x23f0], 0
mov dword [ebp - 0x22e4], 0
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x22e0], eax
mov dword [ebp - 0x23f4], 0
jmp 0x414dc8
mov ecx, dword [ebp - 0x23f4]
add ecx, 1
mov dword [ebp - 0x23f4], ecx
mov edx, dword [ebp - 0x23f4]
cmp edx, dword [ebp - 0x23f0]
jae 0x414def
mov eax, dword [ebp - 0x23f4]
mov ecx, dword [ebp + eax*4 - 0x23ec]
cmp ecx, dword [ebp - 0x2128]
jne 0x414ded
jmp 0x414def
jmp 0x414db9
mov edx, dword [ebp - 0x23f4]
cmp edx, dword [ebp - 0x23f0]
jne 0x414e28
cmp dword [ebp - 0x23f0], 0x40
jae 0x414e28
mov eax, dword [ebp - 0x23f4]
mov ecx, dword [ebp - 0x2128]
mov dword [ebp + eax*4 - 0x23ec], ecx
mov edx, dword [ebp - 0x23f0]
add edx, 1
mov dword [ebp - 0x23f0], edx
xor eax, eax
jne 0x414dad
lea ecx, [ebp - 0x22e4]
push ecx
push 0
push 0
lea edx, [ebp - 0x23f0]
push edx
push 1
call dword [sym.imp.WS2_32.dll_select]
lea eax, [ebp - 0x23f0]
push eax
mov ecx, dword [ebp - 0x2128]
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x414e74
mov edx, dword [ebp - 0x2128]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffd
jmp 0x415156
push 0
push 0x1000
lea eax, [ebp - 0x1010]
push eax
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x2014], eax
mov edx, dword [ebp - 0x2014]
mov byte [ebp + edx - 0x1010], 0
cmp dword [ebp - 0x2014], 0
jg 0x414ec3
mov eax, dword [ebp - 0x2128]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffc
jmp 0x415156
movzx ecx, byte [ebp - 0x22c9]
test ecx, ecx
je 0x414f32
cmp dword [ebp + 0x18], 0
jne 0x414ef3
mov edx, dword [ebp - 0x2124]
push edx
push 1
mov eax, dword [ebp - 0x2014]
push eax
lea ecx, [ebp - 0x1010]
push ecx
call fcn.004191e6
add esp, 0x10
cmp dword [ebp + 0x18], 1
jne 0x414f1b
mov edx, dword [ebp - 0x2014]
push edx
lea eax, [ebp - 0x1010]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
add edx, dword [ebp - 0x212c]
push edx
call fcn.00415ea0
add esp, 0xc
mov eax, dword [ebp - 0x212c]
add eax, dword [ebp - 0x2014]
mov dword [ebp - 0x212c], eax
jmp 0x4150de
push str.HTTP_1.1_404
lea ecx, [ebp - 0x1010]
push ecx
call fcn.00415460
add esp, 8
test eax, eax
je 0x414f5f
mov edx, dword [ebp - 0x2128]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x415156
push str.HTTP_1.1_200
lea eax, [ebp - 0x1010]
push eax
call fcn.00415460
add esp, 8
test eax, eax
jne 0x414f8c
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x415156
push str.Content_Length:
lea edx, [ebp - 0x1010]
push edx
call fcn.00415460
add esp, 8
mov dword [ebp - 0x2138], eax
cmp dword [ebp - 0x2138], 0
jne 0x414fc4
mov eax, dword [ebp - 0x2128]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x415156
mov ecx, dword [ebp - 0x2138]
add ecx, 0x10
mov dword [ebp - 0x2138], ecx
mov edx, dword [ebp - 0x2138]
push edx
call fcn.004166be
add esp, 4
mov dword [ebp - 0x22d8], eax
push str._r_n_r_n
lea eax, [ebp - 0x1010]
push eax
call fcn.00415460
add esp, 8
mov dword [ebp - 0x2138], eax
cmp dword [ebp - 0x2138], 0
jne 0x415020
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
jmp 0x415156
mov edx, dword [ebp - 0x2138]
add edx, 4
mov dword [ebp - 0x2138], edx
mov byte [ebp - 0x22c9], 1
mov eax, dword [ebp - 0x2138]
lea ecx, [ebp - 0x1010]
sub eax, ecx
mov edx, dword [ebp - 0x2014]
sub edx, eax
mov dword [ebp - 0x2014], edx
cmp dword [ebp + 0x18], 0
jne 0x415082
mov eax, dword [ebp - 0x2124]
push eax
push 1
mov ecx, dword [ebp - 0x2014]
push ecx
mov edx, dword [ebp - 0x2138]
push edx
call fcn.004191e6
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x22d8]
mov dword [eax], ecx
cmp dword [ebp + 0x18], 1
jne 0x4150d2
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x22d8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x22d8]
add ecx, 1
push ecx
call fcn.0041580d
add esp, 4
mov dword [ebp - 0x23f8], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x23f8]
mov dword [edx], eax
mov ecx, dword [ebp - 0x2014]
push ecx
mov edx, dword [ebp - 0x2138]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push ecx
call fcn.00415ea0
add esp, 0xc
mov edx, dword [ebp - 0x2014]
mov dword [ebp - 0x212c], edx
mov eax, dword [ebp - 0x22d8]
cmp eax, dword [ebp - 0x212c]
jg 0x414d90
mov ecx, dword [ebp - 0x2128]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp + 0x18], 0
jne 0x415112
mov edx, dword [ebp - 0x2124]
push edx
call fcn.00419008
add esp, 4
cmp dword [ebp + 0x18], 1
jne 0x415127
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x22d8]
mov byte [ecx + edx], 0
cmp dword [ebp + 0x18], 1
jne 0x41513c
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
jge 0x41513c
mov eax, 0xfffffffb
jmp 0x415156
cmp dword [ebp + 0x18], 1
jne 0x415151
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], 0
jne 0x415151
mov eax, 0xfffffffb
jmp 0x415156
mov eax, 1
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00415d91
mov esp, ebp
pop ebp
ret