Function at 0x413a80
Capabilities:
Get local ipv4 addresses
Get socket information
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x470ede
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x491d58]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, 1
mov esi, ecx
mov dword [ebp - 0x140], edi
mov dword [ebp - 0x13c], 3
mov dword [ebp - 0x134], 0x7d0
mov dword [ebp - 0x138], 0xafc8
call fcn.00417100
mov edx, dword [eax]
mov edx, dword [edx + 8]
lea ecx, [ebp - 0x140]
push ecx
push 0xa
xor ebx, ebx
push ebx
push ecx
push 0x4951a8
mov ecx, eax
call edx
call fcn.00417100
mov edx, dword [eax]
mov edx, dword [edx + 8]
lea ecx, [ebp - 0x13c]
push ecx
push 0x18
push ebx
push ecx
push 0x4951c4
mov ecx, eax
call edx
call fcn.00417100
mov edx, dword [eax]
mov edx, dword [edx + 8]
lea ecx, [ebp - 0x134]
push ecx
push 0xea60
push ebx
push ecx
push 0x4951e0
mov ecx, eax
call edx
call fcn.00417100
mov edx, dword [eax]
mov edx, dword [edx + 8]
lea ecx, [ebp - 0x138]
push ecx
push 0xea60
push ebx
push ecx
push 0x4951fc
mov ecx, eax
call edx
mov eax, dword [ebp - 0x140]
mov ecx, dword [ebp - 0x13c]
mov edx, dword [ebp - 0x134]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x138]
mov dword [esi + 0x24], ecx
mov dword [esi + 0x28], edx
mov dword [esi + 0x2c], eax
mov eax, 7
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x120], esi
mov dword [ebp - 0x58], vtable.LogItem.0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ebx
mov word [ebp - 0x54], cx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], dx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], ebx
push str._INF___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], 2
call fcn.00403090
lea ecx, [ebp - 0x120]
push ecx
mov dword [eax + 0x3c], ebx
mov ecx, eax
call fcn.00402fa0
push str.Socket_server_initialize_called._Initializing_Winsock
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 0xffffffff
call fcn.00402d10
lea edx, [esi + 0x40]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor edx, edx
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x120], esi
mov dword [ebp - 0x58], vtable.LogItem.0
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x1c], edi
cmp eax, ebx
je 0x413cb1
mov eax, 7
xor ecx, ecx
mov dword [ebp - 0x40], eax
mov word [ebp - 0x54], cx
mov dword [ebp - 0x24], eax
mov word [ebp - 0x38], dx
mov dword [ebp - 4], edi
push str._ERR___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], 3
call fcn.00403090
lea ecx, [ebp - 0x120]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
lea edx, [ebp - 0x124]
push edx
push str.WSAStartup_failed:
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
mov ecx, eax
call fcn.00402fa0
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 0xffffffff
call fcn.00402d10
mov eax, dword [ebp - 0x124]
jmp 0x414521
mov ecx, 7
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x24], ecx
mov eax, 2
xor ecx, ecx
mov dword [ebp - 0x164], ebx
mov dword [ebp - 0x160], ebx
mov dword [ebp - 0x15c], ebx
mov dword [ebp - 0x158], ebx
mov dword [ebp - 0x154], ebx
mov dword [ebp - 0x150], ebx
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x160], eax
mov dword [ebp - 0x15c], edi
mov dword [ebp - 0x158], 6
mov dword [ebp - 0x164], edi
mov word [ebp - 0x54], dx
mov word [ebp - 0x38], cx
mov dword [ebp - 4], eax
push str._DBG___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], edi
call fcn.00403090
lea edx, [ebp - 0x120]
push edx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
push str.Resolving_the_local_address_and_port_to_be_used_by_the_server
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], 0xffffffff
call fcn.00402d10
mov dword [ebp - 0x130], ebx
mov dword [ebp - 0x12c], ebx
mov dword [ebp - 4], 3
cmp dword [0x49488c], 0x10
mov eax, dword [0x494878]
mov dword [ebp - 0x120], ebx
jae 0x413d91
mov eax, 0x494878
lea ecx, [ebp - 0x120]
push ecx
lea edx, [ebp - 0x164]
push edx
push ebx
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x124], eax
cmp eax, ebx
je 0x413e4b
mov eax, 7
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x58], vtable.LogItem.0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ebx
mov word [ebp - 0x54], cx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], dx
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 4
push str._ERR___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], 3
call fcn.00403090
lea ecx, [ebp - 0x11c]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
lea edx, [ebp - 0x124]
push edx
push str.getaddrinfo_failed:
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
mov ecx, eax
call fcn.00402fa0
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.00402d10
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x414521
mov eax, dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov ecx, dword [ebp - 0x120]
lea edi, [ebp - 0x130]
call fcn.0041a380
mov eax, 7
xor ecx, ecx
xor edx, edx
mov edi, 1
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x58], vtable.LogItem.0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ebx
mov word [ebp - 0x54], cx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], dx
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 5
push str._DBG___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], edi
call fcn.00403090
lea ecx, [ebp - 0x11c]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
push str.Creating_a_SOCKET_for_the_server_to_listen_for_client_connections
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.00402d10
mov eax, dword [ebp - 0x130]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 4]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x1d0], eax
cmp eax, 0xffffffff
jne 0x413fbe
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x120], eax
mov eax, 7
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x58], vtable.LogItem.0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ebx
mov word [ebp - 0x54], cx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], dx
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 6
push str._ERR___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], 3
call fcn.00403090
lea ecx, [ebp - 0x11c]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
lea edx, [ebp - 0x120]
push edx
push str.Error_at_socket__:
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
mov ecx, eax
call fcn.00402fa0
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.00402d10
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x130]
mov dword [ebp - 4], 0xffffffff
call fcn.00416ce0
mov eax, esi
jmp 0x414521
mov eax, 7
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x58], vtable.LogItem.0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], ebx
mov word [ebp - 0x54], cx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], dx
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], al
push str._DBG___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], edi
call fcn.00403090
lea ecx, [ebp - 0x11c]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
push str.Setting_socket_I_O_mode_to_non_blocking
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.00402d10
mov eax, dword [esi + 0x1d0]
lea edx, [ebp - 0x144]
push edx
push 0x8004667e
push eax
mov dword [ebp - 0x144], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x124], eax
cmp eax, ebx
mov eax, 7
mov dword [ebp - 0x11c], esi
mov dword [ebp - 0x58], vtable.LogItem.0
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x1c], edi
mov word [ebp - 0x54], cx
mov word [ebp - 0x38], dx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x24], eax
je 0x4140c6
mov byte [ebp - 4], 8
push str._ERR___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], 3
call fcn.00403090
lea ecx, [ebp - 0x11c]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
lea edx, [ebp - 0x124]
push edx
push str.ioctlsocket_failed_with_error:
jmp 0x413f74
mov byte [ebp - 4], 9
push str._DBG___0x
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x18], edi
call fcn.00403090
lea ecx, [ebp - 0x11c]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
push str.Binding_local_address_with_a_socket
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 3
call fcn.00402d10
mov eax, dword [ebp - 0x130]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x18]
mov ecx, dword [esi + 0x1d0]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4141ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x120], eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x11c], esi
call fcn.00402bb0
mov byte [ebp - 4], 0xa
push str._ERR___0x
mov ecx, eax
mov dword [eax + 0x40], 3
call fcn.00403090
lea edx, [ebp - 0x11c]
push edx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
lea ecx, [ebp - 0x120]
push ecx
push str.bind_failed_with_error:
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
mov ecx, eax
call fcn.00402fa0
lea ecx, [ebp - 0xb0]
jmp 0x413f94
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x11c], esi
call fcn.00402bb0
mov byte [ebp - 4], 0xb
push str._DBG___0x
mov ecx, eax
mov dword [eax + 0x40], edi
call fcn.00403090
lea edx, [ebp - 0x11c]
push edx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
push str.Retrieving_dynamically_assigned_port_and_storing_it_in_Windows_Registry
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 3
call fcn.00402d10
mov edx, dword [esi + 0x1d0]
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x68]
push ecx
push edx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x11c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x414292
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x124], eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x120], esi
call fcn.00402bb0
mov byte [ebp - 4], 0xc
push str._ERR___0x
mov ecx, eax
mov dword [eax + 0x40], 3
call fcn.00403090
lea ecx, [ebp - 0x120]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
lea edx, [ebp - 0x124]
push edx
push str.getsockname_failed_with_error:
jmp 0x414183
mov eax, dword [ebp - 0x66]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
movzx ecx, ax
mov dword [ebp - 0x124], eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x128], ecx
mov dword [ebp - 0x120], esi
call fcn.00402bb0
mov byte [ebp - 4], 0xd
push str._INF___0x
mov ecx, eax
mov dword [eax + 0x40], 2
call fcn.00403090
lea edx, [ebp - 0x120]
push edx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
lea ecx, [ebp - 0x124]
push ecx
push str.Socket_bound__listening_on_port:
push 0x48176c
push str.SocketHeciServer::SocketServer::InitializeInternal
push 0x481978
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
mov ecx, eax
call fcn.00403090
mov ecx, eax
call fcn.00403090
mov ecx, eax
call fcn.00410aa0
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 3
call fcn.00402d10
lea edx, [ebp - 0x128]
push edx
call fcn.0042dfe0
add esp, 4
test al, al
jne 0x4143a3
push str.SocketHeciServer::SocketServer::InitializeInternal
lea ecx, [ebp - 0xcc]
call fcn.004073e0
lea ebx, [ebp - 0xcc]
lea esi, [ebp - 0x58]
mov byte [ebp - 4], 0xe
call fcn.00407fd0
mov esi, vtable.Exception.0
mov dword [ebp - 0x58], esi
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0xf
call fcn.0041a3e0
push eax
lea ecx, [ebp - 0xb0]
call fcn.00402180
push 0x488f4c
lea eax, [ebp - 0xb0]
push eax
mov dword [ebp - 0xb0], esi
call fcn.00450350
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x120], esp
push 0x495234
call fcn.004073b0
lea ecx, [ebp - 0xcc]
push ecx
call fcn.004025e0
push eax
xor ecx, ecx
mov byte [ebp - 4], 0x10
call fcn.004129c0
add esp, 0x24
lea ecx, [ebp - 0xcc]
call fcn.00407f80
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x128], esi
call fcn.00402bb0
mov byte [ebp - 4], 0x11
push str._DBG___0x
mov ecx, eax
mov dword [eax + 0x40], edi
call fcn.00403090
lea edx, [ebp - 0x128]
push edx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
push str.Listen_for_incoming_connection
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 3
call fcn.00402d10
mov eax, dword [esi + 0x1d0]
push bind
push eax
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x4144aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x11c], eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x128], esi
call fcn.00402bb0
mov byte [ebp - 4], 0x12
push str._ERR___0x
mov ecx, eax
mov dword [eax + 0x40], 3
call fcn.00403090
lea ecx, [ebp - 0x128]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
lea edx, [ebp - 0x11c]
push edx
push str.Listen_failed_with_error:
jmp 0x414183
lea eax, [ebp - 0x118]
mov dword [ebp - 0x128], esi
call fcn.00402bb0
mov byte [ebp - 4], 0x13
push str._INF___0x
mov ecx, eax
mov dword [eax + 0x40], 2
call fcn.00403090
lea ecx, [ebp - 0x128]
push ecx
mov ecx, eax
mov dword [eax + 0x3c], ebx
call fcn.00402fa0
push str.Socket_server_initialization_succeded
push 0x48176c
mov ecx, eax
mov dword [eax + 0x3c], edi
call fcn.00403090
mov ecx, eax
call fcn.00403090
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 3
call fcn.00402d10
lea eax, [ebp - 0x130]
mov dword [ebp - 4], 0xffffffff
call fcn.00416ce0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044ce4c
mov esp, ebp
pop ebp
ret