Function at 0x100d1b70
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
mov eax, 0x2264
call fcn.1011c720
mov eax, dword [0x10181630]
xor eax, esp
mov dword [esp + 0x225c], eax
mov eax, dword [esp + 0x2268]
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x7f
mov edi, edx
lea edx, [esp + 0xed]
push ebx
push edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], ecx
mov byte [esp + 0xf4], bl
call fcn.10109950
push 0xff
lea eax, [esp + 0x179]
push ebx
push eax
mov byte [esp + 0x180], bl
call fcn.10109950
add esp, 0x18
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x16c]
push edx
lea edx, [esp + 0xf0]
mov dword [esp + 0x1c], 0x50
call fcn.100c8540
test al, al
jne 0x100d1c00
or eax, 0xffffffff
jmp 0x100d2085
lea eax, [esp + 0xe8]
push eax
call sub.WS2_32.dll_inet_addr
mov esi, eax
cmp esi, 0xffffffff
jne 0x100d1c36
lea ecx, [esp + 0xe8]
push ecx
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x100d1c2f
mov eax, 0xfffffffe
jmp 0x100d2085
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov esi, dword [eax]
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov ebp, eax
cmp ebp, ebx
mov dword [esp + 0x18], ebp
jg 0x100d1c55
mov eax, 0xfffffffd
jmp 0x100d2085
mov ecx, 2
mov eax, ecx
mov word [esp + 0x28], cx
mov ecx, dword [esp + 0x14]
xor edx, edx
push ecx
mov word [esp + 0x2e], dx
mov dword [esp + 0x30], ebx
mov word [esp + 0x3c], ax
call sub.WS2_32.dll_htons
push 0x10
lea edx, [esp + 0x2c]
push edx
push ebp
mov word [esp + 0x46], ax
mov dword [esp + 0x48], esi
call sub.WS2_32.dll_bind
test eax, eax
je 0x100d1ca5
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffffc
jmp 0x100d2085
push 4
lea eax, [esp + 0x24]
push eax
push 0x1006
push 0xffff
push ebp
mov dword [esp + 0x34], 0x7530
call sub.WS2_32.dll_setsockopt
test eax, eax
je 0x100d1cd8
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffffb
jmp 0x100d2085
push 0x10
lea ecx, [esp + 0x3c]
push ecx
push ebp
call sub.WS2_32.dll_connect
test eax, eax
je 0x100d1cf9
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffffa
jmp 0x100d2085
mov edi, dword [esp + 0x24]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x100d1d02
sub eax, edx
push ebx
mov esi, eax
push esi
push edi
push ebp
call sub.WS2_32.dll_send
cmp eax, esi
je 0x100d1d2a
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffff9
jmp 0x100d2085
xor eax, eax
push 0x3f
lea edx, [esp + 0x6d]
push ebx
push edx
xor edi, edi
mov dword [esp + 0x20], 0xffffffff
mov byte [esp + 0x64], bl
mov dword [esp + 0x65], eax
mov dword [esp + 0x69], eax
mov dword [esp + 0x6d], eax
mov word [esp + 0x71], ax
mov byte [esp + 0x73], al
mov byte [esp + 0x74], bl
call fcn.10109950
push 0x2000
lea eax, [esp + 0x278]
push ebx
push eax
call fcn.10109950
add esp, 0x18
xor esi, esi
jmp 0x100d1d80
push ebx
push 1
lea ecx, [esp + edi + 0x270]
push ecx
push ebp
call sub.WS2_32.dll_recv
add edi, eax
cmp eax, ebx
jle 0x100d1dba
cmp edi, 4
jle 0x100d1db1
mov eax, dword [esp + edi + 0x264]
cmp eax, 0xd0a0d0a
je 0x100d1dca
cmp eax, 0xa0d0a0d
je 0x100d1dca
inc esi
cmp esi, 0x1f40
jl 0x100d1d80
push ebp
call sub.WS2_32.dll_closesocket
mov eax, 0xfffffff8
jmp 0x100d2085
push 0x3f
lea edx, [esp + 0xad]
push ebx
push edx
mov byte [esp + 0xb4], bl
call fcn.10109950
add esp, 0xc
lea eax, [esp + 0xa8]
push eax
lea ebx, [esp + 0x26c]
call fcn.100d0465
mov esi, eax
cmp esi, 0xc8
je 0x100d1e37
lea ecx, [esi - 0x12c]
cmp ecx, 0x63
ja 0x100d1e28
mov edx, dword [esp + 0x227c]
mov eax, dword [esp + 0x1c]
push edx
push eax
push str.Location
push edi
mov ecx, ebx
push ecx
call fcn.100d03a4
push ebp
call sub.WS2_32.dll_closesocket
mov eax, esi
neg eax
jmp 0x100d2085
push 0x10
lea edx, [esp + 0x5c]
push edx
push str.Content_Length
push edi
lea eax, [esp + 0x278]
push eax
call fcn.100d03a4
cmp byte [esp + 0x58], 0
je 0x100d1e70
lea ecx, [esp + 0x58]
push ecx
mov edi, 1
call fcn.1010139a
add esp, 4
mov dword [esp + 0x14], eax
jmp 0x100d1ea5
push 0x40
lea edx, [esp + 0x6c]
push edx
push str.Transfer_Encoding
push edi
lea eax, [esp + 0x278]
push eax
call fcn.100d03a4
lea ecx, [esp + 0x68]
push str.chunked
push ecx
call fcn.10100450
add esp, 8
mov edi, eax
neg edi
sbb edi, edi
add edi, 3
xor esi, esi
xor ebx, ebx
cmp edi, 1
jne 0x100d1f4d
push 0x2000
lea edx, [esp + 0x26c]
push ebx
push edx
call fcn.10109950
add esp, 0xc
cmp dword [esp + 0x14], ebx
jle 0x100d207d
mov eax, dword [esp + 0x14]
sub eax, ebx
cmp eax, 0x2000
jle 0x100d1ee4
mov eax, 0x2000
push 0
push eax
lea eax, [esp + 0x270]
push eax
push ebp
call sub.WS2_32.dll_recv
cmp eax, 1
jl 0x100d207d
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x227c]
lea edi, [esi + eax]
add ebx, eax
add edx, esi
lea ecx, [esp + 0x268]
cmp edi, ebp
ja 0x100d1f37
push eax
push ecx
push edx
call fcn.101099d0
mov ebp, dword [esp + 0x24]
add esp, 0xc
cmp ebx, dword [esp + 0x14]
mov esi, edi
jl 0x100d1ed2
jmp 0x100d207d
mov eax, ebp
sub eax, esi
push eax
push ecx
push edx
call fcn.101099d0
add esp, 0xc
mov esi, ebp
jmp 0x100d2079
cmp edi, 2
jne 0x100d207d
mov ax, word [0x1016343c]
mov cl, byte [0x1016343e]
mov word [esp + 0x48], ax
xor eax, eax
push ebp
lea ebx, [esp + 0x4e]
mov byte [esp + 0x4e], cl
mov dword [esp + 0x4f], eax
mov dword [esp + 0x53], eax
mov dword [esp + 0x57], eax
mov byte [esp + 0x5b], al
call fcn.100b34d0
add esp, 4
cmp eax, 1
jl 0x100d207d
lea edx, [esp + 0x48]
push edx
call fcn.100c8490
mov ebp, eax
add esp, 4
cmp ebp, 1
jl 0x100d2079
xor ebx, ebx
lea ecx, [ecx]
mov eax, ebp
sub eax, ebx
cmp eax, 0x2000
jle 0x100d1fc0
mov eax, 0x2000
mov ecx, dword [esp + 0x18]
push 0
push eax
lea eax, [esp + 0x270]
push eax
push ecx
call sub.WS2_32.dll_recv
cmp eax, 1
jl 0x100d202b
mov ecx, dword [esp + 0x227c]
lea edi, [esi + eax]
add ebx, eax
cmp edi, ecx
ja 0x100d200a
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x26c]
push edx
add eax, esi
push eax
call fcn.101099d0
add esp, 0xc
cmp ebx, ebp
mov esi, edi
jl 0x100d1fb0
jmp 0x100d202b
mov edx, dword [esp + 0x1c]
sub ecx, esi
push ecx
lea ecx, [esp + 0x26c]
push ecx
add edx, esi
push edx
call fcn.101099d0
mov esi, dword [esp + 0x2288]
add esp, 0xc
mov ecx, dword [esp + 0x18]
call fcn.100c86b0
test al, al
je 0x100d2079
mov ax, word [0x1016343c]
mov edx, dword [esp + 0x18]
mov cl, byte [0x1016343e]
mov word [esp + 0x48], ax
xor eax, eax
push edx
lea ebx, [esp + 0x4e]
mov byte [esp + 0x4e], cl
mov dword [esp + 0x4f], eax
mov dword [esp + 0x53], eax
mov dword [esp + 0x57], eax
mov byte [esp + 0x5b], al
call fcn.100b34d0
add esp, 4
cmp eax, 1
jge 0x100d1f93
mov ebp, dword [esp + 0x18]
push ebp
call sub.WS2_32.dll_closesocket
mov eax, esi
mov ecx, dword [esp + 0x226c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10103a83
add esp, 0x2264
ret 8