Function at 0x54ec30
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x637c48
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x70a308]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x68], esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x64], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
mov ecx, dword [esi + 0xc]
cmp ecx, ebx
je 0x54ecc4
push 1
call fcn.004376f0
test eax, eax
jne 0x54ecc4
mov ecx, dword [esi + 0xc]
cmp dword [ecx + 0x30], ebx
je 0x54ecc4
lea ecx, [ebp - 0x4c]
call fcn.004e5be0
mov byte [ebp - 4], 1
mov edx, dword [esi + 0xc]
push edx
lea ecx, [ebp - 0x4c]
call fcn.004e5c00
mov edi, eax
cmp edi, ebx
je 0x54ecb8
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x4c]
call fcn.004e5bf0
mov eax, edi
jmp 0x54f169
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.004e5bf0
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x45], 0
mov eax, dword [esi + 0x184]
cmp eax, ebx
je 0x54ece3
mov cl, byte [eax + 0x15c]
jmp 0x54ece5
xor cl, cl
mov bl, cl
mov byte [ebp - 0x4d], bl
test bl, bl
je 0x54ecf6
mov edi, dword [eax + 0x140]
jmp 0x54ed0a
mov eax, dword [esi + 0xb4]
test eax, eax
jne 0x54ed06
mov eax, dword [esi + 0xb0]
mov eax, dword [eax]
mov edi, eax
mov ecx, dword [esi + 0x9c]
test ecx, ecx
je 0x54ed19
call fcn.00554b20
push str.gethost_r_n
mov ecx, esi
call fcn.0054c540
mov ecx, dword [esi + 0xb0]
cmp byte [ecx + 0x173], 0
je 0x54ee52
cmp byte [ecx + 0x19b], 0
jne 0x54ee52
test bl, bl
je 0x54ed57
mov ecx, dword [esi + 0x184]
mov eax, dword [ecx + 0x144]
jmp 0x54ed69
mov eax, dword [esi + 0xb4]
test eax, eax
je 0x54ed66
mov eax, dword [eax + 0xc]
jmp 0x54ed69
mov eax, dword [ecx + 0x14]
lea edx, [ebp - 0x60]
push edx
lea ecx, [ebp - 0x5c]
push ecx
lea edx, [ebp - 0x54]
push edx
push eax
push edi
call fcn.0054d160
add esp, 0x14
mov ebx, eax
test ebx, ebx
je 0x54ee3d
lea ecx, [ebp - 0x4c]
call fcn.004024e0
mov byte [ebp - 4], 2
push ebx
push str.Error_code___ld_r_nChecking_IPV4_address_r_n
lea eax, [ebp - 0x4c]
push eax
call fcn.00402f60
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
push ecx
mov ecx, esi
call fcn.0054c540
push 0
lea edx, [ebp - 0x58]
push edx
push edi
mov ecx, esi
call fcn.0054ce70
mov ebx, eax
test ebx, ebx
je 0x54ee19
push edi
mov eax, dword [0x71030c]
push eax
lea ecx, [ebp - 0x4c]
push ecx
call fcn.00402f60
add esp, 0xc
push 1
mov edx, dword [ebp - 0x4c]
push edx
mov ecx, esi
call fcn.0054cc90
mov esi, dword [esi + 0x9c]
test esi, esi
je 0x54edfb
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00554e70
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.00402550
mov eax, ebx
jmp 0x54f169
mov ecx, dword [esi + 0xb0]
mov byte [ecx + 0x173], 0
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x40], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.00402550
jmp 0x54ef8c
push str.IPV6_address_found_r_n
mov ecx, esi
call fcn.0054c540
mov byte [ebp - 0x45], 1
jmp 0x54ef7f
push 0
lea eax, [ebp - 0x58]
push eax
push edi
mov ecx, esi
call fcn.0054ce70
mov ebx, eax
test ebx, ebx
je 0x54ef73
lea ecx, [ebp - 0x4c]
call fcn.004024e0
mov byte [ebp - 4], 3
push edi
mov ecx, dword [0x71030c]
push ecx
lea edx, [ebp - 0x4c]
push edx
call fcn.00402f60
add esp, 0xc
push 1
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.0054cc90
mov ecx, dword [esi + 0x9c]
test ecx, ecx
je 0x54eeaa
mov edx, dword [ebp - 0x4c]
push edx
call fcn.00554e70
push ebx
push str.Error_code___ld_r_nChecking_IPV6_address_r_n
lea eax, [ebp - 0x4c]
push eax
call fcn.00402f60
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
push ecx
mov ecx, esi
call fcn.0054c540
cmp byte [ebp - 0x4d], 0
je 0x54eedb
mov edx, dword [esi + 0x184]
mov eax, dword [edx + 0x144]
jmp 0x54eef3
mov eax, dword [esi + 0xb4]
test eax, eax
je 0x54eeea
mov eax, dword [eax + 0xc]
jmp 0x54eef3
mov eax, dword [esi + 0xb0]
mov eax, dword [eax + 0x14]
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x5c]
push edx
lea ecx, [ebp - 0x54]
push ecx
push eax
push edi
call fcn.0054d160
add esp, 0x14
mov edi, eax
test edi, edi
je 0x54ef4a
push edi
push str.Error_checking_IPV6_address__ld_r_n
lea edx, [ebp - 0x4c]
push edx
call fcn.00402f60
add esp, 0xc
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.0054c540
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.00402550
mov eax, edi
jmp 0x54f169
push str.IPV6_address_found_r_n
mov ecx, esi
call fcn.0054c540
mov ecx, dword [esi + 0xb0]
mov byte [ecx + 0x173], 1
mov byte [ebp - 0x45], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.00402550
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0x40], edx
cmp byte [ebp - 0x45], 0
je 0x54ef8c
mov eax, dword [esi + 0xb0]
mov byte [eax + 0x174], 1
mov ecx, dword [esi + 0x9c]
test ecx, ecx
je 0x54ef9b
call fcn.00554b20
mov ecx, 2
mov word [ebp - 0x44], cx
cmp byte [ebp - 0x4d], 0
je 0x54efb8
mov edx, dword [esi + 0x184]
mov eax, dword [edx + 0x144]
jmp 0x54efd0
mov eax, dword [esi + 0xb4]
test eax, eax
je 0x54efc7
mov eax, dword [eax + 0xc]
jmp 0x54efd0
mov eax, dword [esi + 0xb0]
mov eax, dword [eax + 0x14]
push eax
call sub.WS2_32.dll_htons
mov word [ebp - 0x42], ax
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x64]
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x54eff4
push eax
call sub.WS2_32.dll_closesocket
mov dword [edi], 0xffffffff
xor ebx, ebx
mov dword [ebp - 4], ebx
jmp 0x54f010
push ebx
push 1
movzx ecx, byte [ebp - 0x45]
neg ecx
sbb ecx, ecx
and ecx, 0x15
add ecx, 2
push ecx
call sub.WS2_32.dll_socket
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x54f07a
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
push edi
push str.Error_code___ld
lea edx, [ebp - 0x34]
push edx
call fcn.005fb4cb
add esp, 0xc
push 1
mov eax, dword [0x710380]
push eax
mov ecx, esi
call fcn.0054cc90
lea ecx, [ebp - 0x34]
push ecx
mov ecx, esi
call fcn.0054c540
mov edx, dword [0x710380]
push edx
mov ecx, dword [esi + 0x9c]
call fcn.00554e70
mov eax, edi
jmp 0x54f169
mov dword [ebp - 0x6c], 1
lea ecx, [ebp - 0x6c]
push ecx
push 0x8004667e
push eax
call sub.WS2_32.dll_ioctlsocket
push 1
mov edx, dword [0x7103bc]
push edx
mov ecx, esi
call fcn.0054cc90
cmp byte [ebp - 0x45], 0
je 0x54f0ae
mov ecx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x5c]
jmp 0x54f0b6
mov ecx, 0x10
lea eax, [ebp - 0x44]
push ecx
push eax
mov eax, dword [edi]
push eax
call sub.WS2_32.dll_connect
mov edi, eax
cmp edi, 0xffffffff
jne 0x54f0ce
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
mov ecx, dword [ebp - 0x54]
cmp ecx, ebx
je 0x54f0e1
mov eax, dword [0x7101ac]
cmp eax, ebx
je 0x54f0e1
push ecx
call eax
mov dword [esi + 0x388], ebx
mov dword [esi + 0x38c], ebx
mov ecx, esi
call fcn.0054c710
movzx ecx, byte [ebp - 0x4d]
neg ecx
sbb ecx, ecx
and ecx, 0x1b
inc ecx
mov dword [esi + 0x8c], ecx
mov byte [esi + 0x3d9], 0
mov byte [esi + 0x3da], 0
push 0x64f8bc
lea ecx, [esi + 0x3e4]
call fcn.00402fc0
cmp edi, 0x2733
je 0x54f134
cmp edi, ebx
jne 0x54ecb1
xor eax, eax
jmp 0x54f169
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005f85e7
mov esp, ebp
pop ebp
ret 4