Function at 0x1002a810
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
cmp esi, 0xfffffff2
ja 0x1002a967
je 0x1002a90a
test esi, esi
je 0x1002a8fe
cmp esi, 0xfffffff1
jne 0x1002a975
mov eax, dword [edi]
call dword [eax + 0x2c]
test eax, eax
je 0x1002a8eb
movzx eax, word [edi + 0x54]
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
lea ecx, [edi + 0x88]
mov dword [ebp + 0x10], eax
call fcn.10028730
mov ecx, dword [ebp + 0x10]
mov ebx, eax
mov eax, dword [edi + 0x20]
push ebx
push 0
mov dword [ebx + 0x1c], eax
movzx eax, word [edi + 0x54]
mov edx, dword [edi + 0x5c]
cmp eax, 2
mov esi, dword [edi + 0x48]
mov dword [ebx + 0x34], ecx
mov ecx, 0x20
mov dword [ebp + 0xc], 0x2c
cmovne ecx, dword [ebp + 0xc]
push ecx
push ecx
push 0
push dword [ebx + 0x20]
mov dword [ebx + 0x18], 1
push dword [ebp + 0x10]
push edx
call esi
test eax, eax
jne 0x1002aacc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor ecx, ecx
cmp eax, 0x3e5
cmovne ecx, eax
test ecx, ecx
je 0x1002aacc
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x2c]
test eax, eax
jne 0x1002aad8
push dword [ebp + 0x10]
call dword [sym.imp.WS2_32.dll_closesocket]
push ebx
lea ecx, [edi + 0x88]
call fcn.100287e0
lock dec dword [edi + 0x380]
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret 0xc
pop edi
pop esi
mov eax, 2
pop ebx
pop ebp
ret 0xc
mov esi, dword [edi + 0x170]
test esi, esi
je 0x1002a940
mov eax, dword [ebp + 0x10]
xor edx, edx
dec eax
div dword [edi + 0x16c]
mov ecx, eax
mov eax, dword [edi + 0x1b0]
movzx eax, byte [eax + edx]
cmp ecx, eax
jne 0x1002a940
mov edx, dword [esi + edx*4]
mov eax, 0xf
cmp eax, edx
sbb ecx, ecx
neg ecx
jmp 0x1002a945
xor edx, edx
or ecx, 0xffffffff
push 0
xor eax, eax
cmp ecx, 1
push 0
push 1
cmove eax, edx
mov ecx, edi
push eax
call fcn.10029d50
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret 0xc
cmp esi, 0xfffffff3
je 0x1002aa68
cmp esi, 0xfffffff4
je 0x1002a9ae
push dword [ebp + 0x10]
call fcn.10029ee0
cmp esi, 0x2736
je 0x1002aacc
cmp esi, 0x3e3
je 0x1002aacc
push esi
push 5
push 2
push eax
mov ecx, edi
call fcn.10029d50
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret 0xc
mov esi, dword [edi + 0x170]
test esi, esi
je 0x1002aacc
mov eax, dword [ebp + 0x10]
xor edx, edx
dec eax
div dword [edi + 0x16c]
mov ecx, eax
mov eax, dword [edi + 0x1b0]
movzx eax, byte [eax + edx]
cmp ecx, eax
jne 0x1002aacc
mov eax, dword [esi + edx*4]
mov ecx, 0xf
cmp ecx, eax
sbb esi, esi
and esi, eax
je 0x1002aacc
cmp dword [esi + 0x30], 0
je 0x1002aacc
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x170]
test eax, eax
je 0x1002aa40
cmp eax, 1
je 0x1002aa40
cmp eax, 2
jne 0x1002aacc
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov ecx, 0x4c7
cmove eax, ecx
mov ecx, edi
push eax
push 4
push 2
push esi
call fcn.10029d50
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret 0xc
lea ecx, [edi + 0x88]
call fcn.10028730
mov ecx, eax
mov eax, dword [edi + 0x20]
push ecx
push esi
mov dword [ecx + 0x1c], eax
mov ecx, edi
call fcn.1002b050
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret 0xc
mov esi, dword [edi + 0x170]
test esi, esi
je 0x1002aacc
mov eax, dword [ebp + 0x10]
xor edx, edx
dec eax
div dword [edi + 0x16c]
mov ecx, eax
mov eax, dword [edi + 0x1b0]
movzx eax, byte [eax + edx]
cmp ecx, eax
jne 0x1002aacc
mov ecx, 0xf
cmp ecx, dword [esi + edx*4]
sbb ecx, ecx
and ecx, dword [esi + edx*4]
je 0x1002aacc
cmp dword [ecx + 0x30], 0
je 0x1002aacc
mov eax, dword [edi + 8]
sub eax, 0
je 0x1002aac4
sub eax, 1
jne 0x1002aacc
push ecx
mov ecx, edi
call fcn.1002b610
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret 0xc
push ecx
mov ecx, edi
call fcn.1002b4a0
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret 0xc
push 0x80004005
call fcn.1001f800
int3