Function at 0x10012bc0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x1428
call fcn.10016910
mov eax, dword [0x10046070]
xor eax, esp
mov dword [esp + 0x1424], eax
push esi
push edi
push 0
push 1
push 2
mov dword [esp + 0x18], edx
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
test edi, edi
jns 0x10012c6e
push 0x400
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.100187a0
add esp, 0xc
call fcn.1001b0b3
mov esi, dword [eax]
call fcn.1001b0b3
push esi
push dword [eax]
call fcn.10022436
add esp, 4
push eax
lea eax, [esp + 0x30]
push str.create_socket_error:__s_errno:__d__n
push eax
call fcn.1000fee0
lea edx, [esp + 0x38]
add esp, 0x10
lea ecx, [edx + 1]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x10012c40
sub edx, ecx
lea eax, [esp + 0x28]
mov ecx, dword [esp + 0xc]
push edx
push eax
call fcn.10001c40
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x1424]
xor ecx, esp
call fcn.1001578e
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
mov eax, 2
movaps xmmword [esp + 0x10], xmm0
push 0xc2aa
mov word [esp + 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
push str.127.0.0.1
mov word [esp + 0x16], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x10012d2b
push 0x400
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.100187a0
add esp, 0xc
call fcn.1001b0b3
mov esi, dword [eax]
call fcn.1001b0b3
push esi
push dword [eax]
call fcn.10022436
add esp, 4
push eax
lea eax, [esp + 0x30]
push str.connect_error:__s_errno:__d__n
push eax
call fcn.1000fee0
lea ecx, [esp + 0x38]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10012cf6
sub ecx, edx
lea eax, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x10]
push eax
call fcn.10001c40
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x1424]
xor ecx, esp
call fcn.1001578e
mov esp, ebp
pop ebp
ret
push 4
lea eax, [ebp + 8]
push eax
push 0x1006
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x10012d8c
push 0x400
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.100187a0
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [esp + 0x2c]
push str.set_socket_timeout_error:__errno:__d__n
push eax
call fcn.1000fee0
lea ecx, [esp + 0x34]
add esp, 0xc
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10012d80
jmp 0x10012cfd
cmp dword [esi + 0x14], 0x10
mov eax, dword [esi + 0x10]
jb 0x10012d97
mov esi, dword [esi]
push 0
push eax
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x10012e00
push 0x400
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.100187a0
add esp, 0xc
call fcn.1001b0b3
mov esi, dword [eax]
call fcn.1001b0b3
push esi
push dword [eax]
call fcn.10022436
add esp, 4
push eax
lea eax, [esp + 0x30]
push str.socket_send_error:__s_errno:__d__n
push eax
call fcn.1000fee0
lea ecx, [esp + 0x38]
add esp, 0x10
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10012df0
jmp 0x10012cfd
push 0
push 0x1000
lea eax, [esp + 0x430]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
je 0x10012e39
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x428]
push esi
push eax
call fcn.10007240
cmp esi, 0x1000
jge 0x10012e00
jmp 0x10012e88
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x400
mov esi, eax
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.100187a0
add esp, 0xc
lea eax, [esp + 0x28]
push esi
push str.socket_recv_timeout__errno:__d__n
push eax
call fcn.1000fee0
lea ecx, [esp + 0x34]
add esp, 0xc
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10012e70
sub ecx, edx
lea eax, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x10]
push eax
call fcn.10001c40
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x142c]
mov eax, 1
pop edi
pop esi
xor ecx, esp
call fcn.1001578e
mov esp, ebp
pop ebp
ret