Function at 0x4a70b0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x62d12c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov esi, ecx
mov ecx, dword [ebp + 0x10]
push str._SRP__Connecting_to___s_
push 4
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x120], ecx
mov dword [ebp - 0x12c], edx
call fcn.005304d0
add esp, 0xc
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x34], eax
cmp eax, 0xffffffff
jne 0x4a714f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.SRPClient::Connect:_Error_creating_socket___d_
push 4
mov dword [esi + 0x38], eax
call fcn.005304d0
mov eax, dword [esi + 0x38]
push eax
push str.SRPClient::Connect:_Error_creating_socket__d
push 0xffffffffffffffff
push 0x100
add esi, 0x3c
push esi
call fcn.00559bfd
add esp, 0x20
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00558b78
mov esp, ebp
pop ebp
ret 0x14
push ebx
push 4
lea ecx, [ebp - 0x134]
push ecx
push 8
push 0xffff
push eax
mov dword [ebp - 0x134], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
movzx eax, word [esi + 0x18]
mov edx, 2
push eax
mov word [ebp - 0x114], dx
call dword [sym.imp.WS2_32.dll_htons]
push 0x100
push edi
lea ecx, [ebp - 0x104]
push 0x100
push ecx
mov word [ebp - 0x112], ax
call fcn.0055cace
lea edx, [ebp - 0x104]
push 0x3a
push edx
mov byte [ebp - 5], 0
call fcn.0055c890
mov ebx, eax
add esp, 0x18
test ebx, ebx
je 0x4a71e1
lea eax, [ebx + 1]
push eax
call fcn.0055a157
movzx eax, ax
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x112], ax
mov byte [ebx], 0
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
or ebx, 0xffffffff
mov dword [ebp - 0x110], eax
cmp eax, ebx
jne 0x4a74a9
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x128], eax
test eax, eax
jne 0x4a726e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi + 0x38], eax
mov eax, dword [esi + 0x34]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esi + 0x38]
push ecx
push edi
push str.SRPClient::Connect:_Unrecognized_Host_Name___s____d_
push 4
mov dword [esi + 0x34], ebx
call fcn.005304d0
mov edx, dword [esi + 0x38]
push edx
push edi
push str.SRPClient::Connect:_Unrecognized_Host_Name__s__d
push ebx
push 0x100
add esi, 0x3c
push esi
call fcn.00559bfd
add esp, 0x28
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00558b78
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [eax + 0xc]
xor ebx, ebx
mov dword [ebp - 0x118], ebx
cmp dword [eax], ebx
je 0x4a728f
lea ecx, [ecx]
add eax, 4
inc ebx
cmp dword [eax], 0
jne 0x4a7280
mov dword [ebp - 0x118], ebx
push edi
push ebx
push str.SRPClient::Connect:_Found__d_addresses_for_host___s_
push 4
call fcn.005304d0
xor ecx, ecx
mov eax, ebx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00541cf1
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x128]
mov eax, dword [eax + 0xc]
xor ebx, ebx
add esp, 0x14
cmp dword [eax], ebx
je 0x4a7329
xor ecx, ecx
nop
mov edx, dword [eax]
mov eax, dword [edx]
mov edx, dword [ebp - 0x11c]
mov dword [ecx + edx], eax
mov ecx, eax
mov edx, eax
shr ecx, 0x18
push ecx
shr edx, 0x10
mov dword [ebp - 0x110], eax
movzx ecx, dl
shr eax, 8
push ecx
movzx edx, al
movzx eax, byte [ebp - 0x110]
push edx
push eax
push edi
push str.SRPClient::Connect:_Host___s______d._d._d._d_
push 4
call fcn.005304d0
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0xc]
inc ebx
lea ecx, [ebx*4]
add eax, ecx
add esp, 0x1c
cmp dword [eax], 0
jne 0x4a72d0
xor ebx, ebx
cmp dword [ebp - 0x118], ebx
jle 0x4a743e
jmp 0x4a7340
mov ecx, dword [ebp - 0x11c]
mov eax, dword [ecx + ebx*4]
mov edx, eax
mov ecx, eax
shr edx, 0x18
push edx
mov dword [ebp - 0x110], eax
shr ecx, 0x10
movzx edx, cl
movzx ecx, byte [ebp - 0x110]
push edx
shr eax, 8
movzx eax, al
push eax
push ecx
push edi
push str.SRPClient::Connect:_Trying___s______d._d._d._d_
push 4
call fcn.005304d0
mov eax, dword [esi + 0x34]
add esp, 0x1c
push 0x10
lea edx, [ebp - 0x114]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4a73bd
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x120]
push ecx
mov ecx, dword [ebp - 0x124]
push edx
push eax
push ecx
mov ecx, esi
call fcn.004a69a0
test al, al
jne 0x4a743e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
movzx edx, byte [ebp - 0x10d]
movzx ecx, byte [ebp - 0x10f]
push eax
push edx
movzx edx, byte [ebp - 0x110]
mov dword [esi + 0x38], eax
movzx eax, byte [ebp - 0x10e]
push eax
push ecx
push edx
push edi
push str.SRPClient::Connect:_Error_calling_host___s____d._d._d._d____d_
push 2
call fcn.005304d0
mov eax, dword [esi + 0x38]
movzx ecx, byte [ebp - 0x10d]
movzx edx, byte [ebp - 0x10e]
push eax
movzx eax, byte [ebp - 0x10f]
push ecx
movzx ecx, byte [ebp - 0x110]
push edx
push eax
push ecx
push edi
push str.SRPClient::Connect:_Error_calling_host___s____d._d._d._d____d_
push 0xffffffffffffffff
lea edx, [esi + 0x3c]
push 0x100
push edx
call fcn.00559bfd
inc ebx
add esp, 0x48
cmp ebx, dword [ebp - 0x118]
jl 0x4a7340
mov eax, dword [ebp - 0x11c]
push eax
call fcn.0055a04a
add esp, 4
cmp ebx, dword [ebp - 0x118]
jne 0x4a755e
mov ecx, dword [esi + 0x34]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x34], 0xffffffff
test ebx, ebx
jne 0x4a7494
push edi
push str.SRPClient::Connect:_No_addresses_returned_for___s_
push 4
call fcn.005304d0
push edi
push str.SRPClient::Connect:_No_addresses_returned_for___s_
push 0xffffffffffffffff
push 0x100
add esi, 0x3c
push esi
call fcn.00559bfd
add esp, 0x20
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00558b78
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [esi + 0x34]
push 0x10
lea edx, [ebp - 0x114]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, ebx
jne 0x4a7518
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x34]
push ecx
mov dword [esi + 0x38], eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [esi + 0x38]
push edx
push edi
push str.SRPClient::Connect:_Error_calling_host___s____d_
push 2
mov dword [esi + 0x34], ebx
call fcn.005304d0
mov eax, dword [esi + 0x38]
push eax
push edi
push str.SRPClient::Connect:_Error_calling_host___s____d_
push ebx
push 0x100
add esi, 0x3c
push esi
call fcn.00559bfd
add esp, 0x28
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00558b78
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x120]
push ecx
mov ecx, dword [ebp - 0x124]
push edx
push eax
push ecx
mov ecx, esi
call fcn.004a69a0
test al, al
jne 0x4a755e
mov edx, dword [esi + 0x34]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x34], ebx
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00558b78
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [esi + 0x34]
lea eax, [ebp - 0x130]
push eax
push 0x8004667e
push ecx
mov dword [ebp - 0x130], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [esi + 0x34]
lea eax, [esi + 4]
push edx
push eax
call fcn.004a6f40
add esp, 8
mov ecx, eax
mov dword [esi + 0x20], eax
call fcn.004a6fe0
mov ecx, dword [esi + 0x20]
call fcn.004a59c0
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
mov al, 1
pop esi
call fcn.00558b78
mov esp, ebp
pop ebp
ret 0x14