Function at 0x10023a90
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Set socket configuration

Disassembly:
sub esp, 0x298
mov eax, dword [0x100a7914]
xor eax, esp
mov dword [esp + 0x294], eax
lea eax, [esp + 4]
push eax
push 0x202
mov dword [esp + 8], 0x186a0
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x1002372d
mov eax, dword [esp + 4]
cmp al, 2
jne 0x10023727
shr eax, 8
cmp al, 2
jne 0x10023727
push ebp
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
or ebp, 0xffffffff
mov dword [0x1005d330], eax
cmp eax, ebp
jne 0x100234ad
lea eax, [ebp + 2]
pop ebp
mov ecx, dword [esp + 0x294]
xor ecx, esp
call fcn.10029d6b
add esp, 0x298
ret
push esi
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push edi
push 4
lea ecx, [esp + 0x10]
push ecx
push 0x1005
push 0xffff
push eax
call esi
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, ebp
jne 0x100234e0
call edi
cmp eax, 0x2733
jne 0x100236f2
mov ecx, dword [0x1005d330]
push 4
lea eax, [esp + 0x10]
push eax
push 0x1006
push 0xffff
push ecx
call esi
cmp eax, ebp
jne 0x1002350b
call edi
cmp eax, 0x2733
jne 0x100236f2
xor eax, eax
mov dword [0x100bbf70], eax
mov dword [0x100bbf74], eax
mov dword [0x100bbf78], eax
mov dword [0x100bbf7c], eax
mov eax, dword [0x100a9e10]
mov ecx, 2
push eax
mov dword [0x1005d334], eax
mov word [0x100bbf70], cx
call dword [sym.imp.WS2_32.dll_htonl]
movzx edx, word [0x1005d338]
push edx
mov dword [0x100bbf74], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0
mov word [0x100bbf72], ax
call fcn.10001f70
add esp, 4
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x1005d330]
push 0x10
push 0x100bbf70
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, ebp
jne 0x10023590
call edi
cmp eax, 0x2733
jne 0x100236ad
mov eax, dword [0x1005d330]
push 0
push 3
lea edx, [esp + 0x1a8]
push edx
push eax
call fcn.10022a90
add esp, 0x10
test eax, eax
je 0x100236ad
cmp byte [esp + 0x1a0], 4
jne 0x100236f2
cmp byte [esp + 0x1a1], 0
jne 0x100236f2
mov al, byte [esp + 0x1a2]
test al, al
jne 0x100236b9
push 0x40
lea edx, [esp + 0x1a4]
push 0
push edx
call fcn.10029e70
mov ecx, dword [0x100bbf6c]
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
and ecx, 0x800000ff
mov byte [esp + 0x1ac], 4
mov byte [esp + 0x1ad], 1
mov byte [esp + 0x1ae], 0
mov byte [esp + 0x1af], al
jns 0x10023631
dec ecx
or ecx, 0xffffff00
inc ecx
push 0
push 5
lea eax, [esp + 0x1b4]
mov byte [esp + 0x1b8], cl
mov ecx, dword [0x1005d330]
push eax
push ecx
call fcn.10022af0
add esp, 0x1c
test eax, eax
mov eax, dword [0x1005d330]
je 0x100236b6
push 0
push 3
lea edx, [esp + 0x1a8]
push edx
push eax
call fcn.10022a90
add esp, 0x10
test eax, eax
je 0x100236f2
cmp byte [esp + 0x1a0], 4
jne 0x100236ad
cmp byte [esp + 0x1a1], 2
jne 0x100236ad
cmp byte [esp + 0x1a2], 0
jne 0x100236ad
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x294]
xor ecx, esp
call fcn.10029d6b
add esp, 0x298
ret
mov ecx, dword [0x1005d330]
push ecx
jmp 0x100236f9
push eax
jmp 0x100236f9
cmp al, 1
jne 0x100236f2
mov ecx, dword [0x1005d330]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call fcn.100231a0
pop edi
pop esi
mov dword [0x1005d330], ebp
mov eax, 2
pop ebp
mov ecx, dword [esp + 0x294]
xor ecx, esp
call fcn.10029d6b
add esp, 0x298
ret
mov edx, dword [0x1005d330]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call fcn.100231a0
pop edi
pop esi
mov dword [0x1005d330], ebp
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x294]
xor ecx, esp
call fcn.10029d6b
add esp, 0x298
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x294]
xor ecx, esp
mov eax, 1
call fcn.10029d6b
add esp, 0x298
ret
sub esp, 0x29c
mov eax, dword [0x100a7914]
xor eax, esp
mov dword [esp + 0x298], eax
lea eax, [esp + 8]
push eax
push 0x202
mov dword [esp + 0xc], 0x186a0
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [esp], eax
test eax, eax
jne 0x10023a68
mov eax, dword [esp + 8]
cmp al, 2
jne 0x10023a62
shr eax, 8
cmp al, 2
jne 0x10023a62
push ebp
push 6
push 1
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
or ebp, 0xffffffff
mov dword [0x1005d330], eax
cmp eax, ebp
jne 0x100237d0
lea eax, [ebp + 2]
pop ebp
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.10029d6b
add esp, 0x29c
ret
push esi
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push edi
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1005
push 0xffff
push eax
call esi
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, ebp
jne 0x10023803
call edi
cmp eax, 0x2733
jne 0x10023a2d
mov ecx, dword [0x1005d330]
push 4
lea eax, [esp + 0x14]
push eax
push 0x1006
push 0xffff
push ecx
call esi
cmp eax, ebp
jne 0x1002382e
call edi
cmp eax, 0x2733
jne 0x10023a2d
xor eax, eax
lea ecx, [esp + 0xc]
push ecx
push 0x100bbf50
mov dword [0x100bbf50], eax
mov dword [0x100bbf54], eax
mov dword [0x100bbf58], eax
mov dword [0x100bbf5c], eax
mov dword [0x100bbf60], eax
mov dword [0x100bbf64], eax
mov dword [0x100bbf68], eax
mov eax, 0x17
push 0
push eax
push 0x100a9810
mov dword [esp + 0x20], 0x1c
mov word [0x100bbf50], ax
call dword [sym.imp.WS2_32.dll_WSAStringToAddressA]
movzx edx, word [0x1005d338]
push edx
call dword [sym.imp.WS2_32.dll_htons]
push 2
mov word [0x100bbf52], ax
call fcn.10001f70
add esp, 4
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x1005d330]
push 0x1c
push 0x100bbf50
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, ebp
jne 0x100238cb
call edi
cmp eax, 0x2733
jne 0x100239e8
mov eax, dword [0x1005d330]
push 0
push 3
lea edx, [esp + 0x1ac]
push edx
push eax
call fcn.10022a90
add esp, 0x10
test eax, eax
je 0x100239e8
cmp byte [esp + 0x1a4], 4
jne 0x10023a2d
cmp byte [esp + 0x1a5], 0
jne 0x10023a2d
mov al, byte [esp + 0x1a6]
test al, al
jne 0x100239f4
push 0x40
lea edx, [esp + 0x1a8]
push 0
push edx
call fcn.10029e70
mov ecx, dword [0x100bbf6c]
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
and ecx, 0x800000ff
mov byte [esp + 0x1b0], 4
mov byte [esp + 0x1b1], 1
mov byte [esp + 0x1b2], 0
mov byte [esp + 0x1b3], al
jns 0x1002396c
dec ecx
or ecx, 0xffffff00
inc ecx
push 0
push 5
lea eax, [esp + 0x1b8]
mov byte [esp + 0x1bc], cl
mov ecx, dword [0x1005d330]
push eax
push ecx
call fcn.10022af0
add esp, 0x1c
test eax, eax
mov eax, dword [0x1005d330]
je 0x100239f1
push 0
push 3
lea edx, [esp + 0x1ac]
push edx
push eax
call fcn.10022a90
add esp, 0x10
test eax, eax
je 0x10023a2d
cmp byte [esp + 0x1a4], 4
jne 0x100239e8
cmp byte [esp + 0x1a5], 2
jne 0x100239e8
cmp byte [esp + 0x1a6], 0
jne 0x100239e8
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.10029d6b
add esp, 0x29c
ret
mov ecx, dword [0x1005d330]
push ecx
jmp 0x10023a34
push eax
jmp 0x10023a34
cmp al, 1
jne 0x10023a2d
mov ecx, dword [0x1005d330]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call fcn.100231a0
pop edi
pop esi
mov dword [0x1005d330], ebp
mov eax, 2
pop ebp
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.10029d6b
add esp, 0x29c
ret
mov edx, dword [0x1005d330]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call fcn.100231a0
pop edi
pop esi
mov dword [0x1005d330], ebp
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.10029d6b
add esp, 0x29c
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x298]
xor ecx, esp
mov eax, 1
call fcn.10029d6b
add esp, 0x29c
ret
mov eax, dword [esp + 4]
mov dword [0x100bbf6c], eax
call fcn.10022ba0
mov ecx, eax
mov eax, 1
cmp dword [ecx + 0xe1c], eax
jne 0x10023ad4
cmp dword [0x100a9e10], 0
je 0x10023af4
cmp dword [0x1005d330], 0xffffffff
jne 0x10023af2
call fcn.100231a0
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10023430
cmp dword [0x1005d330], 0xffffffff
jne 0x10023af2
call fcn.100231a0
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10023750
xor eax, eax
ret