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

Disassembly:
mov eax, 0x426618
call fcn.0041bdc0
mov eax, 0x10e4
call fcn.0041bd90
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x3c], 1
cmp dword [edi + 4], ebx
mov dword [ebp - 0x10], ebx
je 0x4130c1
cmp dword [edi + 8], ebx
je 0x4130c1
push dword [ebp + 0xc]
call fcn.0041c877
lea eax, [ebp - 0x8ec]
push eax
push dword [ebp + 0xc]
call fcn.00413364
mov esi, dword [ebp + 0x10]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x10], eax
cmp word [esi], bx
je 0x412c98
cmp eax, 0x400
jae 0x412c98
mov cl, byte [esi + eax*2]
mov byte [ebp + eax - 0x4e8], cl
inc eax
mov dword [ebp - 0x10], eax
cmp word [esi + eax*2], bx
jne 0x412c7d
mov byte [ebp + eax - 0x4e8], bl
lea eax, [ebp - 0x4e8]
push eax
mov dword [ebp - 0x10], ebx
call fcn.00412bfa
test eax, eax
pop ecx
je 0x412ce2
lea eax, [ebp + 0x10]
push 0xa
push eax
lea eax, [ebp - 0x4e8]
push eax
call fcn.0041d5e2
lea ecx, [ebp - 0x4e8]
add esp, 0xc
cmp dword [ebp + 0x10], ecx
je 0x4130ba
push eax
call sub.WSOCK32.dll_htons
mov dword [ebp - 0x38], eax
jmp 0x412d03
lea eax, [ebp - 0x4e8]
push 0x433020
push eax
call sub.WSOCK32.dll_getservbyname
cmp eax, ebx
je 0x4130a0
mov ax, word [eax + 8]
mov word [ebp - 0x38], ax
lea eax, [ebp - 0x8ec]
push eax
call sub.WSOCK32.dll_inet_addr
mov esi, dword [ebp + 8]
cmp eax, 0xffffffff
mov dword [ebp - 0x44], eax
je 0x412d2e
lea eax, [ebp - 0x44]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [ebp + 8], eax
jmp 0x412e3d
lea eax, [ebp - 0x8ec]
push eax
call sub.WSOCK32.dll_gethostbyname
cmp eax, ebx
mov dword [ebp + 0x10], eax
jne 0x412d77
mov eax, dword [ebp + 8]
cmp word [eax], bx
je 0x412d6d
push dword [ebp + 0xc]
mov di, word [eax + 0x35e]
lea esi, [eax + 0x35e]
push str.superDebug:_Cannot_resolve_hostname___s__to_ip_address._n
push eax
mov word [esi], bx
call fcn.00403e43
add esp, 0xc
mov word [esi], di
mov eax, 0xfa7
jmp 0x4130c6
mov eax, dword [eax + 0xc]
cmp word [esi], bx
mov dword [ebp + 8], eax
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
je 0x412e3d
lea ecx, [ebp - 0x20]
call fcn.00402ccc
mov ax, word [esi + 0x35e]
mov dword [ebp - 4], ebx
mov word [ebp - 0x14], ax
mov word [esi + 0x35e], bx
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 + 0xc]
push str.superDebug:_Hostname___s__resolved_to_ip_address__hhu._hhu._hhu._hhu_n
push esi
call fcn.00403e43
add esp, 0x1c
lea ecx, [ebp - 0x20]
call fcn.00402cd9
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0xc], ebx
mov eax, dword [eax]
mov al, byte [eax]
cmp al, bl
je 0x412dfe
push eax
lea ecx, [ebp - 0x20]
call fcn.00402e59
mov eax, dword [ebp + 0x10]
inc dword [ebp + 0xc]
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax]
mov al, byte [eax + ecx]
jmp 0x412de1
push ebx
lea ecx, [ebp - 0x20]
call fcn.00402e39
lea ecx, [ebp - 0x20]
call fcn.00409563
push eax
push str.superDebug:_Official_hostname_is__s_n
push esi
call fcn.00403e43
add esp, 0xc
lea ecx, [ebp - 0x20]
call fcn.00402d02
mov ax, word [ebp - 0x14]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
mov word [esi + 0x35e], ax
call fcn.00402cbe
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], ebx
mov eax, dword [eax]
cmp eax, ebx
je 0x413034
mov eax, dword [eax]
cmp word [esi], bx
mov dword [ebp - 0x2c], eax
je 0x412ecc
mov ax, word [esi + 0x35e]
mov dl, byte [ebp - 0x4e8]
mov word [ebp + 0xc], ax
xor eax, eax
cmp dl, bl
mov word [esi + 0x35e], bx
je 0x412e90
lea ecx, [ebp - 0x10f0]
movsx dx, dl
inc eax
mov word [ecx], dx
inc ecx
mov dl, byte [ebp + eax - 0x4e8]
inc ecx
cmp dl, bl
jne 0x412e7b
mov word [ebp + eax*2 - 0x10f0], bx
lea eax, [ebp - 0x10f0]
push eax
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__hhu._hhu._hhu._hhu__on_port__s_n
push esi
call fcn.00403e43
mov ax, word [ebp + 0xc]
add esp, 0x1c
mov word [esi + 0x35e], ax
push ebx
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [edi], eax
je 0x413020
mov cx, word [ebp - 0x38]
push 4
mov word [ebp - 0x2e], cx
lea ecx, [ebp - 0x10]
push ecx
push 0xffffff7f
push 0xffff
push eax
mov word [ebp - 0x30], 2
call sub.WSOCK32.dll_setsockopt
push esi
call fcn.00418483
cmp eax, ebx
pop ecx
mov dword [ebp + 0x10], eax
je 0x412f81
dec eax
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0x30]
push 0x10
push eax
push dword [edi]
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x413034
cmp word [esi], bx
je 0x412f69
mov ax, word [esi + 0x35e]
push dword [ebp + 0xc]
mov word [ebp - 0x40], ax
mov word [esi + 0x35e], bx
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.superDebug:_::connect___returned_error__d__retry_count_remaining_is__d_n
push esi
call fcn.00403e43
mov ax, word [ebp - 0x40]
add esp, 0x10
mov word [esi + 0x35e], ax
dec dword [ebp + 0x10]
dec dword [ebp + 0xc]
cmp dword [ebp + 0x10], ebx
je 0x412f8b
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x412f17
cmp dword [ebp - 0x14], 0xffffffff
jne 0x413034
cmp word [esi], bx
je 0x412fc1
mov ax, word [esi + 0x35e]
mov word [esi + 0x35e], bx
mov word [ebp + 0xc], ax
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.superDebug:_Connection_returned_error__d_n
push esi
call fcn.00403e43
mov ax, word [ebp + 0xc]
add esp, 0xc
mov word [esi + 0x35e], ax
add dword [ebp + 8], 4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, ebx
jne 0x412e4d
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp + 0xc], eax
sub eax, 0x2733
je 0x413034
sub eax, 0x19
je 0x413016
dec eax
je 0x41302a
push dword [ebp + 0xc]
call fcn.004130d7
push eax
lea eax, [ebp - 0xe4]
push dword [ebp + 0xc]
push str.unexpected_error__d___s__from_winsock
push eax
call fcn.0041af29
lea eax, [ebp - 0xe4]
push eax
push esi
call fcn.00412b67
add esp, 0x1c
mov eax, 0xfaf
jmp 0x4130c6
mov eax, 0xfa8
jmp 0x4130c6
mov eax, 0xfb1
jmp 0x4130c6
mov eax, dword [esi + 0x724]
mov dword [edi + 0x24], eax
lea eax, [ebp - 0x3c]
push eax
push 0x8004667e
push dword [edi]
call sub.WSOCK32.dll_ioctlsocket
mov eax, dword [edi]
mov dword [edi + 0x28], ebx
mov dword [edi + 0x2c], eax
inc dword [edi + 0x28]
mov eax, dword [esi + 0x1e8]
mov esi, 0xfaf0
mov dword [edi + 0x12c], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x34]
push eax
push 0x1001
push 0xffff
mov dword [edi + 0x130], ebx
push dword [edi]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x10], 4
call sub.WSOCK32.dll_getsockopt
mov eax, dword [ebp - 0x34]
cmp eax, esi
jae 0x41309c
mov dword [edi + 0x20], eax
xor eax, eax
jmp 0x4130c6
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2afc
je 0x4130ba
cmp eax, 0x2afb
je 0x4130ba
add eax, 0xffffec78
jmp 0x4130c6
mov eax, 0xfae
jmp 0x4130c6
mov eax, 0xfa1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc