Function at 0x458e80
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46a69a
mov eax, dword fs:[0]
push eax
sub esp, 0x1f8
mov eax, dword [0x48948c]
xor eax, ebp
mov dword [ebp - 0x60], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1f4], ecx
mov dword [ebp - 0x10], 0
push 0x20
push 0
lea eax, [ebp - 0x5c]
push eax
call fcn.00431a40
add esp, 0xc
mov ecx, dword [ebp - 0x1f4]
cmp dword [ecx + 0x48], 1
je 0x458ee0
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x40], 1
jne 0x458ee7
mov dword [ebp - 0x5c], 1
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x40]
mov dword [ebp - 0x1f8], ecx
cmp dword [ebp - 0x1f8], 0
je 0x458f0a
cmp dword [ebp - 0x1f8], 1
je 0x458f13
jmp 0x458f1c
mov dword [ebp - 0x54], 1
jmp 0x458f6c
mov dword [ebp - 0x54], 2
jmp 0x458f6c
push str.Socket::initSocket:_bad_protocol
lea ecx, [ebp - 0xcc]
call fcn.0040cd80
mov dword [ebp - 4], 0
push 0
lea edx, [ebp - 0xcc]
push edx
push 0
lea ecx, [ebp - 0xb0]
call fcn.004190d0
push 0x48231c
lea eax, [ebp - 0xb0]
push eax
call fcn.00439440
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xcc]
call fcn.0040dc10
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x44]
mov dword [ebp - 0x1fc], edx
cmp dword [ebp - 0x1fc], 0
je 0x458f98
cmp dword [ebp - 0x1fc], 1
je 0x458fa1
cmp dword [ebp - 0x1fc], 2
je 0x458faa
jmp 0x458fb3
mov dword [ebp - 0x58], 2
jmp 0x459003
mov dword [ebp - 0x58], 0x17
jmp 0x459003
mov dword [ebp - 0x58], 0
jmp 0x459003
push str.Socket::initSocket:_bad_ip_version_parameter
lea ecx, [ebp - 0x10c]
call fcn.0040cd80
mov dword [ebp - 4], 1
push 0
lea eax, [ebp - 0x10c]
push eax
push 1
lea ecx, [ebp - 0xf0]
call fcn.004190d0
push 0x48231c
lea ecx, [ebp - 0xf0]
push ecx
call fcn.00439440
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10c]
call fcn.0040dc10
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x48], 0
jne 0x459048
mov eax, dword [ebp - 0x1f4]
cmp dword [eax + 0x40], 0
jne 0x459048
mov ecx, dword [ebp - 0x1f4]
call fcn.0040c580
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x38]
push edx
push 0x47bc1c
push 0xa
lea eax, [ebp - 0x6c]
push eax
call fcn.0043734e
add esp, 0x10
jmp 0x4590ad
push 0x47a9cf
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x1c
call fcn.0040be70
test eax, eax
je 0x459076
push 0x47bc20
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x1c
call fcn.0040be70
test eax, eax
jne 0x45907f
mov dword [ebp - 0x14], 0
jmp 0x459090
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x1c
call fcn.0040c580
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x3c]
push edx
push 0x47bc24
push 0xa
lea eax, [ebp - 0x6c]
push eax
call fcn.0043734e
add esp, 0x10
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x5c]
push edx
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x3c], eax
push 0x458360
lea ecx, [ebp - 0x38]
call fcn.0041c800
mov dword [ebp - 4], 2
lea edx, [ebp - 0x10]
push edx
lea ecx, [ebp - 0x38]
call fcn.0041c910
cmp dword [ebp - 0x3c], 0
je 0x45913a
push str.Socket::initSocket:_Error_setting_addrInfo:
lea ecx, [ebp - 0x88]
call fcn.0040cd80
mov byte [ebp - 4], 3
call fcn.00458240
push eax
lea eax, [ebp - 0x88]
push eax
push 3
lea ecx, [ebp - 0x130]
call fcn.004190d0
push 0x48231c
lea ecx, [ebp - 0x130]
push ecx
call fcn.00439440
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x88]
call fcn.0040dc10
mov byte [ebp - 0x15], 0
movzx edx, byte [ebp - 0x15]
test edx, edx
jne 0x4593c4
cmp dword [ebp - 0x10], 0
je 0x4593c4
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x1f4]
mov dword [ecx + 0x54], eax
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x54], 0xffffffff
je 0x459366
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x48]
mov dword [ebp - 0x200], ecx
cmp dword [ebp - 0x200], 0
je 0x4591b2
cmp dword [ebp - 0x200], 1
je 0x45923f
jmp 0x459366
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x40], 1
jne 0x4591fb
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x54]
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4591f5
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x54]
push ecx
call fcn.00458370
add esp, 4
jmp 0x4591f9
mov byte [ebp - 0x15], 1
jmp 0x45923a
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
push edx
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x54]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
je 0x459228
mov byte [ebp - 0x15], 1
jmp 0x45923a
mov edx, dword [ebp - 0x1f4]
mov eax, dword [edx + 0x54]
push eax
call fcn.00458370
add esp, 4
jmp 0x459366
mov byte [ebp - 0x89], 1
push 4
lea ecx, [ebp - 0x89]
push ecx
push 1
push 6
mov edx, dword [ebp - 0x1f4]
mov eax, dword [edx + 0x54]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x4592b2
push str.Socket::initSocket:_Error_establishing_socket_options
lea ecx, [ebp - 0x170]
call fcn.0040cd80
mov byte [ebp - 4], 4
push 0
lea ecx, [ebp - 0x170]
push ecx
push 5
lea ecx, [ebp - 0x154]
call fcn.004190d0
push 0x48231c
lea edx, [ebp - 0x154]
push edx
call fcn.00439440
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x170]
call fcn.0040dc10
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x54]
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4592e9
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x54]
push ecx
call fcn.00458370
add esp, 4
jmp 0x4592ed
mov byte [ebp - 0x15], 1
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x40], 0
jne 0x459366
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x50]
push ecx
mov edx, dword [ebp - 0x1f4]
mov eax, dword [edx + 0x54]
push eax
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x459366
push str.Socket::initSocket:_could_not_start_listening
lea ecx, [ebp - 0x1b0]
call fcn.0040cd80
mov byte [ebp - 4], 5
call fcn.00458240
push eax
lea ecx, [ebp - 0x1b0]
push ecx
push 6
lea ecx, [ebp - 0x194]
call fcn.004190d0
push 0x48231c
lea edx, [ebp - 0x194]
push edx
call fcn.00439440
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1b0]
call fcn.0040dc10
movzx eax, byte [ebp - 0x15]
test eax, eax
je 0x4593b6
mov ecx, dword [ebp - 0x1f4]
cmp dword [ecx + 0x44], 2
jne 0x4593b6
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
mov dword [ebp - 0x204], eax
cmp dword [ebp - 0x204], 2
je 0x45939a
cmp dword [ebp - 0x204], 0x17
je 0x4593a9
jmp 0x4593b6
mov ecx, dword [ebp - 0x1f4]
mov dword [ecx + 0x44], 0
jmp 0x4593b6
mov edx, dword [ebp - 0x1f4]
mov dword [edx + 0x44], 1
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x1c]
mov dword [ebp - 0x10], ecx
jmp 0x45913e
movzx edx, byte [ebp - 0x15]
test edx, edx
jne 0x45941a
push str.Socket::initSocket:_error_in_socket_connection_bind
lea ecx, [ebp - 0x1f0]
call fcn.0040cd80
mov byte [ebp - 4], 6
call fcn.00458240
push eax
lea eax, [ebp - 0x1f0]
push eax
push 7
lea ecx, [ebp - 0x1d4]
call fcn.004190d0
push 0x48231c
lea ecx, [ebp - 0x1d4]
push ecx
call fcn.00439440
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1f0]
call fcn.0040dc10
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x3c], 0
jne 0x459441
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x54]
push ecx
call fcn.00458970
add esp, 4
mov edx, dword [ebp - 0x1f4]
mov dword [edx + 0x3c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.0041c830
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x60]
xor ecx, ebp
call fcn.004314f7
mov esp, ebp
pop ebp
ret