Function at 0x100a32b0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push edi
mov edi, dword [esp + 8]
test edi, edi
je 0x100a34c4
cmp word [edi], 2
jne 0x100a34c4
push esi
push 0x58
call fcn.1013fbbd
mov esi, eax
add esp, 4
test esi, esi
je 0x100a3355
push 0x58
push 0
push esi
call fcn.1013f910
push 0x24
call fcn.1013fbbd
add esp, 0x10
test eax, eax
je 0x100a334c
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], 0x24
mov ecx, dword [edi]
mov dword [eax], ecx
mov edx, dword [edi + 4]
mov dword [eax + 4], edx
mov ecx, dword [edi + 8]
mov dword [eax + 8], ecx
mov edx, dword [edi + 0xc]
push 0
push 1
mov dword [eax + 0xc], edx
push 2
mov dword [esi], 0x101bc124
mov dword [esi + 4], 9
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x18], eax
test eax, eax
jge 0x100a335a
push esi
call fcn.10094de0
add esp, 4
pop esi
xor eax, eax
pop edi
ret
cmp dword [esp + 0x10], 0
push ebx
mov dword [esi + 0x1c], 1
push 6
je 0x100a341d
mov dword [esp + 0x14], 1
mov dword [esi + 0x1c], 3
call fcn.1013fbbd
add esp, 4
mov dword [esi + 8], eax
test eax, eax
je 0x100a3408
mov ecx, dword [edi + 4]
mov ebx, dword [sym.imp.WS2_32.dll_htons]
mov dword [eax], ecx
movzx edx, word [edi + 2]
push edx
call ebx
mov ecx, dword [esi + 8]
shr ax, 8
mov byte [ecx + 4], al
movzx edx, word [edi + 2]
push edx
call ebx
mov ecx, dword [esi + 8]
push 4
lea edx, [esp + 0x14]
push edx
push 4
mov byte [ecx + 5], al
mov eax, dword [esi + 0x18]
push 0xffff
push eax
mov dword [esi + 0xc], 6
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [esi + 0x18]
push 0x10
push edi
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x100a3408
mov edx, dword [esi + 0x18]
push 1
push edx
call fcn.100a7400
mov eax, dword [esi + 0x18]
add esp, 8
push 5
push eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x100a3494
push esi
call fcn.100a6d40
push esi
call fcn.10094de0
add esp, 8
pop ebx
pop esi
xor eax, eax
pop edi
ret
call fcn.1013fbbd
add esp, 4
mov dword [esi + 0x10], eax
test eax, eax
je 0x100a3408
mov ecx, dword [edi + 4]
mov ebx, dword [sym.imp.WS2_32.dll_htons]
mov dword [eax], ecx
movzx edx, word [edi + 2]
push edx
call ebx
mov ecx, dword [esi + 0x10]
shr ax, 8
mov byte [ecx + 4], al
movzx edx, word [edi + 2]
push edx
call ebx
mov ecx, dword [esi + 0x10]
push 0x10
mov byte [ecx + 5], al
mov edx, dword [esi + 0x18]
push edi
push edx
mov dword [esi + 0x14], 6
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jl 0x100a3408
mov eax, dword [esi + 0x18]
push 0
push 0
push 0x1001
push eax
call fcn.100a70f0
mov ecx, dword [esi + 0x18]
push 0
push 0
push 0x1002
push ecx
call fcn.100a70f0
add esp, 0x20
pop ebx
mov dword [esi + 0x28], bind
mov dword [esi + 0x30], 0x100a8010
mov dword [esi + 0x34], 0x100a81c0
mov dword [esi + 0x38], fcn.100a6d40
mov dword [esi + 0x40], 0x100a3010
mov dword [esi + 0x44], 0x100a2ff0
mov eax, esi
pop esi
pop edi
ret
xor eax, eax
pop edi
ret