Function at 0x435590
Capabilities:
Initialize winsock library
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x491e2b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ac
push ebp
xor ebp, ebp
push edi
mov dword [esp + 0xc], ebp
mov dword [esp + 8], ebp
mov dword [esp + 0x1bc], ebp
call fcn.004348d0
cmp dword [0x4a9324], ebp
mov edi, 1
jne 0x43562a
lea eax, [esp + 0x24]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x435624
push str.WSAStartup_failed_n
push edi
call fcn.00433e50
add esp, 8
call fcn.004348d0
lea ecx, [esp + 8]
mov dword [esp + 0x1bc], 0xffffffff
call fcn.00476730
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x1ac]
mov dword fs:[0], ecx
add esp, 0x1b8
ret
mov dword [0x4a9324], edi
push ebx
push 0x400
lea ecx, [esp + 0x10]
call fcn.004762c0
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
push ecx
push edx
call fcn.004466e0
mov eax, dword [esp + 0x18]
push eax
call fcn.0044dba0
mov edx, dword [0x4aa56c]
mov ecx, dword [0x4aa45c]
push edx
mov dword [0x4a9328], eax
mov dword [0x4a9340], ecx
call fcn.0044dba0
mov dword [0x4a932c], eax
mov eax, dword [0x4aa14c]
push eax
call fcn.0044dba0
mov ecx, dword [0x4aa4e8]
push ecx
mov dword [0x4a9330], eax
call fcn.0044dba0
mov edx, dword [0x4aa54c]
add esp, 0x18
push 6
push edi
push 2
mov dword [0x4a9344], eax
mov dword [0x4a9348], edx
call dword [sym.imp.WS2_32.dll_socket]
or ebx, 0xffffffff
cmp eax, ebx
mov dword [0x4a6018], eax
jne 0x4356f8
push str.socket_failed_n
push edi
call fcn.00433e50
add esp, 8
call fcn.004348d0
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c0], ebx
call fcn.00476730
pop ebx
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x1ac]
mov dword fs:[0], ecx
add esp, 0x1b8
ret
movzx eax, word [0x4aa45c]
push esi
push eax
mov word [esp + 0x20], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [0x4a6018]
push 0x10
lea ecx, [esp + 0x20]
push ecx
push edx
mov word [esp + 0x2a], ax
mov dword [esp + 0x2c], ebp
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, ebx
jne 0x435764
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2740
jne 0x435751
push 0x30
push str.Failed_to_start_ETP_server
push str.ETP_Port_in_use.
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
call esi
push eax
push str.bind_failed__d_n
push edi
call fcn.00433e50
add esp, 0xc
jmp 0x435787
mov eax, dword [0x4a6018]
push bind
push eax
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, ebx
jne 0x4357a3
push str.listen_failed_n
push edi
call fcn.00433e50
add esp, 8
call fcn.004348d0
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c4], ebx
call fcn.00476730
xor eax, eax
jmp 0x435829
mov edx, dword [0x4a6018]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [esp + 0x1c]
push ecx
push 8
push 0xffff
push edx
mov dword [esp + 0x2c], edi
call esi
mov ecx, dword [0x4a6018]
push 4
lea eax, [esp + 0x1c]
push eax
push edi
push 0xffff
push ecx
mov dword [esp + 0x2c], edi
call esi
movsx edx, byte [0x4aa515]
mov dword [0x4a9338], edi
mov dword [0x4a934c], edx
call fcn.004333f0
cmp dword [0x4a933c], ebp
jne 0x435809
call fcn.0042cd90
mov dword [0x4a933c], edi
push str.ETP_server_online._n
push ebp
call fcn.00433e50
add esp, 8
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c4], ebx
call fcn.00476730
mov eax, edi
mov ecx, dword [esp + 0x1bc]
pop esi
pop ebx
pop edi
pop ebp
mov dword fs:[0], ecx
add esp, 0x1b8
ret