Function at 0x10015600
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0x28
mov eax, dword [0x1012f5f0]
xor eax, esp
mov dword [esp + 0x24], eax
push esi
mov esi, ecx
mov ecx, dword [edi]
mov eax, ecx
sub eax, 2
je 0x10015696
sub eax, 0x15
je 0x10015632
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x28
ret
xor eax, eax
cmp dword [edi + 0x18], eax
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x1c
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov word [esp + 0xc], 0x17
je 0x1001566f
mov ax, word [edi + 0x18]
mov word [esp + 0xe], ax
jmp 0x10015678
mov dx, word [esi + 0x18]
mov word [esp + 0xe], dx
mov eax, dword [edi + 4]
mov edx, dword [edi + 8]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x18], edx
mov edx, dword [edi + 0x10]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
jmp 0x100156d7
xor eax, eax
cmp dword [edi + 0x18], eax
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
je 0x100156c7
mov ax, word [edi + 0x18]
mov word [esp + 0xe], ax
jmp 0x100156d0
mov dx, word [esi + 0x18]
mov word [esp + 0xe], dx
mov eax, dword [edi + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x91b8]
test eax, eax
push ebx
je 0x100156f7
mov edx, dword [esi + 0x91bc]
mov eax, dword [eax]
push edx
push 0
push 1
push ecx
call eax
add esp, 0x10
jmp 0x10015702
push 0
push 1
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10015798
mov ecx, dword [edi]
push ecx
mov ecx, esi
call fcn.10015420
add esp, 4
test eax, eax
jge 0x10015767
mov eax, dword [esi + 0x91b8]
test eax, eax
je 0x1001574c
mov edx, dword [esi + 0x91bc]
mov eax, dword [eax + 4]
push edx
push ebx
call eax
add esp, 8
pop ebx
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x28
ret
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebx
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x28
ret
cmp dword [esi + 0x91b8], 0
mov dword [esp + 0xc], 1
jne 0x100157ac
push 4
lea ecx, [esp + 0x10]
push ecx
push 1
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x100157ac
mov edx, ebx
mov ecx, esi
call fcn.10016070
pop ebx
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x28
ret
mov eax, dword [esi + 0x91b0]
test eax, eax
push ebp
je 0x100157d0
mov edx, dword [esi + 0x91b4]
push edx
push 1
push ebx
call eax
mov ebp, eax
add esp, 0xc
test ebp, ebp
jl 0x1001585d
mov eax, dword [esi + 0x91b8]
test eax, eax
je 0x100157f6
mov ecx, dword [esi + 0x91bc]
mov edx, dword [esp + 0xc]
push ecx
push edx
mov edx, dword [eax + 8]
lea ecx, [esp + 0x1c]
push ecx
push ebx
call edx
add esp, 0x10
jmp 0x10015807
mov eax, dword [esp + 0xc]
push eax
lea ecx, [esp + 0x18]
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1001583e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x1001583e
cmp eax, 0x2733
je 0x1001583e
mov edx, ebx
mov ecx, esi
call fcn.10016070
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x28
ret
mov eax, dword [esi + 0x91a8]
test eax, eax
je 0x1001587a
mov edx, dword [esi + 0x91ac]
push edx
push 1
push ebx
call eax
mov ebp, eax
add esp, 0xc
test ebp, ebp
jge 0x1001587a
mov edx, ebx
mov ecx, esi
call fcn.10016070
mov eax, ebp
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x28
ret
mov eax, dword [esi + 0x91a0]
test eax, eax
je 0x10015895
mov ecx, dword [esi + 0x91a4]
push 0
push 1
push ebx
push ecx
call eax
add esp, 0x10
mov ecx, dword [esp + 0x30]
mov dword [edi + 0x20], ebx
mov dword [edi + 0x34], 0
add dword [esi + 0x180], 1
mov esi, dword [esi + 0x180]
pop ebp
pop ebx
mov dword [edi + 0x40], esi
pop esi
xor ecx, esp
xor eax, eax
call fcn.1001d3e9
add esp, 0x28
ret