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

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov esi, edx
push 0
push 1
mov eax, dword [edi + 0x2c]
mov ebx, dword [edi + 4]
and eax, 0x1000000
neg eax
sbb eax, eax
and eax, 0x15
add eax, 2
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x37a98592
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebp
test eax, eax
jg 0x37a98550
call ebp
jmp 0x37a9855a
call ebp
movzx eax, ax
or eax, 0x80070000
mov dword [esi + 0x20], eax
mov dword [esi + 0x38], 0
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x37a98583
mov eax, dword [eax + 0x38]
mov dword [esi + 0x38], eax
mov eax, dword [ebx + 0x28]
mov dword [eax + 0x38], esi
mov dword [ebx + 0x28], esi
inc dword [edi + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [esi + 0x38], esi
mov dword [ebx + 0x28], esi
inc dword [edi + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x37a98604
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
jg 0x37a985b4
call eax
jmp 0x37a985be
call eax
movzx eax, ax
or eax, 0x80070000
mov dword [esi + 0x20], eax
mov dword [esi + 0x38], 0
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x37a985ee
mov eax, dword [eax + 0x38]
mov dword [esi + 0x38], eax
mov eax, dword [ebx + 0x28]
push ebp
mov dword [eax + 0x38], esi
mov dword [ebx + 0x28], esi
inc dword [edi + 0x3c]
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [esi + 0x38], esi
mov dword [ebx + 0x28], esi
inc dword [edi + 0x3c]
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
lea ecx, [esi + 0x20]
xorps xmm0, xmm0
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
test dword [edi + 0x2c], 0x100000
je 0x37a98629
mov eax, dword [esi + 0x160]
or eax, 1
mov dword [esi + 0x30], eax
push ecx
lea eax, [esp + 0x14]
push eax
push 0x80
push 0x80
push 0
lea eax, [esi + 0x40]
push eax
mov eax, dword [edi + 0xa4]
push ebp
push dword [edi + 0x90]
call eax
test eax, eax
je 0x37a98670
test dword [edi + 0x2c], 0x40000
je 0x37a986d2
mov dword [esi + 0x3c], ebp
mov edx, esi
inc dword [edi + 0x3c]
mov ecx, ebx
call fcn.37a97fe0
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x37a986d2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
jg 0x37a98690
call eax
jmp 0x37a9869a
call eax
movzx eax, ax
or eax, 0x80070000
mov edx, esi
mov dword [esi + 0x20], eax
mov ecx, ebx
call fcn.37a97fe0
inc dword [edi + 0x3c]
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
test dword [edi + 0x2c], 0x100000
je 0x37a98734
push dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 0x160], 0
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [esi + 0x3c], ebp
inc dword [edi + 0x3c]
test dword [edi + 0x2c], 0x100000
je 0x37a98734
cmp dword [esi + 0x164], 0xffffffff
lea eax, [esi + 0x164]
jne 0x37a98734
push 4
push 0xffffffffffffffff
push esi
push 0x37a984d0
push dword [esi + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
jne 0x37a98734
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
test eax, eax
jg 0x37a9871b
call ebp
jmp 0x37a98725
call ebp
movzx eax, ax
or eax, 0x80070000
mov edx, esi
mov dword [esi + 0x20], eax
mov ecx, ebx
call fcn.37a97fe0
inc dword [edi + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret