Function at 0x5517e2
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x58]
sub esp, 0x12c
mov eax, dword [0x6e1760]
xor eax, ebp
mov dword [ebp + 0x54], eax
push ebx
mov ebx, dword [ebp + 0x64]
push esi
push edi
push dword [ebp + 0x60]
mov edi, dword [ebp + 0x6c]
mov dword [ebp - 0x4c], ebx
call fcn.0054ecd7
mov esi, eax
test esi, esi
pop ecx
jne 0x55183f
push 0x2736
call fcn.0054d799
mov dword [esp], str.argument_is_not_an_RML_socket
push str.RMLJoinLeaf
push str._s_failed:__s_n
push 0x32
call fcn.004f1757
add esp, 0x10
or eax, 0xffffffff
jmp 0x551b35
test edi, edi
je 0x551850
mov eax, dword [edi + 4]
mov dword [ebp - 0x44], eax
mov eax, dword [edi]
mov dword [ebp - 0x48], eax
jmp 0x551858
and dword [ebp - 0x44], 0
and dword [ebp - 0x48], 0
push 0x10
lea eax, [esi + 0x73c]
push ebx
push eax
call fcn.0040b070
add esp, 0xc
or edi, 0xffffffff
cmp byte [esi + 0x14], 0
jne 0x5518a4
mov ax, word [esi + 8]
push 0xe
mov word [ebp - 0x3c], ax
lea eax, [ebp - 0x3a]
push 0
push eax
call fcn.00408660
push 0x10
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 0x60]
call fcn.0054cffc
add esp, 0x18
cmp eax, edi
jne 0x5518a4
mov eax, edi
jmp 0x551b35
and dword [ebp - 0x50], 0
mov ebx, dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 0
push dword [esi + 0x6b8]
push dword [esi + 4]
call ebx
cmp eax, edi
jne 0x5518f5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
push ebx
call fcn.0054d799
push ebx
call fcn.004f1822
push eax
push 0x6630a4
push str...RMLStCli.cpp:179
push str._s:__s_failed:__s_n
push 0x32
call fcn.004f1757
push esi
call fcn.0054fc7c
add esp, 0x20
jmp 0x55189d
lea eax, [ebp - 0x50]
push eax
push 0x8004667e
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, edi
jne 0x55192c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
push ebx
call fcn.0054d799
push ebx
call fcn.004f1822
push eax
push 0x6630a4
push str...RMLStCli.cpp:189
jmp 0x5518de
push 0x10
push dword [ebp - 0x4c]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, edi
jne 0x551971
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
call fcn.0054d799
push esi
call fcn.004f1822
push eax
push str.connect
push str...RMLStCli.cpp:201
push str._s:__s_failed:__s_n
push 0x32
call fcn.004f1757
add esp, 0x1c
jmp 0x55189d
push 3
push dword [esi + 0x6b8]
mov byte [esi + 0x15], 1
push dword [esi + 4]
call ebx
cmp eax, edi
jne 0x5519aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
push ebx
call fcn.0054d799
push ebx
call fcn.004f1822
push eax
push 0x6630a4
push str...RMLStCli.cpp:214
jmp 0x5518de
cmp dword [0x773c80], 0
jne 0x5519cf
push 0xe04d0100
call dword [sym.imp.WS2_32.dll_htonl]
push eax
push esi
call fcn.0054f4bb
cmp eax, edi
pop ecx
pop ecx
je 0x55189d
push 2
call fcn.00552e15
mov ebx, eax
mov al, byte [esi + 0x9a4]
mov byte [ebp - 0x3d], al
push 1
lea eax, [ebp - 0x3d]
push eax
push 1
push ebx
call fcn.00552f36
add esp, 0x14
test al, al
jne 0x551a04
push 8
call fcn.0054d799
mov eax, edi
jmp 0x551b34
lea eax, [ebp - 0xd4]
push 0x10
push eax
call fcn.00552fc2
lea ecx, [ebp - 0x2c]
push ecx
push eax
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0xd4]
push eax
call fcn.00553062
mov eax, dword [ebp - 0x54]
shl eax, 3
push eax
lea eax, [ebp - 0x2c]
push eax
push 2
push ebx
call fcn.00552f36
add esp, 0x24
test al, al
je 0x5519f6
cmp dword [ebp - 0x44], 0
je 0x551a59
push dword [ebp - 0x48]
push dword [ebp - 0x44]
push ebx
call fcn.00552ec5
add esp, 0xc
test al, al
je 0x5519f6
push ebx
call fcn.00552fb7
pop ecx
push eax
push ebx
call fcn.004f2984
pop ecx
push eax
push dword [ebp - 0x4c]
push 1
push dword [esi + 0x5fc]
push 0
push 0
push esi
call fcn.0054e808
add esp, 0x20
cmp eax, edi
je 0x55189d
push ebx
call fcn.00552e56
push 2
pop ebx
push ebx
push esi
call fcn.0054e571
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x6c4], eax
jmp 0x551ab7
push edi
push esi
call fcn.00551121
cmp eax, edi
pop ecx
pop ecx
je 0x551aee
cmp dword [esi + 0x18], ebx
je 0x551aaa
mov eax, dword [esi + 0x18]
cmp eax, 0xd
jne 0x551afa
push 0x274d
call fcn.0054d799
mov dword [esp], str.connection_refused
push str.RMLJoinLeaf
push str._s_failed:__s_n
push 0x32
call fcn.004f1757
add esp, 0x10
jmp 0x55189d
push 0
push esi
call fcn.0054e571
mov eax, edi
jmp 0x551b33
cmp eax, 0xc
jne 0x551b12
push 0x2745
call fcn.0054d799
mov dword [esp], str.connection_aborted
jmp 0x551ad5
test eax, eax
jne 0x551b29
push 0x274c
call fcn.0054d799
mov dword [esp], str.connection_timed_out
jmp 0x551ad5
push ebx
push esi
call fcn.0054db9c
mov eax, dword [ebp + 0x60]
pop ecx
pop ecx
mov ecx, dword [ebp + 0x54]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040916a
add ebp, 0x58
leave
ret