Function at 0x1006500
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Resolve dns
Set socket configuration

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xb0
mov eax, dword [0x100a370]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0xb0]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x88]
push eax
xor edx, edx
lea eax, [ebp - 0xb0]
push eax
xor esi, esi
push edx
inc esi
push ebx
mov dword [ebp - 0x88], edx
mov dword [ebp - 0xac], edx
mov dword [ebp - 0xb0], 2
mov dword [ebp - 0xa8], esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x1006596
push ebx
call fcn.0100565b
mov esi, eax
test esi, esi
je 0x1006812
mov eax, dword [sym.imp.msvcrt.dll__iob]
push esi
add eax, 0x20
push 0x2757
push eax
call fcn.01005f9f
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1006812
mov eax, dword [ebp - 0x88]
cmp dword [eax + 0x14], 0
mov dword [ebp - 0x8c], eax
je 0x10065ad
mov eax, dword [eax + 0x14]
jmp 0x10065af
mov eax, ebx
push eax
push 0x401
push 0x100c380
call fcn.01005a1b
mov eax, dword [ebp - 0x88]
push 0
push esi
mov dword [ebp - 0x90], esi
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x100670d
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
mov ebx, 0xffff
push 0x80
lea eax, [ebp - 0x84]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x88]
mov cx, word [eax + 4]
add esp, 0xc
mov word [ebp - 0x84], cx
push dword [eax + 0x10]
lea eax, [ebp - 0x84]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x100671e
push 4
push 0x100c798
push 0x1001
push ebx
push esi
call edi
cmp eax, 0xffffffff
jne 0x1006654
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275b
call fcn.01005b70
push 4
push 0x100c2e0
push 0x1002
push ebx
push esi
call edi
cmp eax, 0xffffffff
jne 0x100667a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275b
call fcn.01005b70
push 4
lea eax, [ebp - 0x90]
push eax
push 8
push ebx
push esi
call edi
cmp eax, 0xffffffff
jne 0x100669f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275b
call fcn.01005b70
mov eax, dword [ebp - 0x88]
mov eax, dword [eax + 0x18]
mov cx, word [ebp + 0xc]
mov word [eax + 2], cx
mov eax, dword [ebp - 0x88]
push dword [eax + 0x10]
push dword [eax + 0x18]
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1006757
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x88]
mov eax, dword [eax + 0x1c]
or esi, 0xffffffff
mov dword [ebp - 0x88], eax
test eax, eax
je 0x10067e9
xor ecx, ecx
inc ecx
push 0
push ecx
mov dword [ebp - 0x90], ecx
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10065ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2758
jmp 0x10067f5
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 0x2742
jne 0x1006746
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x2759
push eax
call fcn.01005f9f
pop ecx
pop ecx
jmp 0x10067fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275a
jmp 0x10067f5
push 0x100b9e0
push 0x100b8c0
push esi
mov dword [0x100b9e0], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x1006785
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275d
jmp 0x10067f5
cmp dword [0x100c790], 0
mov dword [0x100b8a0], esi
mov dword [0x100b844], esi
je 0x10067c4
push 0x100c380
call fcn.0100565b
mov esi, eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push esi
add eax, 0x20
push 0x2734
push eax
call fcn.01005f9f
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 1
push 0
call fcn.010060b6
mov ecx, dword [ebp - 0x88]
xor eax, eax
cmp dword [ecx + 4], 0x17
sete al
mov dword [0x100b4b8], eax
mov eax, dword [ebp - 0x8c]
jmp 0x1006814
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275c
call fcn.01005b70
push dword [ebp - 0x8c]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp esi, 0xffffffff
je 0x1006812
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01008359
leave
ret 8