Function at 0x1004db3f
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x100b02c0]
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 0x1004db9b
mov dword [ebp - 0x108], edi
push dword [ebp - 0x108]
push dword [eax + 0x18]
lea eax, [ebp - 0x104]
push eax
call fcn.10062810
mov eax, dword [ebp - 0x124]
and dword [eax], 0
mov eax, dword [esi + 0x17c]
add esp, 0xc
test eax, eax
je 0x1004dbdc
lea ecx, [ebp - 0x114]
push ecx
push 0
push dword [esi + 0x180]
call eax
add esp, 0xc
jmp 0x1004dbf4
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 0x1004dc0f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1005fc2b
leave
ret
push edi
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x100]
push eax
push dword [ebp - 0x114]
call fcn.10057ead
add esp, 0x10
test eax, eax
je 0x1004dc69
lea eax, [ebp - 0x84]
push eax
push str.__Trying__s...
push esi
call fcn.1004c61d
lea eax, [ebp - 0x84]
push eax
push 0x1008722c
lea edi, [esi + 0x869c]
push 0x2e
push edi
call fcn.100564e6
lea eax, [ebx + 0x3c]
push edi
push eax
call fcn.10064e50
add esp, 0x24
cmp dword [esi + 0x308], 0
je 0x1004dc80
push dword [ebp - 0x118]
mov edi, ebx
call fcn.1004da92
pop ecx
mov edi, dword [ebp - 0x118]
push edi
call fcn.1004dae7
mov eax, dword [esi + 0x174]
pop ecx
test eax, eax
je 0x1004dcc4
push 0
push edi
push dword [esi + 0x178]
call eax
add esp, 0xc
mov dword [ebp - 0x120], eax
test eax, eax
je 0x1004dcc4
xor esi, esi
push dword [ebp - 0x118]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
jmp 0x1004dc01
push dword [ebp - 0x114]
push edi
push ebx
call fcn.1004d5b2
add esp, 0xc
test eax, eax
je 0x1004dcdc
mov esi, eax
jmp 0x1004dcb1
push 1
push edi
call fcn.10058d76
cmp dword [ebx + 0x70], 1
pop ecx
pop ecx
jne 0x1004dd08
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 0x1004dd0f
and dword [ebp - 0x11c], 0
cmp dword [ebp - 0x11c], 0xffffffff
jne 0x1004dde5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov dword [ebp - 0x120], edi
cmp edi, 0xb
je 0x1004ddc1
cmp edi, 0x2732
jle 0x1004dd43
cmp edi, 0x2734
jle 0x1004ddc1
push edi
push ebx
call fcn.10058acf
push eax
lea eax, [ebp - 0x84]
push eax
push str.Failed_to_connect_to__s:__s
push esi
call fcn.1004c687
add esp, 0x18
mov dword [esi + 0x8554], edi
push dword [ebp - 0x118]
lea edi, [ebp - 0x120]
call fcn.1004d8cb
cmp dword [ebp - 0x11c], 0
pop ecx
jne 0x1004de12
test eax, eax
je 0x1004de2d
mov eax, dword [ebp - 0x124]
push str.connected_n
push esi
mov dword [eax], 1
call fcn.1004c61d
mov esi, dword [ebp - 0x118]
push esi
push ebx
call fcn.1004d964
mov eax, dword [ebp - 0x128]
add esp, 0x10
mov dword [eax], esi
jmp 0x1004dbff
push dword [ebp - 0x118]
mov eax, dword [ebp + 0xc]
push ebx
call fcn.1004d559
pop ecx
pop ecx
mov dword [ebp - 0x11c], eax
cmp eax, 3
jne 0x1004dde5
push 0x2a
pop esi
jmp 0x1004dcb1
cmp dword [ebp - 0x11c], 1
jne 0x1004dd66
cmp dword [esi + 0x508], 2
jne 0x1004dd66
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x118]
mov dword [eax], ecx
jmp 0x1004dbff
cmp dword [ebp - 0x11c], 1
jne 0x1004de2d
push str.Timeout_n
push esi
call fcn.1004c61d
pop ecx
pop ecx
jmp 0x1004dcaf
mov eax, dword [ebp - 0x120]
push eax
push ebx
mov dword [esi + 0x8554], eax
call fcn.10058acf
push eax
push 0x100876e4
push esi
call fcn.1004c61d
add esp, 0x14
jmp 0x1004dcaf