Function at 0x10038170
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c2c68
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [0x100f7084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x26c], 0xffffffff
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x26c], eax
cmp dword [ebp - 0x26c], 0xffffffff
jne 0x100381cc
jmp 0x100384e4
mov dword [ebp - 0x280], 1
lea eax, [ebp - 0x280]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x26c]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x100381f9
jmp 0x100384e4
xor edx, edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], edx
mov eax, 2
mov word [ebp - 0x20], ax
push 0x1bb
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
lea ecx, [ebp + 8]
call fcn.10007050
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x278], 0
jne 0x10038242
jmp 0x100384e4
mov ecx, dword [ebp - 0x278]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [ebp - 0x38]
call fcn.10005de0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.10007050
push eax
lea ecx, [ebp - 0x50]
call fcn.10005de0
mov byte [ebp - 4], 2
lea edx, [ebp - 0x50]
push edx
call fcn.1002bbb0
add esp, 4
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x50]
call fcn.10005f30
push 0x10
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x26c]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x100382c9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x100382c9
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.10005f30
jmp 0x100384e4
mov dword [ebp - 0x298], 3
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x270], 0
jmp 0x10038302
mov edx, dword [ebp - 0x270]
add edx, 1
mov dword [ebp - 0x270], edx
mov eax, dword [ebp - 0x270]
cmp eax, dword [ebp - 0x258]
jae 0x10038329
mov ecx, dword [ebp - 0x270]
mov edx, dword [ebp + ecx*4 - 0x254]
cmp edx, dword [ebp - 0x26c]
jne 0x10038327
jmp 0x10038329
jmp 0x100382f3
mov eax, dword [ebp - 0x270]
cmp eax, dword [ebp - 0x258]
jne 0x10038362
cmp dword [ebp - 0x258], 0x40
jae 0x10038362
mov ecx, dword [ebp - 0x270]
mov edx, dword [ebp - 0x26c]
mov dword [ebp + ecx*4 - 0x254], edx
mov eax, dword [ebp - 0x258]
add eax, 1
mov dword [ebp - 0x258], eax
xor ecx, ecx
jne 0x100382e7
mov dword [ebp - 0x154], 0
mov dword [ebp - 0x274], 0
jmp 0x1003838b
mov edx, dword [ebp - 0x274]
add edx, 1
mov dword [ebp - 0x274], edx
mov eax, dword [ebp - 0x274]
cmp eax, dword [ebp - 0x154]
jae 0x100383b2
mov ecx, dword [ebp - 0x274]
mov edx, dword [ebp + ecx*4 - 0x150]
cmp edx, dword [ebp - 0x26c]
jne 0x100383b0
jmp 0x100383b2
jmp 0x1003837c
mov eax, dword [ebp - 0x274]
cmp eax, dword [ebp - 0x154]
jne 0x100383eb
cmp dword [ebp - 0x154], 0x40
jae 0x100383eb
mov ecx, dword [ebp - 0x274]
mov edx, dword [ebp - 0x26c]
mov dword [ebp + ecx*4 - 0x150], edx
mov eax, dword [ebp - 0x154]
add eax, 1
mov dword [ebp - 0x154], eax
xor ecx, ecx
jne 0x10038370
lea edx, [ebp - 0x298]
push edx
push 0
lea eax, [ebp - 0x154]
push eax
lea ecx, [ebp - 0x258]
push ecx
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x284], eax
cmp dword [ebp - 0x284], 0
jg 0x1003842e
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.10005f30
jmp 0x100384e4
mov dword [ebp - 0x288], 0x10
lea edx, [ebp - 0x288]
push edx
lea eax, [ebp - 0x268]
push eax
mov ecx, dword [ebp - 0x26c]
push ecx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x10038466
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.10005f30
jmp 0x100384e4
cmp dword [ebp + 0x20], 0
je 0x10038477
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp - 0x264]
mov dword [edx], eax
mov ecx, dword [ebp - 0x264]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov dword [ebp - 0x27c], eax
cmp dword [ebp - 0x27c], 0
je 0x100384a2
mov edx, dword [ebp - 0x27c]
push edx
mov ecx, dword [ebp + 0x24]
call fcn.10007f70
mov eax, dword [ebp - 0x26c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x28c], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.10005f30
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10005f30
mov eax, dword [ebp - 0x28c]
jmp 0x10038519
cmp dword [ebp - 0x26c], 0xffffffff
je 0x100384fa
mov edx, dword [ebp - 0x26c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x290], 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10005f30
mov eax, dword [ebp - 0x290]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10086b0f
mov esp, ebp
pop ebp
ret