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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
push ebx
push esi
xor ebx, ebx
mov esi, ecx
cmp dword [esi + 4], ebx
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], 1
je 0x1000fee2
cmp dword [esi + 8], ebx
je 0x1000fee2
mov edi, dword [ebp + 0xc]
push edi
call fcn.1000fb64
test eax, eax
pop ecx
je 0x1000fbe6
push 0xa
lea eax, [ebp + 0xc]
push eax
push edi
call sub.MSVCRT.dll_strtol
add esp, 0xc
cmp dword [ebp + 0xc], edi
je 0x1000fedb
push eax
call sub.WSOCK32.dll_htons
mov dword [ebp - 0xc], eax
jmp 0x1000fc01
push 0x10019444
push edi
call sub.WSOCK32.dll_getservbyname
cmp eax, ebx
je 0x1000fec1
mov ax, word [eax + 8]
mov word [ebp - 0xc], ax
push dword [ebp + 8]
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x1000fc25
lea eax, [ebp - 0x14]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], eax
jmp 0x1000fcc5
push dword [ebp + 8]
call sub.WSOCK32.dll_gethostbyname
mov edi, eax
cmp edi, ebx
jne 0x1000fc6a
cmp byte [0x10024344], bl
je 0x1000fc60
mov al, byte [0x10023708]
push dword [ebp + 8]
mov byte [ebp + 0xf], al
push str.superDebug:_Cannot_resolve_hostname___s__to_ip_address._n
mov byte [0x10023708], bl
call fcn.100013bb
mov al, byte [ebp + 0xf]
pop ecx
pop ecx
mov byte [0x10023708], al
mov eax, 0xfa7
jmp 0x1000fee7
cmp byte [0x10024344], bl
mov eax, dword [edi + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
je 0x1000fcc5
mov al, byte [0x10023708]
mov byte [ebp + 0xf], al
movzx eax, byte [ebp - 0x29]
push eax
movzx eax, byte [ebp - 0x2a]
push eax
movzx eax, byte [ebp - 0x2b]
push eax
movzx eax, byte [ebp - 0x2c]
push eax
push dword [ebp + 8]
mov byte [0x10023708], bl
push str.superDebug:_Hostname___s__resolved_to_ip_address__u._u._u._u_n
call fcn.100013bb
push dword [edi]
push str.superDebug:_Official_hostname_is__s_n
call fcn.100013bb
mov al, byte [ebp + 0xf]
add esp, 0x20
mov byte [0x10023708], al
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp eax, ebx
mov dword [ebp + 0xc], ebx
je 0x1000fe57
cmp byte [0x10024344], bl
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
je 0x1000fd19
mov al, byte [0x10023708]
mov byte [ebp + 0xb], al
movzx eax, byte [ebp - 0x29]
push eax
movzx eax, byte [ebp - 0x2a]
push eax
movzx eax, byte [ebp - 0x2b]
push eax
movzx eax, byte [ebp - 0x2c]
push eax
push str.superDebug:_Attempting_to_connect_to_ip_address__u._u._u._u_n
mov byte [0x10023708], bl
call fcn.100013bb
mov al, byte [ebp + 0xb]
add esp, 0x14
mov byte [0x10023708], al
push ebx
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x1000fe43
mov cx, word [ebp - 0xc]
push 4
mov word [ebp - 0x2e], cx
lea ecx, [ebp - 8]
push ecx
push 0xffffff7f
push 0xffff
push eax
mov word [ebp - 0x30], 2
call sub.WSOCK32.dll_setsockopt
call fcn.1000e8d6
mov edi, eax
cmp edi, ebx
je 0x1000fdbb
push 0x10
lea eax, [ebp - 0x30]
push eax
push dword [esi]
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x1000fe57
cmp byte [0x10024344], bl
je 0x1000fdab
mov al, byte [0x10023708]
mov byte [ebp + 0xb], al
lea eax, [edi - 1]
push eax
mov byte [0x10023708], bl
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.superDebug:_::connect___returned_error__d__retry_count_remaining_is__u_n
call fcn.100013bb
mov al, byte [ebp + 0xb]
add esp, 0xc
mov byte [0x10023708], al
dec edi
je 0x1000fdc5
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1000fd5d
cmp dword [ebp + 0xc], 0xffffffff
jne 0x1000fe57
cmp byte [0x10024344], bl
je 0x1000fdf5
mov al, byte [0x10023708]
mov byte [ebp + 0xb], al
mov byte [0x10023708], bl
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.superDebug:_Connection_returned_error__d_n
call fcn.100013bb
mov al, byte [ebp + 0xb]
pop ecx
pop ecx
mov byte [0x10023708], al
add dword [ebp - 4], 4
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp eax, ebx
jne 0x1000fcd5
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, eax
sub ecx, 0x2733
je 0x1000fe57
sub ecx, 0x19
je 0x1000fe39
dec ecx
je 0x1000fe4d
push eax
lea eax, [ebp - 0x80]
push str.unexpected_error__d_from_winsock
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x80]
push eax
call fcn.1000fafb
add esp, 0x10
mov eax, 0xfaf
jmp 0x1000fee7
mov eax, 0xfa8
jmp 0x1000fee7
mov eax, 0xfb1
jmp 0x1000fee7
mov eax, dword [0x10025288]
mov dword [esi + 0x24], eax
lea eax, [ebp - 0x18]
push eax
push 0x8004667e
push dword [esi]
call sub.WSOCK32.dll_ioctlsocket
mov eax, dword [esi]
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], eax
inc dword [esi + 0x28]
mov eax, dword [0x1001cbdc]
mov dword [esi + 0x12c], eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x1001
push 0xffff
push dword [esi]
mov edi, 0xfaf0
mov dword [esi + 0x130], ebx
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], 4
call sub.WSOCK32.dll_getsockopt
mov eax, dword [ebp - 0x10]
cmp eax, edi
jae 0x1000febd
mov dword [esi + 0x20], eax
xor eax, eax
jmp 0x1000fee7
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2afc
je 0x1000fedb
cmp eax, 0x2afb
je 0x1000fedb
add eax, 0xffffec78
jmp 0x1000fee7
mov eax, 0xfae
jmp 0x1000fee7
mov eax, 0xfa1
pop edi
pop esi
pop ebx
leave
ret 8