Function at 0x494180
Capabilities:
Create tcp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
sub esp, 0x2c
mov eax, dword [0x596fb8]
xor eax, esp
mov dword [esp + 0x28], eax
push esi
push edi
mov esi, ecx
call fcn.00493420
xor edi, edi
cmp dword [esi + 0xb4], edi
jne 0x494365
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x180], eax
je 0x494357
push 4
lea ecx, [esp + 0xc]
push ecx
push 1
push 0xffff
push eax
mov dword [esp + 0x1c], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [0x59812c]
mov eax, dword [edx + 0x10]
mov ecx, dword [esi + 0x180]
push 0x28
push 0x402
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
xor eax, eax
mov dword [esp + 0x10], eax
push 0x10
mov dword [esp + 0x18], eax
lea edx, [esp + 0x14]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x180]
push edx
push eax
mov word [esp + 0x1c], 2
mov dword [esp + 0x20], edi
mov word [esp + 0x1e], di
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x494349
mov ecx, dword [esi + 0x180]
push closesocket
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x49433b
mov ecx, dword [esi + 8]
mov edi, dword [sym.imp.WS2_32.dll_getsockname]
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x14]
push eax
push ecx
mov dword [esp + 0x14], 0x10
call edi
cmp eax, 0xffffffff
je 0x49432d
mov ax, word [esp + 0x10]
cmp ax, 2
jne 0x494322
mov ecx, dword [esi + 0x180]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x24]
push eax
push ecx
mov dword [esp + 0x18], 0x10
call edi
cmp eax, 0xffffffff
je 0x494314
mov ax, word [esp + 0x20]
cmp ax, 2
jne 0x494309
movzx eax, word [esp + 0x22]
movzx ecx, byte [esp + 0x16]
mov edx, eax
shr edx, 8
push edx
movzx edx, byte [esp + 0x19]
and eax, 0xff
push eax
movzx eax, byte [esp + 0x1f]
push eax
movzx eax, byte [esp + 0x20]
push ecx
push edx
push eax
push str.227_Entering_Passive_Mode.___d__d__d__d__d__d__r_n
mov ecx, esi
mov dword [esi + 0x178], 2
call fcn.00492d00
add esp, 0x1c
pop edi
pop esi
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.0054962d
add esp, 0x2c
ret
movsx ecx, ax
push ecx
push str.500_Failed_to_enter_passive_mode__invalid_pasv_family__d_r_n
jmp 0x494371
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.500_Failed_to_enter_passive_mode__pasv_getsockname_error__d_r_n
jmp 0x494371
movsx edx, ax
push edx
push str.500_Failed_to_enter_passive_mode__invalid_control_family__d_r_n
jmp 0x494371
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.500_Failed_to_enter_passive_mode__control_getsockname_error__d_r_n
jmp 0x494371
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.500_Failed_to_enter_passive_mode__listen_error__d_r_n
jmp 0x494371
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.500_Failed_to_enter_passive_mode__bind_error__d_r_n
jmp 0x494371
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.500_Failed_to_enter_passive_mode__socket_error__d._r_n
jmp 0x494371
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.500_PASV_is_not_available_when_using_IPv6__please_use_IPv4_or_EPSV._r_n
mov ecx, esi
call fcn.00492d00
add esp, 8
call fcn.00493420
mov ecx, dword [esp + 0x30]
pop edi
pop esi
xor ecx, esp
call fcn.0054962d
add esp, 0x2c
ret