Function at 0x10047b5d
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x100a82b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebx]
or dword [ecx], 0xffffffff
mov dword [ebp - 0x128], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x114], ecx
mov ecx, dword [ebx + 0x70]
mov dword [ebp - 0x110], ecx
mov ecx, dword [eax + 0xc]
push edi
mov dword [ebp - 0x10c], ecx
mov ecx, dword [eax + 0x10]
mov edi, 0x80
mov dword [ebp - 0x124], edx
mov dword [ebp - 0x108], ecx
cmp ecx, edi
jbe 0x10047bb9
mov dword [ebp - 0x108], edi
push dword [ebp - 0x108]
push dword [eax + 0x18]
lea eax, [ebp - 0x104]
push eax
call fcn.1005c4f0
mov eax, dword [ebp - 0x124]
and dword [eax], 0
mov eax, dword [esi + 0x17c]
add esp, 0xc
test eax, eax
je 0x10047bfa
lea ecx, [ebp - 0x114]
push ecx
push 0
push dword [esi + 0x180]
call eax
add esp, 0xc
jmp 0x10047c12
push dword [ebp - 0x10c]
push dword [ebp - 0x110]
push dword [ebp - 0x114]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x118], eax
cmp eax, 0xffffffff
jne 0x10047c2d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.10059ccb
leave
ret
push edi
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0x114]
call fcn.10051f54
add esp, 0x10
test eax, eax
je 0x10047c87
lea eax, [ebp - 0x84]
push eax
push str.__Trying__s...
push esi
call fcn.1004663b
lea eax, [ebp - 0x84]
push eax
push 0x100811a4
lea edi, [esi + 0x869c]
push 0x2e
push edi
call fcn.10050590
lea eax, [ebx + 0x3c]
push edi
push eax
call fcn.1005eb30
add esp, 0x24
cmp dword [esi + 0x308], 0
je 0x10047c9e
push dword [ebp - 0x118]
mov edi, ebx
call fcn.10047ab0
pop ecx
mov edi, dword [ebp - 0x118]
push edi
call fcn.10047b05
mov eax, dword [esi + 0x174]
pop ecx
test eax, eax
je 0x10047ce2
push 0
push edi
push dword [esi + 0x178]
call eax
add esp, 0xc
mov dword [ebp - 0x120], eax
test eax, eax
je 0x10047ce2
xor esi, esi
push dword [ebp - 0x118]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
jmp 0x10047c1f
push dword [ebp - 0x114]
push edi
push ebx
call fcn.100475d0
add esp, 0xc
test eax, eax
je 0x10047cfa
mov esi, eax
jmp 0x10047ccf
push 1
push edi
call fcn.10052e1d
cmp dword [ebx + 0x70], 1
pop ecx
pop ecx
jne 0x10047d26
push dword [ebp - 0x108]
lea eax, [ebp - 0x104]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x11c], eax
jmp 0x10047d2d
and dword [ebp - 0x11c], 0
cmp dword [ebp - 0x11c], 0xffffffff
jne 0x10047e03
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov dword [ebp - 0x120], edi
cmp edi, 0xb
je 0x10047ddf
cmp edi, 0x2732
jle 0x10047d61
cmp edi, 0x2734
jle 0x10047ddf
push edi
push ebx
call fcn.10052b76
push eax
lea eax, [ebp - 0x84]
push eax
push str.Failed_to_connect_to__s:__s
push esi
call fcn.100466a5
add esp, 0x18
mov dword [esi + 0x8554], edi
push dword [ebp - 0x118]
lea edi, [ebp - 0x120]
call fcn.100478e9
cmp dword [ebp - 0x11c], 0
pop ecx
jne 0x10047e30
test eax, eax
je 0x10047e4b
mov eax, dword [ebp - 0x124]
push str.connected_n
push esi
mov dword [eax], 1
call fcn.1004663b
mov esi, dword [ebp - 0x118]
push esi
push ebx
call fcn.10047982
mov eax, dword [ebp - 0x128]
add esp, 0x10
mov dword [eax], esi
jmp 0x10047c1d
push dword [ebp - 0x118]
mov eax, dword [ebp + 0xc]
push ebx
call fcn.10047577
pop ecx
pop ecx
mov dword [ebp - 0x11c], eax
cmp eax, 3
jne 0x10047e03
push 0x2a
pop esi
jmp 0x10047ccf
cmp dword [ebp - 0x11c], 1
jne 0x10047d84
cmp dword [esi + 0x508], 2
jne 0x10047d84
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x118]
mov dword [eax], ecx
jmp 0x10047c1d
cmp dword [ebp - 0x11c], 1
jne 0x10047e4b
push str.Timeout_n
push esi
call fcn.1004663b
pop ecx
pop ecx
jmp 0x10047ccd
mov eax, dword [ebp - 0x120]
push eax
push ebx
mov dword [esi + 0x8554], eax
call fcn.10052b76
push eax
push 0x1008165c
push esi
call fcn.1004663b
add esp, 0x14
jmp 0x10047ccd