Function at 0x49b060
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, 0x10
push ebx
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x1c]
push esi
push edi
mov dword [ebp - 0xc], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
test eax, 0xfffe
jne 0x49b0d1
cmp al, 1
je 0x49b0aa
mov al, 6
mov dword [edi + 4], ebx
xor ebx, ebx
mov ecx, dword [esi + 8]
mov bh, byte [esi + 0xc]
mov dword [edi], eax
mov bl, byte [esi + 0xd]
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ebx
jmp 0x49b0d1
mov al, byte [esi + 3]
mov bl, byte [esi + 5]
mov bh, byte [esi + 4]
mov ah, byte [esi + 2]
shl eax, 0x10
xor ecx, ecx
shl ebx, 0x10
mov al, 2
mov bl, byte [esi + 7]
mov dword [edi + 8], ecx
mov bh, byte [esi + 6]
mov dword [edi + 0xc], ecx
mov dword [edi + 4], ebx
mov dword [edi], eax
mov edi, dword [ebp + 8]
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x2c], ecx
mov dx, word [edi]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
push 0x48
mov ax, word [edx*2 + 0x4c5910]
mov dword [ebp - 0x20], ecx
mov word [ebp - 0x2c], ax
call fcn.0048bc10
mov ecx, dword [str.SOCK]
mov esi, eax
xor eax, eax
add esp, 4
mov dword [esi], ecx
mov ax, word [edi]
xor ecx, ecx
mov edx, dword [eax*4 + 0x4c5918]
mov cx, word [eax*2 + 0x4c5910]
push edx
push 1
push ecx
call sub.WSOCK32.dll_socket
mov dword [esi + 8], eax
xor eax, eax
mov word [0x4ffae8], ax
mov word [0x4fba48], ax
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x49b314
lea edx, [ebp - 0x2c]
push 0x10
push edx
push eax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x49b314
mov eax, dword [0x4fba94]
mov ecx, dword [esi + 8]
push 0x13
push 0x401
push eax
push ecx
call sub.WSOCK32.dll_WSAAsyncSelect
test eax, eax
jne 0x49b314
mov eax, dword [esi + 8]
lea edx, [ebp - 0x1c]
push 0x10
push edx
push eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x49b19a
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x49b314
xor ecx, ecx
mov cx, word [edi]
mov edx, dword [ecx*4 + 0x4d6340]
mov ebx, dword [edx + 0xc]
call fcn.0048ea90
mov edi, eax
add edi, ebx
xor ebx, ebx
cmp word [0x4ffae8], 0x440
je 0x49b1da
call fcn.0048ea90
mov ebx, eax
cmp ebx, edi
jae 0x49b1ec
call fcn.0048f1d0
cmp word [0x4ffae8], 0x440
jne 0x49b1bf
cmp ebx, edi
jae 0x49b1ec
mov ax, word [0x4fba48]
neg ax
sbb eax, eax
inc eax
jmp 0x49b1f8
push 0x274c
call sub.WSOCK32.dll_WSASetLastError
xor al, al
test al, al
je 0x49b314
mov edx, dword [esi + 8]
lea eax, [ebp - 4]
lea ecx, [ebp - 0x1c]
push eax
push ecx
push edx
call sub.WSOCK32.dll_getpeername
mov ax, word [ebp - 0x1c]
cmp ax, 2
jne 0x49b23c
mov word [esi + 0x2e], 1
mov eax, dword [ebp - 0x1a]
push eax
call sub.WSOCK32.dll_ntohs
mov word [esi + 0x30], ax
mov ecx, dword [ebp - 0x18]
push ecx
call sub.WSOCK32.dll_ntohl
mov dword [esi + 0x32], eax
jmp 0x49b26c
cmp ax, 6
jne 0x49b26c
mov word [esi + 0x2e], 0
mov edx, dword [ebp - 0x10]
push edx
call sub.WSOCK32.dll_ntohs
mov word [esi + 0x3a], ax
mov ecx, dword [ebp - 0x1a]
lea eax, [esi + 0x30]
mov dword [esi + 0x30], ecx
mov edx, dword [ebp - 0x16]
mov dword [eax + 4], edx
mov cx, word [ebp - 0x12]
mov word [eax + 8], cx
mov ecx, dword [esi + 8]
lea edx, [ebp - 8]
lea eax, [ebp - 0x2c]
push edx
push eax
push ecx
call sub.WSOCK32.dll_getsockname
mov ax, word [ebp - 0x1c]
cmp ax, 2
jne 0x49b2a8
mov word [esi + 0x20], 1
mov edx, dword [ebp - 0x1a]
push edx
call sub.WSOCK32.dll_ntohs
mov word [esi + 0x22], ax
mov eax, dword [ebp - 0x18]
push eax
call sub.WSOCK32.dll_ntohl
mov dword [esi + 0x24], eax
jmp 0x49b2d8
cmp ax, 6
jne 0x49b2d8
mov word [esi + 0x20], 0
mov ecx, dword [ebp - 0x10]
push ecx
call sub.WSOCK32.dll_ntohs
mov word [esi + 0x2c], ax
mov eax, dword [ebp - 0x1a]
lea edx, [esi + 0x22]
mov dword [esi + 0x22], eax
mov ecx, dword [ebp - 0x16]
mov dword [edx + 4], ecx
mov ax, word [ebp - 0x12]
mov word [edx + 8], ax
mov edx, dword [esi + 8]
mov byte [esi + 0xc], 3
mov dword [esi + 0x3c], 0x226
mov eax, dword [0x4d634c]
test eax, eax
mov ecx, 0x4d6348
je 0x49b302
cmp dword [eax + 8], edx
jae 0x49b302
mov ecx, eax
mov eax, dword [ecx + 4]
test eax, eax
jne 0x49b2f4
mov edx, dword [ecx + 4]
mov eax, esi
mov dword [esi + 4], edx
mov dword [ecx + 4], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x49b32a
push 0x274c
call sub.WSOCK32.dll_WSASetLastError
call sub.WSOCK32.dll_WSAGetLastError
mov edi, eax
xor edx, edx
mov ecx, 0x4d6394
cmp dword [ecx], edi
je 0x49b34a
add ecx, 0xc
inc edx
cmp ecx, 0x4d6508
jb 0x49b338
jmp 0x49b37a
lea ecx, [edx + edx*2]
xor eax, eax
shl ecx, 2
mov al, byte [ecx + 0x4d6391]
mov dword [0x4ffaf4], eax
mov eax, dword [ecx + 0x4d6398]
mov dword [0x4ffaf0], eax
mov al, byte [ecx + 0x4d6390]
test al, al
je 0x49b37a
test esi, esi
je 0x49b37a
mov byte [esi + 0xd], 1
cmp edx, 0x1f
jne 0x49b3a6
push edi
push str.Unknown_Error__u
push 0x4fba50
call fcn.004b77e0
add esp, 0xc
mov dword [0x4ffaf4], 1
mov dword [0x4ffaf0], 0x4fba50
mov eax, dword [esi + 8]
test eax, eax
je 0x49b3b3
push eax
call sub.WSOCK32.dll_closesocket
push esi
call fcn.0048bd90
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret