Function at 0x1003cae0
Capabilities:
Connect socket
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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x12cc
call fcn.1001a2d0
mov eax, dword [0x10086ba0]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0xc38], eax
mov dword [ebp - 0xc20], 1
mov dword [ebp - 0xc1c], 0
mov byte [ebp - 0xbe9], 0
mov byte [ebp - 0x5f5], 0
push 0x5dc
call fcn.100165a5
add esp, 4
mov edx, dword [ebp + 0x1c]
mov dword [edx + 0xa18], eax
push 0x5dc
call fcn.100165a5
add esp, 4
mov ecx, dword [ebp + 0x1c]
mov dword [ecx + 0xa20], eax
push 0x80
push 0
mov edx, dword [ebp + 0x1c]
add edx, 0x914
push edx
call fcn.100139b0
add esp, 0xc
push 0x80
push 0
lea eax, [ebp - 0xcb8]
push eax
call fcn.100139b0
add esp, 0xc
cmp dword [ebp - 0xc38], 0
jne 0x1003cb9d
xor eax, eax
jmp 0x1003d3a7
push 4
mov ecx, dword [ebp - 0xc38]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x604]
push ecx
call fcn.10013640
add esp, 0xc
push 8
push 0
lea edx, [ebp - 0x600]
push edx
call fcn.100139b0
add esp, 0xc
push 0x5dc
push 0
lea eax, [ebp - 0xbe8]
push eax
call fcn.100139b0
add esp, 0xc
push 0x5dc
push 0
lea ecx, [ebp - 0x5f0]
push ecx
call fcn.100139b0
add esp, 0xc
call fcn.1003b360
mov dword [ebp - 0xcc0], eax
cmp dword [ebp - 0xcc0], 0
jae 0x1003cc21
push 0x10072c6c
call fcn.10016d4e
add esp, 4
xor eax, eax
jmp 0x1003d3a7
mov edx, 2
mov word [ebp - 0x608], dx
movzx eax, word [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x606], ax
push 4
lea ecx, [ebp - 0xc20]
push ecx
push 0xfffffffffffffffb
push 0xffff
mov edx, dword [ebp - 0xcc0]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x1003cc6c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xc24], eax
push 0x10
lea eax, [ebp - 0x608]
push eax
mov ecx, dword [ebp - 0xcc0]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jge 0x1003cc8d
xor eax, eax
jmp 0x1003d3a7
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0xcbc], eax
push 0x23
mov edx, dword [ebp - 0xcbc]
push edx
mov eax, dword [ebp - 0xcc0]
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov ecx, dword [ebp - 0xc1c]
mov edx, dword [ebp - 0xcbc]
mov dword [ebp + ecx*4 - 0xc30], edx
mov eax, dword [ebp - 0xc1c]
mov ecx, dword [ebp - 0xcc0]
mov dword [ebp + eax*4 - 0xccc], ecx
mov edx, dword [ebp - 0xc1c]
add edx, 1
mov dword [ebp - 0xc1c], edx
mov eax, dword [0x10088138]
add eax, 1
mov dword [0x10088138], eax
mov ecx, dword [0x1008811c]
push ecx
mov edx, dword [0x10088138]
push edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [0x10088114]
push ecx
movzx edx, word [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [0x10088108]
push edx
push 0xffffffffffffffff
push 0x5dc
lea eax, [ebp - 0xbe8]
push eax
call fcn.10016910
add esp, 0x2c
call fcn.1003b360
mov dword [ebp - 0xc34], eax
mov ecx, 2
mov word [ebp - 0xcdc], cx
mov edx, dword [ebp + 0x1c]
add edx, 0x38b
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0xcd8], eax
movzx eax, word [0x10088138]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xcda], ax
push 4
lea ecx, [ebp - 0xc20]
push ecx
push 0xfffffffffffffffb
push 0xffff
mov edx, dword [ebp - 0xc34]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x1003cda3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xc24], eax
push 0x10
lea eax, [ebp - 0xcdc]
push eax
mov ecx, dword [ebp - 0xc34]
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1003cdc9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xc24], eax
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0xcbc], eax
push 0x2b
mov edx, dword [ebp - 0xcbc]
push edx
mov eax, dword [ebp - 0xc34]
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 5
mov ecx, dword [ebp - 0xc34]
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1003ce0a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xc24], eax
mov edx, dword [ebp - 0xc1c]
mov eax, dword [ebp - 0xcbc]
mov dword [ebp + edx*4 - 0xc30], eax
mov ecx, dword [ebp - 0xc1c]
mov edx, dword [ebp - 0xc34]
mov dword [ebp + ecx*4 - 0xccc], edx
mov eax, dword [ebp - 0xc1c]
add eax, 1
mov dword [ebp - 0xc1c], eax
push 0
lea ecx, [ebp - 0xbe8]
push ecx
call fcn.10013a30
add esp, 4
push eax
lea edx, [ebp - 0xbe8]
push edx
mov eax, dword [ebp - 0xcc0]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0xce0], 0
jmp 0x1003ce80
mov ecx, dword [ebp - 0xce0]
add ecx, 1
mov dword [ebp - 0xce0], ecx
cmp dword [ebp - 0xce0], 0xa
jae 0x1003d343
push 0
push 0x3e8
push 0
lea edx, [ebp - 0xc30]
push edx
mov eax, dword [ebp - 0xc1c]
push eax
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
mov dword [ebp - 0x5f4], edx
jmp 0x1003cecd
mov eax, dword [ebp - 0x5f4]
add eax, 1
mov dword [ebp - 0x5f4], eax
mov ecx, dword [ebp - 0x5f4]
cmp ecx, dword [ebp - 0xc1c]
jae 0x1003d33e
push 0
push 0x3e8
push 1
mov edx, dword [ebp - 0x5f4]
lea eax, [ebp + edx*4 - 0xc30]
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x1003cf10
cmp dword [ebp - 4], 0x102
jne 0x1003cf17
jmp 0x1003cebe
mov ecx, dword [ebp - 0x5f4]
mov dword [ebp - 4], ecx
lea edx, [ebp - 0xc18]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + eax*4 - 0xc30]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + edx*4 - 0xccc]
push eax
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
mov ecx, dword [ebp - 0xc18]
and ecx, 8
je 0x1003cfd7
cmp dword [ebp - 0xc08], 0
je 0x1003cf60
jmp 0x1003d33e
push 0
push 0
mov edx, dword [ebp - 4]
mov eax, dword [ebp + edx*4 - 0xccc]
push eax
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 8], eax
cmp dword [ebp - 0xc1c], 0xa
jbe 0x1003cf86
jmp 0x1003d33e
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0xcbc], eax
push 0x23
mov ecx, dword [ebp - 0xcbc]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov eax, dword [ebp - 0xc1c]
mov ecx, dword [ebp - 0xcbc]
mov dword [ebp + eax*4 - 0xc30], ecx
mov edx, dword [ebp - 0xc1c]
mov eax, dword [ebp - 8]
mov dword [ebp + edx*4 - 0xccc], eax
mov ecx, dword [ebp - 0xc1c]
add ecx, 1
mov dword [ebp - 0xc1c], ecx
mov edx, dword [ebp - 0xc18]
and edx, 1
je 0x1003d2bc
mov dword [ebp - 0x12cc], 0
mov dword [ebp - 0xce8], 0
mov dword [ebp - 0xce4], 0
push 0x5dc
push 0
lea eax, [ebp - 0x12c8]
push eax
call fcn.100139b0
add esp, 0xc
cmp dword [ebp - 0xc14], 0
je 0x1003d028
jmp 0x1003d33e
push 0
push 0x5dc
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx + 0xa20]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + eax*4 - 0xccc]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov edx, dword [ebp + 0x1c]
mov dword [edx + 0xa24], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + eax*4 - 0xccc]
cmp ecx, dword [ebp - 0xcc0]
jne 0x1003d185
mov edx, dword [ebp + 0x1c]
cmp dword [edx + 0xa24], 0
jle 0x1003d180
mov eax, dword [ebp + 0x1c]
add eax, 0x914
push eax
push 3
push 0x10072c0c
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx + 0xa20]
push edx
call fcn.1003c520
add esp, 0x10
mov dword [ebp - 0xce4], eax
cmp dword [ebp - 0xce4], 0
je 0x1003d180
mov eax, dword [ebp + 0x1c]
add eax, 0x914
push eax
call fcn.10013a30
add esp, 4
mov dword [ebp - 0xce8], eax
movzx ecx, byte [ebp - 0xbe9]
test ecx, ecx
je 0x1003d180
mov edx, dword [ebp - 0xce8]
push edx
lea eax, [ebp - 0xcb8]
push eax
mov ecx, dword [ebp + 0x1c]
add ecx, 0x914
push ecx
call fcn.100167b5
add esp, 0xc
test eax, eax
jne 0x1003d180
push 0x5dc
push 0
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 0xa18]
push eax
call fcn.100139b0
add esp, 0xc
mov ecx, dword [0x10088114]
push ecx
mov edx, dword [0x10088104]
push edx
push 0xffffffffffffffff
push 0x5dc
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0xa18]
push ecx
call fcn.10016910
add esp, 0x14
push 0
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 0xa18]
push eax
call fcn.10013a30
add esp, 4
push eax
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx + 0xa18]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov byte [ebp - 0x5f5], 1
mov ecx, dword [ebp + 0x1c]
mov byte [ecx + 0xad0], 1
jmp 0x1003d343
jmp 0x1003d2bc
mov edx, dword [ebp + 0x1c]
cmp dword [edx + 0xa24], 0
jle 0x1003d2bc
push 0
lea eax, [ebp - 0x12c8]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
call fcn.10061c10
add esp, 0xc
mov dword [ebp - 0x12cc], eax
lea edx, [ebp - 0xcb8]
push edx
push 3
push 0x10072c74
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0xa20]
push ecx
call fcn.1003c520
add esp, 0x10
mov dword [ebp - 0xce4], eax
mov edx, dword [ebp - 0xce4]
push edx
call fcn.10013a30
add esp, 4
mov dword [ebp - 0xce8], eax
mov eax, dword [ebp - 0xce8]
push eax
lea ecx, [ebp - 0xcb8]
push ecx
mov edx, dword [ebp + 0x1c]
add edx, 0x914
push edx
call fcn.100167b5
add esp, 0xc
test eax, eax
jne 0x1003d29f
push 0x5dc
push 0
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0xa18]
push ecx
call fcn.100139b0
add esp, 0xc
mov edx, dword [0x10088114]
push edx
mov eax, dword [0x10088104]
push eax
push 0xffffffffffffffff
push 0x5dc
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx + 0xa18]
push edx
call fcn.10016910
add esp, 0x14
push 0
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0xa18]
push ecx
call fcn.10013a30
add esp, 4
push eax
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 0xa18]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + ecx*4 - 0xccc]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov byte [ebp - 0x5f5], 1
mov eax, dword [ebp + 0x1c]
mov byte [eax + 0xad0], 1
jmp 0x1003d343
mov ecx, dword [ebp + 0x1c]
add ecx, 0x914
push ecx
call fcn.10013a30
add esp, 4
test eax, eax
jne 0x1003d2bc
mov byte [ebp - 0xbe9], 1
mov edx, dword [ebp - 0xc18]
and edx, 2
je 0x1003d2f9
cmp dword [ebp - 0xc10], 0
je 0x1003d2d2
jmp 0x1003d33e
push 0
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0xa1c]
push ecx
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 0xa18]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + ecx*4 - 0xccc]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp - 0xc18]
and eax, 0x20
je 0x1003d339
cmp dword [ebp - 0xc00], 0
je 0x1003d30f
jmp 0x1003d33e
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + ecx*4 - 0xc30]
mov dword [ebp - 0xcbc], edx
push 0
mov eax, dword [ebp - 0xcbc]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + ecx*4 - 0xccc]
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
jmp 0x1003cebe
jmp 0x1003ce71
mov dword [ebp - 0x5f4], 0
jmp 0x1003d35e
mov eax, dword [ebp - 0x5f4]
add eax, 1
mov dword [ebp - 0x5f4], eax
cmp dword [ebp - 0x5f4], 3
jae 0x1003d391
mov ecx, dword [ebp - 0x5f4]
mov edx, dword [ebp + ecx*4 - 0xccc]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x5f4]
mov ecx, dword [ebp + eax*4 - 0xc30]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
jmp 0x1003d34f
movzx edx, byte [ebp - 0x5f5]
test edx, edx
je 0x1003d3a5
mov eax, str.Success
jmp 0x1003d3a7
xor eax, eax
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.1001362b
mov esp, ebp
pop ebp
ret