Function at 0x4167f0
Capabilities:
Create tcp socket
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x198
push esi
push edi
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov esi, eax
jne 0x416870
lea eax, [esp + 0x20]
push pe_nt_image_headers32
push eax
mov ecx, dword [0x438580]
push 0x36f8
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.0041a600
lea ecx, [esp + 0x28]
add esp, 8
push eax
push ecx
lea eax, [esp + 0xa8]
push str.___s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0xb0]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
mov eax, 0xffffffff
pop edi
pop esi
add esp, 0x198
ret
push 0
call sub.WSOCK32.dll_htons
mov word [0x437342], ax
push 0x10
mov dword [0x437344], 0
mov word [0x437340], 2
push 0x437340
push esi
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x41690e
lea eax, [esp + 0x20]
push pe_nt_image_headers32
push eax
mov ecx, dword [0x438580]
push 0x36f7
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.0041a600
lea ecx, [esp + 0x28]
add esp, 8
push eax
push ecx
lea eax, [esp + 0xa8]
push str.___s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0xb0]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0xffffffff
pop edi
pop esi
add esp, 0x198
ret
mov dword [esp + 8], 0x10
lea eax, [esp + 8]
push eax
push 0x437340
push esi
call sub.WSOCK32.dll_getsockname
test eax, eax
jge 0x416996
lea eax, [esp + 0x20]
push pe_nt_image_headers32
push eax
mov ecx, dword [0x438580]
push 0x36ff
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.0041a600
lea ecx, [esp + 0x28]
add esp, 8
push eax
push ecx
lea eax, [esp + 0xa8]
push str.___s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0xb0]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0xffffffff
pop edi
pop esi
add esp, 0x198
ret
push 1
push esi
call sub.WSOCK32.dll_listen
test eax, eax
je 0x416a0e
lea eax, [esp + 0x20]
push pe_nt_image_headers32
push eax
mov ecx, dword [0x438580]
push 0x36fd
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.0041a600
lea ecx, [esp + 0x28]
add esp, 8
push eax
push ecx
lea eax, [esp + 0xa8]
push str.___s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0xb0]
add esp, 0x10
push ecx
call fcn.0040cf20
add esp, 4
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0xffffffff
pop edi
pop esi
add esp, 0x198
ret
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
mov edi, dword [esp + 0x1a4]
push eax
mov dword [esp + 0x10], 0x10
push ecx
push edi
call sub.WSOCK32.dll_getsockname
cmp eax, 0xffffffff
jne 0x416a45
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.getsockname
call fcn.0041a860
add esp, 8
cmp byte [esp + 0x14], 0
lea eax, [esp + 0x14]
jne 0x416a55
mov eax, 0x437344
xor ecx, ecx
mov cl, byte [0x437343]
push ecx
xor ecx, ecx
mov cl, byte [0x437342]
push ecx
xor ecx, ecx
mov cl, byte [eax + 3]
push ecx
xor ecx, ecx
mov cl, byte [eax + 2]
push ecx
xor ecx, ecx
mov cl, byte [eax + 1]
push ecx
xor ecx, ecx
mov cl, byte [eax]
push ecx
push str.PORT__d__d__d__d__d__d
push edi
call fcn.00415e20
add esp, 0x20
cmp eax, 2
je 0x416add
lea eax, [esp + 0x20]
push pe_nt_image_headers32
push eax
mov ecx, dword [0x438580]
push 0x36fe
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [esp + 0x20]
push ecx
push str.___s
call fcn.0040cf50
add esp, 8
push 1
call fcn.0040bb30
add esp, 4
push esi
call sub.WSOCK32.dll_closesocket
mov eax, 0xffffffff
pop edi
pop esi
add esp, 0x198
ret
mov eax, esi
pop edi
pop esi
add esp, 0x198
ret