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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469f0a
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.00431910
add esp, 0xc
mov ecx, dword [ebp - 0x1f4]
cmp dword [ecx + 0x48], 1
je 0x458690
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x40], 1
jne 0x458697
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 0x4586ba
cmp dword [ebp - 0x1f8], 1
je 0x4586c3
jmp 0x4586cc
mov dword [ebp - 0x54], 1
jmp 0x45871c
mov dword [ebp - 0x54], 2
jmp 0x45871c
push str.Socket::initSocket:_bad_protocol
lea ecx, [ebp - 0xcc]
call fcn.0040d100
mov dword [ebp - 4], 0
push 0
lea edx, [ebp - 0xcc]
push edx
push 0
lea ecx, [ebp - 0xb0]
call fcn.004195d0
push 0x4823fc
lea eax, [ebp - 0xb0]
push eax
call fcn.00439310
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xcc]
call fcn.0040df60
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x44]
mov dword [ebp - 0x1fc], edx
cmp dword [ebp - 0x1fc], 0
je 0x458748
cmp dword [ebp - 0x1fc], 1
je 0x458751
cmp dword [ebp - 0x1fc], 2
je 0x45875a
jmp 0x458763
mov dword [ebp - 0x58], 2
jmp 0x4587b3
mov dword [ebp - 0x58], 0x17
jmp 0x4587b3
mov dword [ebp - 0x58], 0
jmp 0x4587b3
push str.Socket::initSocket:_bad_ip_version_parameter
lea ecx, [ebp - 0x10c]
call fcn.0040d100
mov dword [ebp - 4], 1
push 0
lea eax, [ebp - 0x10c]
push eax
push 1
lea ecx, [ebp - 0xf0]
call fcn.004195d0
push 0x4823fc
lea ecx, [ebp - 0xf0]
push ecx
call fcn.00439310
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10c]
call fcn.0040df60
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x48], 0
jne 0x4587f8
mov eax, dword [ebp - 0x1f4]
cmp dword [eax + 0x40], 0
jne 0x4587f8
mov ecx, dword [ebp - 0x1f4]
call fcn.0040c940
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x38]
push edx
push 0x47bd2c
push 0xa
lea eax, [ebp - 0x6c]
push eax
call fcn.0043721e
add esp, 0x10
jmp 0x45885d
push 0x47aadf
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x1c
call fcn.0040c1c0
test eax, eax
je 0x458826
push 0x47bd30
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x1c
call fcn.0040c1c0
test eax, eax
jne 0x45882f
mov dword [ebp - 0x14], 0
jmp 0x458840
mov ecx, dword [ebp - 0x1f4]
add ecx, 0x1c
call fcn.0040c940
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x1f4]
mov edx, dword [ecx + 0x3c]
push edx
push 0x47bd34
push 0xa
lea eax, [ebp - 0x6c]
push eax
call fcn.0043721e
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 0x457b10
lea ecx, [ebp - 0x38]
call fcn.0041cef0
mov dword [ebp - 4], 2
lea edx, [ebp - 0x10]
push edx
lea ecx, [ebp - 0x38]
call fcn.0041d000
cmp dword [ebp - 0x3c], 0
je 0x4588ea
push str.Socket::initSocket:_Error_setting_addrInfo:
lea ecx, [ebp - 0x88]
call fcn.0040d100
mov byte [ebp - 4], 3
call fcn.004579f0
push eax
lea eax, [ebp - 0x88]
push eax
push 3
lea ecx, [ebp - 0x130]
call fcn.004195d0
push 0x4823fc
lea ecx, [ebp - 0x130]
push ecx
call fcn.00439310
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x88]
call fcn.0040df60
mov byte [ebp - 0x15], 0
movzx edx, byte [ebp - 0x15]
test edx, edx
jne 0x458b74
cmp dword [ebp - 0x10], 0
je 0x458b74
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 0x458b16
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x48]
mov dword [ebp - 0x200], ecx
cmp dword [ebp - 0x200], 0
je 0x458962
cmp dword [ebp - 0x200], 1
je 0x4589ef
jmp 0x458b16
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x40], 1
jne 0x4589ab
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 0x4589a5
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x54]
push ecx
call fcn.00457b20
add esp, 4
jmp 0x4589a9
mov byte [ebp - 0x15], 1
jmp 0x4589ea
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 0x4589d8
mov byte [ebp - 0x15], 1
jmp 0x4589ea
mov edx, dword [ebp - 0x1f4]
mov eax, dword [edx + 0x54]
push eax
call fcn.00457b20
add esp, 4
jmp 0x458b16
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 0x458a62
push str.Socket::initSocket:_Error_establishing_socket_options
lea ecx, [ebp - 0x170]
call fcn.0040d100
mov byte [ebp - 4], 4
push 0
lea ecx, [ebp - 0x170]
push ecx
push 5
lea ecx, [ebp - 0x154]
call fcn.004195d0
push 0x4823fc
lea edx, [ebp - 0x154]
push edx
call fcn.00439310
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x170]
call fcn.0040df60
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 0x458a99
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x54]
push ecx
call fcn.00457b20
add esp, 4
jmp 0x458a9d
mov byte [ebp - 0x15], 1
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x40], 0
jne 0x458b16
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 0x458b16
push str.Socket::initSocket:_could_not_start_listening
lea ecx, [ebp - 0x1b0]
call fcn.0040d100
mov byte [ebp - 4], 5
call fcn.004579f0
push eax
lea ecx, [ebp - 0x1b0]
push ecx
push 6
lea ecx, [ebp - 0x194]
call fcn.004195d0
push 0x4823fc
lea edx, [ebp - 0x194]
push edx
call fcn.00439310
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1b0]
call fcn.0040df60
movzx eax, byte [ebp - 0x15]
test eax, eax
je 0x458b66
mov ecx, dword [ebp - 0x1f4]
cmp dword [ecx + 0x44], 2
jne 0x458b66
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
mov dword [ebp - 0x204], eax
cmp dword [ebp - 0x204], 2
je 0x458b4a
cmp dword [ebp - 0x204], 0x17
je 0x458b59
jmp 0x458b66
mov ecx, dword [ebp - 0x1f4]
mov dword [ecx + 0x44], 0
jmp 0x458b66
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 0x4588ee
movzx edx, byte [ebp - 0x15]
test edx, edx
jne 0x458bca
push str.Socket::initSocket:_error_in_socket_connection_bind
lea ecx, [ebp - 0x1f0]
call fcn.0040d100
mov byte [ebp - 4], 6
call fcn.004579f0
push eax
lea eax, [ebp - 0x1f0]
push eax
push 7
lea ecx, [ebp - 0x1d4]
call fcn.004195d0
push 0x4823fc
lea ecx, [ebp - 0x1d4]
push ecx
call fcn.00439310
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1f0]
call fcn.0040df60
mov edx, dword [ebp - 0x1f4]
cmp dword [edx + 0x3c], 0
jne 0x458bf1
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax + 0x54]
push ecx
call fcn.00458120
add esp, 4
mov edx, dword [ebp - 0x1f4]
mov dword [edx + 0x3c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.0041cf20
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x60]
xor ecx, ebp
call fcn.004313c7
mov esp, ebp
pop ebp
ret