Function at 0x4a05d0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov eax, dword [0x6696c8]
sub esp, 0x1c
test eax, eax
push esi
je 0x4a05ef
mov esi, dword [esp + 0x24]
cmp eax, esi
je 0x4a05f6
mov eax, dword [eax + 0x1128]
test eax, eax
jne 0x4a05e1
xor eax, eax
pop esi
add esp, 0x1c
ret
mov eax, dword [esi + 0x1124]
push eax
call fcn.00508aa0
add esp, 4
test eax, eax
jne 0x4a061f
push 0x5f4c90
push eax
push esi
call fcn.0049fd30
add esp, 0xc
xor eax, eax
pop esi
add esp, 0x1c
ret
mov eax, dword [esi + 0x1038]
test eax, eax
push edi
mov dword [esi + 0x1034], 2
mov dword [esi + 0x1118], 0
je 0x4a072f
cmp word [esi + 0x1048], 0
lea edi, [esi + 0x1048]
jne 0x4a072f
mov eax, dword [0x649040]
test eax, eax
je 0x4a06a6
push 0
push 0xb5c
call fcn.00424130
push eax
push 1
push 1
push 1
push 1
push esi
call fcn.00572130
mov ecx, dword [esi + 0x1124]
mov edx, dword [esi + 0x1038]
push ecx
push edx
push 1
push 0
add esi, 0x268
push esi
call fcn.00497450
add esp, 0x34
pop edi
mov eax, 1
pop esi
add esp, 0x1c
ret
push 1
xor eax, eax
mov ax, word [0x61a70c]
push 1
xor ecx, ecx
mov cx, word [0x61a708]
push 0
push edi
push eax
push ecx
call fcn.0052f8a0
add esp, 0x18
cmp eax, 0xffffffff
mov dword [esi + 0x111c], eax
je 0x4a086d
mov edx, dword [0x6a0f40]
push 8
push 0x8010
push edx
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov edx, dword [esi + 0x1124]
mov eax, dword [esi + 0x1038]
push edx
push eax
push esi
call fcn.0049ef10
mov edx, dword [edx + 0x1720]
push ecx
xor ecx, ecx
fstp qword [esp]
mov cx, word [edi]
lea eax, [esi + 0x7cc]
add esi, 4
push ecx
push edx
push eax
push esi
call fcn.00545b50
add esp, 0x20
pop edi
mov eax, 1
pop esi
add esp, 0x1c
ret
lea edi, [esi + 0x268]
push edi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
mov ecx, dword [0x649040]
mov dword [esp + 8], eax
jne 0x4a078e
test ecx, ecx
je 0x4a0759
mov edx, dword [0x64903c]
test edx, edx
jne 0x4a078e
mov eax, dword [esi + 0x10e0]
test eax, eax
je 0x4a0782
mov edx, dword [esi]
push 0xa
push 0
push edi
lea ecx, [esi + 4]
push ecx
push edx
call fcn.0047fc10
add esp, 0x14
pop edi
mov eax, 1
pop esi
add esp, 0x1c
ret
push 0
push 0xb5e
jmp 0x4a08c6
test ecx, ecx
je 0x4a07f3
push 0
push 0xb5c
call fcn.00424130
push eax
push 1
push 0
push 1
push 1
push esi
call fcn.00572130
mov eax, dword [esi + 0x1038]
add esp, 0x20
test eax, eax
jne 0x4a07c5
call fcn.004230d0
mov dword [esi + 0x1038], eax
mov eax, dword [esi + 0x1124]
mov ecx, dword [esi + 0x1038]
xor edx, edx
mov dx, word [esi + 0x1048]
push eax
push ecx
push 0
push edx
push edi
call fcn.00497450
add esp, 0x14
pop edi
mov eax, 1
pop esi
add esp, 0x1c
ret
xor edx, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x18], eax
xor eax, eax
mov ax, word [esi + 0x1048]
lea ecx, [esp + 8]
mov dword [esp + 0x1c], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x20], edx
mov word [esp + 0x14], 2
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov ecx, dword [esp + 0xc]
mov word [esp + 0x16], ax
mov edx, dword [ecx]
push 1
xor eax, eax
mov ax, word [0x61a70c]
push 0
xor ecx, ecx
mov cx, word [0x61a708]
push 2
push 0
mov dword [esp + 0x28], edx
push eax
push ecx
call fcn.0052f8a0
add esp, 0x18
cmp eax, 0xffffffff
mov dword [esi + 0x111c], eax
jne 0x4a0876
push 0
push 0xb5d
jmp 0x4a08c6
push eax
call fcn.00598890
mov edx, dword [0x6a0f40]
mov eax, dword [esi + 0x111c]
add esp, 4
push 0x10
push 0x800f
push edx
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov edx, dword [esi + 0x111c]
push 0x10
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x4a08d7
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4a08d7
push 0
push 0xb5f
call fcn.00424130
push eax
push 0
push esi
call fcn.0049fd30
add esp, 0x14
pop edi
xor eax, eax
pop esi
add esp, 0x1c
ret