Function at 0x10047630
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
mov eax, dword [0x100c520c]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x10]
xor eax, eax
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0xe8], eax
mov byte [ebp - 0xda], al
push edi
mov eax, dword [esi]
mov dword [ebp - 0xd8], eax
mov dword [edx], 0xffffffff
mov eax, dword [ecx + 4]
mov edi, dword [esi]
mov dword [ebp - 0xd4], eax
mov eax, dword [esi + 0x94]
cmp eax, 2
mov dword [ebp - 0xd0], eax
mov eax, 0x11
mov dword [ebp - 0xe4], esi
mov dword [ebp - 0xf4], edx
mov dword [ebp - 0xf0], 0xffffffff
je 0x100476a5
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0xcc], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0xc8], eax
cmp eax, 0x80
jbe 0x100476ca
mov dword [ebp - 0xc8], 0x80
mov eax, 0x80
push eax
push dword [ecx + 0x18]
lea eax, [ebp - 0xc4]
push eax
call fcn.10068e00
mov eax, dword [edi + 0x1e0]
add esp, 0xc
test eax, eax
je 0x100476fd
lea ecx, [ebp - 0xd4]
push ecx
push 0
push dword [edi + 0x1e4]
call eax
add esp, 0xc
jmp 0x10047715
push dword [ebp - 0xcc]
push dword [ebp - 0xd0]
push dword [ebp - 0xd4]
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10047bcc
lea eax, [ebp - 0xec]
xor edi, edi
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0xc4]
push eax
call fcn.10047590
add esp, 0xc
test al, al
jne 0x1004778c
call fcn.10071623
mov esi, dword [eax]
call fcn.10071623
push esi
mov esi, dword [ebp - 0xe4]
mov edi, eax
push esi
call fcn.10041690
push eax
push dword [edi]
mov eax, dword [ebp - 0xd8]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.100459e0
push ebx
push esi
call fcn.10046350
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10067217
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x34]
push eax
push str.__Trying__s..._n
push dword [ebp - 0xd8]
call fcn.10045b00
mov eax, dword [ebp - 0xd4]
add esp, 0xc
cmp eax, 2
je 0x100477b7
cmp eax, 0x17
jne 0x10047838
cmp dword [ebp - 0xd0], 1
jne 0x10047838
mov eax, dword [ebp - 0xd8]
mov byte [ebp - 0xd9], 1
cmp byte [eax + 0x50e], 0
je 0x1004783f
mov eax, dword [esi]
push 4
mov dword [ebp - 0xe0], eax
lea eax, [ebp - 0xe4]
push eax
push 1
push 6
push ebx
mov dword [ebp - 0xe4], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x10047823
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.10041690
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push dword [ebp - 0xe0]
call fcn.10045b00
add esp, 0x14
jmp 0x1004783f
push str.TCP_NODELAY_set_n
push dword [ebp - 0xe0]
call fcn.10045b00
add esp, 8
jmp 0x1004783f
mov byte [ebp - 0xd9], 0
mov eax, dword [0x100c6540]
mov dword [ebp - 0xe4], 0x4020
mov dword [ebp - 0xe0], edi
mov dword [ebp - 0xec], 4
test eax, eax
jne 0x1004788d
push 3
push 2
push eax
push 6
call fcn.10060a20
add esp, 0x10
test al, al
je 0x10047881
mov dword [0x100c6540], 2
jmp 0x100478dd
mov dword [0x100c6540], 1
jmp 0x10047892
cmp eax, 2
je 0x100478dd
lea eax, [ebp - 0xec]
push eax
lea eax, [ebp - 0xe0]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x100478c3
mov eax, dword [ebp - 0xe0]
cmp eax, dword [ebp - 0xe4]
jg 0x100478dd
push 4
lea eax, [ebp - 0xe4]
push eax
push 0x1001
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [ebp - 0xd9], 0
mov eax, dword [ebp - 0xd8]
je 0x100479cb
cmp byte [eax + 0x640], 0
je 0x100479cb
push 4
lea eax, [ebp - 0xe0]
mov dword [ebp - 0xe0], 1
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1004793b
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push dword [ebp - 0xd8]
call fcn.10045b00
add esp, 0xc
jmp 0x100479c5
mov eax, dword [ebp - 0xd8]
mov dword [ebp - 0x40], 1
push dword [eax + 0x644]
call fcn.1004ca60
imul eax, eax, 0x3e8
mov dword [ebp - 0xe0], eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0xd8]
push dword [eax + 0x648]
call fcn.1004ca60
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0xe0], eax
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0xec]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x40]
push eax
push 0x98000004
push ebx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x100479c5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push dword [ebp - 0xd8]
call fcn.10045b00
add esp, 0x10
mov eax, dword [ebp - 0xd8]
mov ecx, dword [eax + 0x1d8]
test ecx, ecx
je 0x100479f5
push 0
push ebx
push dword [eax + 0x1dc]
call ecx
add esp, 0xc
mov dword [ebp - 0xe8], eax
cmp eax, 2
jne 0x10047a50
mov byte [ebp - 0xda], 1
mov eax, dword [ebp - 0xd4]
cmp eax, 2
je 0x10047a05
cmp eax, 0x17
jne 0x10047a74
lea eax, [ebp - 0xc4]
push eax
call fcn.10060800
push eax
push dword [ebp - 0xd4]
push ebx
push esi
call fcn.10047040
mov edi, eax
add esp, 0x14
test edi, edi
je 0x10047a74
push ebx
push esi
call fcn.10046350
add esp, 8
mov eax, 7
cmp edi, 1
cmove edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10067217
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x100479f5
push ebx
push esi
call fcn.10046350
add esp, 8
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10067217
mov esp, ebp
pop ebp
ret
push 1
push ebx
call fcn.100608a0
lea eax, [ebp - 0x44]
push eax
call fcn.10043fc0
add esp, 0xc
cmp dword [esi + 0x298], 1
movups xmm0, xmmword [eax]
movups xmmword [esi + 0x288], xmm0
jle 0x10047ab7
push 3
push dword [esi + 0x2a4]
push dword [esi + 0x2a0]
push dword [ebp - 0xd8]
call fcn.10043560
add esp, 0x10
cmp byte [ebp - 0xda], 0
jne 0x10047bc4
cmp dword [esi + 0x94], 1
jne 0x10047bc4
cmp byte [esi + 0x282], 0
jne 0x10047af9
push dword [ebp - 0xc8]
lea eax, [ebp - 0xc4]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0xf0], eax
cmp eax, 0xffffffff
jne 0x10047b09
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp - 0xe8], ecx
jmp 0x10047b0f
mov ecx, dword [ebp - 0xe8]
cmp dword [ebp - 0xd4], 0x17
sete al
cmp dword [ebp - 0xf0], 0xffffffff
mov byte [esi + 0x26f], al
jne 0x10047ba5
cmp ecx, 0xb
je 0x10047b88
cmp ecx, 0x2732
jle 0x10047b3d
cmp ecx, 0x2734
jle 0x10047b88
push ecx
push esi
call fcn.10041690
mov edi, dword [ebp - 0xd8]
push eax
lea eax, [ebp - 0x34]
push eax
push str.Immediate_connect_fail_for__s:__s_n
push edi
call fcn.10045b00
mov eax, dword [ebp - 0xe8]
push ebx
push esi
mov dword [edi + 0x48ac], eax
call fcn.10046350
add esp, 0x20
mov edi, 7
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10067217
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xf4]
xor edi, edi
mov dword [eax], ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10067217
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x10047bb1
mov eax, dword [ebp - 0xf4]
mov dword [eax], ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10067217
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xf4]
mov dword [eax], ebx
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10067217
mov esp, ebp
pop ebp
ret