Function at 0x10001150
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Download and write a file
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:
sub esp, 0x38
mov eax, dword [0x1000e03c]
xor eax, esp
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
push ebx
mov ebx, dword [esp + 0x40]
push ebp
push edi
mov edi, dword [esp + 0x50]
push 6
push 1
push 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], ecx
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x100011a5
pop edi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14
push esi
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea edx, [esp + 0x2c]
push edx
push 0x1006
mov eax, 0x2bf20
push 0xffff
push ebp
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call esi
push 4
lea eax, [esp + 0x30]
push eax
push 0x1005
push 0xffff
push ebp
call esi
mov edx, dword [esp + 0x50]
mov ecx, 2
push edx
mov word [esp + 0x38], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
movsx eax, byte [ebx]
push eax
call fcn.10001873
add esp, 4
push ebx
test eax, eax
je 0x10001239
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x10001230
pop esi
pop edi
pop ebp
mov eax, 2
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
jmp 0x1000123f
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x10
lea ecx, [esp + 0x38]
push ecx
push ebp
mov dword [esp + 0x44], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10001270
pop esi
pop edi
pop ebp
mov eax, 3
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14
push 0x1400
call fcn.10001a9c
mov esi, eax
add esp, 4
test esi, esi
jne 0x1000129b
lea eax, [esi + 4]
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14
push 0x1400
push 0
push esi
call fcn.100057a0
add esp, 0xc
push str.GET__
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call edi
push str._HTTP_1.1_r_n
push esi
call edi
push str.Host:
push esi
call edi
push ebx
push esi
call edi
push 0x1000ca9c
push esi
call edi
push str.User_Agent:
push esi
call edi
mov edx, dword [esp + 0x14]
push edx
push esi
call edi
push 0x1000ca9c
push esi
call edi
push str.Accept:___r_n
push esi
call edi
push str.Pragma:_no_cache_r_n
push esi
call edi
push str.Cache_Control:_no_cache_r_n
push esi
call edi
push str.Connection:_close_r_n
push esi
call edi
push 0x1000ca9c
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
push eax
push esi
push ebp
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x1000135d
push esi
call fcn.10001a27
add esp, 4
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop esi
pop edi
pop ebp
mov eax, 5
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14
push 0x1000
xor edi, edi
push edi
push esi
call fcn.100057a0
add esp, 0xc
mov edi, edi
push 0
mov eax, 0x1000
sub eax, edi
push eax
lea ecx, [edi + esi]
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x100013c6
add edi, eax
call fcn.10001000
test eax, eax
jge 0x100013f0
cmp edi, 0x1000
jl 0x10001370
push esi
call fcn.10001a27
add esp, 4
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop esi
pop edi
pop ebp
mov eax, 7
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14
push esi
call fcn.10001a27
add esp, 4
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop esi
pop edi
pop ebp
mov eax, 6
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14
cmp eax, edi
jle 0x1000141e
push esi
call fcn.10001a27
add esp, 4
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop esi
pop edi
pop ebp
mov eax, 8
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14
lea ebx, [eax + esi]
sub edi, eax
xor eax, eax
mov byte [ebx - 1], 0
mov byte [ebx - 2], 0
lea edx, [esp + 0x20]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
push edx
lea eax, [esp + 0x28]
mov dword [esp + 0x20], edi
push eax
mov edi, esi
call fcn.10001070
add esp, 8
test al, al
je 0x10001546
cmp dword [esp + 0x24], 0xc8
jne 0x1000153e
mov ecx, dword [esp + 0x30]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x14], eax
test eax, eax
jle 0x10001534
mov edi, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x1c]
push edx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000151f
cmp dword [esp + 0x18], edi
jb 0x1000151f
mov eax, dword [esp + 0x20]
sub eax, edi
xor ebx, ebx
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x10001527
push 0
push 0x1000
push esi
push ebp
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jle 0x1000150a
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x1c]
push eax
push edi
push esi
push ecx
add ebx, edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000151f
cmp dword [esp + 0x18], edi
jb 0x1000151f
cmp ebx, dword [esp + 0x1c]
jl 0x100014c2
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10001546
mov edx, dword [esp + 0x14]
push edx
mov dword [esp + 0x14], 0xc
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10001546
mov dword [esp + 0x10], 0xb
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10001546
mov dword [esp + 0x10], 0xa
jmp 0x10001546
mov dword [esp + 0x10], 9
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
call fcn.10001a27
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x14]
add esp, 4
pop esi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.1000166a
add esp, 0x38
ret 0x14