Function at 0x489ca0
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
Set socket configuration
Start tcp server

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, 0x320
sub esp, 0x6c
mov edx, dword [esp + 0x80]
lea esi, [esp + 0x30]
test edx, edx
jne 0x489cd1
jmp 0x489f10
mov dword [esp], ebp
call edi
sub esp, 4
sub ebx, 1
je 0x489eb0
mov dword [esp + 0x24], 0x10
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 0
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
cmp eax, 0xffffffff
mov ebp, eax
je 0x489eb0
mov dword [esp + 0x30], 2
mov dword [esp], 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
sub esp, 4
mov dword [esp + 0x34], eax
mov dword [esp + 8], 0x10
mov dword [esp + 4], esi
mov dword [esp], ebp
call dword [sym.imp.WS2_32.dll_bind]
sub esp, 0xc
test eax, eax
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
jne 0x489cc0
mov dword [esp + 4], 1
mov dword [esp], ebp
call dword [sym.imp.WS2_32.dll_listen]
sub esp, 8
test eax, eax
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
jne 0x489cc0
lea eax, [esp + 0x24]
mov dword [esp + 4], esi
mov dword [esp], ebp
mov dword [esp + 8], eax
mov eax, dword [sym.imp.WS2_32.dll_getsockname]
mov dword [esp + 0x14], eax
call eax
sub esp, 0xc
test eax, eax
jne 0x489cc0
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x489cc0
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea edi, [esp + 0x28]
mov dword [esp + 4], 0x8004667e
mov dword [esp + 8], edi
mov dword [esp + 0x18], eax
call eax
sub esp, 0xc
test eax, eax
jne 0x489ef1
mov eax, dword [esp + 0x10]
mov dword [esp + 8], 0x10
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
test eax, eax
jne 0x489ee0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x10
mov dword [esp], ebp
mov dword [esp + 8], eax
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_accept]
sub esp, 0xc
cmp eax, 0xffffffff
je 0x489ef1
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x10
mov dword [esp + 8], eax
lea eax, [esp + 0x50]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call dword [esp + 0x14]
sub esp, 0xc
test eax, eax
mov edx, dword [esp + 0x1c]
jne 0x489e90
mov eax, dword [esp + 0x50]
cmp dword [esp + 0x40], eax
jne 0x489e90
mov eax, dword [esp + 0x54]
cmp dword [esp + 0x44], eax
je 0x489f2a
nop
mov dword [esp], edx
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
sub esp, 4
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call edi
sub esp, 4
jmp 0x489cc0
mov eax, dword [esp + 0x80]
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0xffffffff
mov dword [esp], 0x274d
call dword [sym.imp.WS2_32.dll_WSASetLastError]
xor eax, eax
sub esp, 4
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x489e17
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esp], ebp
call edi
sub esp, 4
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call edi
sub esp, 4
jmp 0x489cc8
mov dword [esp], 0x271e
call dword [sym.imp.WS2_32.dll_WSASetLastError]
sub esp, 4
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x84]
test eax, eax
je 0x489f8e
mov dword [esp + 8], edi
mov dword [esp + 4], 0x8004667e
mov dword [esp], edx
mov dword [esp + 0x14], edx
call dword [esp + 0x18]
sub esp, 0xc
test eax, eax
sete al
mov edx, dword [esp + 0x14]
test al, al
je 0x489e90
mov dword [esp + 0x14], edx
mov dword [esp], ebp
call dword [sym.imp.WS2_32.dll_closesocket]
sub esp, 4
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [eax], edx
mov dword [eax + 4], ecx
mov eax, 1
jmp 0x489ed6
lea eax, [esp + 0x2c]
mov dword [esp + 0x14], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
jmp 0x489f48