Function at 0x10012050
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10117728
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x1014d0cc]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
mov eax, dword [0x1014d0cc]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x34], eax
call fcn.1010d600
mov ebx, dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
call ebx
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
call fcn.1010d600
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, 0xffffffff
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
jne 0x100120d3
or edi, esi
mov dword [esp + 0x28], edi
jmp 0x100120ec
xor edi, edi
call fcn.1010d600
mov ecx, eax
mov eax, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x28], esi
mov edi, esi
mov dword [esp + 0x3c], edi
cmp edi, 0xffffffff
mov dword [esp + 0x60], 0
jne 0x10012117
neg eax
sbb eax, eax
test eax, fcn.1009bff0
je 0x10012117
lea ecx, [esp + 0x10]
push ecx
mov ecx, str.socket_select_interrupter
call fcn.100129a0
cmp edi, 0xffffffff
mov dword [esp + 0x24], 1
jne 0x10012134
call fcn.1010d600
mov ecx, 0x2719
mov dword [esp + 0x10], ecx
jmp 0x10012177
push 0
call ebx
push 4
lea edx, [esp + 0x28]
push edx
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, eax
call fcn.1010d600
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
jne 0x1001217b
call fcn.1010d600
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x40], eax
push str.127.0.0.1
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov word [esp + 0x44], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
lea ecx, [esp + 0x40]
mov dword [esp + 0x44], eax
push 0x10
push ecx
lea esi, [esp + 0x18]
mov eax, edi
mov word [esp + 0x4a], 0
call fcn.100102b0
add esp, 8
cmp eax, 0xffffffff
jne 0x100121e9
mov edx, dword [esp + 0x10]
neg edx
sbb edx, edx
test edx, fcn.1009bff0
je 0x100121e9
mov eax, esi
push eax
mov ecx, str.socket_select_interrupter
call fcn.100129a0
lea ecx, [esp + 0x40]
push ecx
lea esi, [esp + 0x14]
lea eax, [esp + 0x1c]
mov ecx, edi
call fcn.10010d00
add esp, 4
cmp eax, 0xffffffff
jne 0x10012222
mov edx, dword [esp + 0x10]
neg edx
sbb edx, edx
test edx, fcn.1009bff0
je 0x10012222
mov eax, esi
push eax
mov ecx, str.socket_select_interrupter
call fcn.100129a0
push str.127.0.0.1
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x44], eax
push accept
lea esi, [esp + 0x14]
mov eax, edi
call fcn.100105e0
add esp, 4
cmp eax, 0xffffffff
jne 0x10012266
mov ecx, dword [esp + 0x10]
neg ecx
sbb ecx, ecx
test ecx, fcn.1009bff0
je 0x10012266
mov edx, esi
push edx
mov ecx, str.socket_select_interrupter
call fcn.100129a0
push 0
call ebx
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
call fcn.1010d600
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, 0xffffffff
mov ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edi
jne 0x100122a2
or edi, esi
mov dword [esp + 0x1c], edi
jmp 0x100122b9
xor edi, edi
call fcn.1010d600
mov ecx, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], esi
mov edi, esi
mov dword [esp + 0x38], edi
cmp edi, 0xffffffff
mov byte [esp + 0x60], 1
jne 0x100122e2
neg ecx
sbb ecx, ecx
test ecx, fcn.1009bff0
je 0x100122e2
lea eax, [esp + 0x10]
push eax
mov ecx, str.socket_select_interrupter
call fcn.100129a0
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x44]
push edx
lea esi, [esp + 0x18]
mov eax, edi
call fcn.100104c0
add esp, 8
cmp eax, 0xffffffff
jne 0x1001231b
mov eax, dword [esp + 0x10]
neg eax
sbb eax, eax
test eax, fcn.1009bff0
je 0x1001231b
mov ecx, esi
push ecx
mov ecx, str.socket_select_interrupter
call fcn.100129a0
mov eax, dword [esp + 0x28]
lea esi, [esp + 0x10]
call fcn.10010130
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
mov byte [esp + 0x60], 2
jne 0x10012353
mov edx, dword [esp + 0x10]
neg edx
sbb edx, edx
test edx, fcn.1009bff0
je 0x10012353
mov eax, esi
push eax
mov ecx, str.socket_select_interrupter
call fcn.100129a0
cmp edi, 0xffffffff
mov dword [esp + 0x2c], 1
jne 0x1001237a
call fcn.1010d600
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, 0x2719
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x100123cb
push 0
call ebx
lea ecx, [esp + 0x2c]
push ecx
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, eax
call fcn.1010d600
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x30], eax
call esi
test edi, edi
mov edx, dword [esp + 0x30]
mov ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
jl 0x100123c7
call fcn.1010d600
xor ecx, ecx
test edi, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
je 0x100123e6
mov edi, dword [esp + 0x1c]
neg ecx
sbb ecx, ecx
test ecx, fcn.1009bff0
je 0x100123ea
lea eax, [esp + 0x10]
push eax
mov ecx, str.socket_select_interrupter
call fcn.100129a0
mov edi, dword [esp + 0x1c]
cmp edi, 0xffffffff
mov dword [esp + 0x24], 1
jne 0x100123fe
call fcn.1010d600
jmp 0x1001242a
push 0
call ebx
push 4
lea ecx, [esp + 0x28]
push ecx
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.1010d600
call esi
test edi, edi
jne 0x10012426
call fcn.1010d600
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x2c], 1
jne 0x1001244d
call fcn.1010d600
mov ecx, 0x2719
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x1001249c
push 0
call ebx
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x2c]
push edx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, eax
call fcn.1010d600
mov dword [esp + 0x30], eax
call esi
test edi, edi
mov edx, dword [esp + 0x30]
mov ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
jl 0x10012498
call fcn.1010d600
xor ecx, ecx
test edi, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
je 0x100124b7
mov edi, dword [esp + 0x1c]
neg ecx
sbb ecx, ecx
test ecx, fcn.1009bff0
je 0x100124bb
lea eax, [esp + 0x10]
push eax
mov ecx, str.socket_select_interrupter
call fcn.100129a0
mov edi, dword [esp + 0x1c]
cmp dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x24], 1
je 0x100124f1
push 0
call ebx
mov edx, dword [esp + 0x18]
push 4
lea ecx, [esp + 0x28]
push ecx
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, eax
call fcn.1010d600
call esi
test ebx, ebx
jne 0x100124f6
call fcn.1010d600
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x18]
mov dword [eax + 4], edi
mov edi, dword [esp + 0x28]
cmp edi, 0xffffffff
mov dword [eax], ecx
mov dword [esp + 0x60], 0xffffffff
je 0x1001253f
mov dword [esp + 0x10], 0
call fcn.1010d600
lea edx, [esp + 0x23]
mov dword [esp + 0x14], eax
push 1
push edx
lea esi, [esp + 0x18]
mov eax, edi
mov byte [esp + 0x2b], 0
call fcn.10010320
add esp, 8
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.1010defb
mov esp, ebp
pop ebp
ret 4