Function at 0x422cd0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x179c]
test eax, eax
je 0x422cf0
mov eax, 1
jmp 0x4234ee
push 0
call fcn.0049f19c
pop ecx
mov esi, eax
mov eax, dword [ebx + 0x17b0]
test eax, eax
jne 0x422e32
push 0x10
push 0
mov edx, dword [ebx + 0x1798]
push edx
call fcn.004930bc
add esp, 0xc
mov ecx, dword [ebx + 0x1798]
mov word [ecx], 2
mov eax, dword [ebx + 0x1814]
test eax, eax
je 0x422d4a
push 0x4f49c9
push str.Seeking_Server...
mov edx, dword [ebx + 0x1818]
push edx
call dword [ebx + 0x1814]
add esp, 0xc
mov ecx, dword [ebx + 0x17a0]
push ecx
call fcn.004228b4
pop ecx
test eax, eax
je 0x422d91
mov eax, dword [ebx + 0x17a0]
push eax
call sub.WSOCK32.DLL_gethostbyname
test eax, eax
jne 0x422d7f
mov dword [ebx + 0x38], 0x4f49d7
xor edx, edx
or eax, 0xffffffff
mov dword [ebx + 4], edx
jmp 0x4234ee
mov edx, dword [eax + 0xc]
mov ecx, dword [edx]
mov edx, dword [ebx + 0x1798]
mov eax, dword [ecx]
mov dword [edx + 4], eax
jmp 0x422da6
mov ecx, dword [ebx + 0x17a0]
push ecx
call sub.WSOCK32.DLL_inet_addr
mov edx, dword [ebx + 0x1798]
mov dword [edx + 4], eax
mov ax, word [ebx + 0x17a4]
push eax
call sub.WSOCK32.DLL_htons
mov ecx, dword [ebx + 0x1798]
mov word [ecx + 2], ax
push 0
push 1
push 2
call sub.WSOCK32.DLL_socket
mov dword [ebx + 0x1810], eax
test eax, eax
jge 0x422de6
mov dword [ebx + 0x38], 0x4f4a02
xor edx, edx
or eax, 0xffffffff
mov dword [ebx + 4], edx
jmp 0x4234ee
mov dword [ebp - 4], 1
lea edx, [ebp - 4]
push edx
push 0x8004667e
mov ecx, dword [ebx + 0x1810]
push ecx
call sub.WSOCK32.DLL_ioctlsocket
mov eax, dword [ebx + 0x1814]
test eax, eax
je 0x422e26
push 0x4f4a36
push str.Connecting_Server...
mov edx, dword [ebx + 0x1818]
push edx
call dword [ebx + 0x1814]
add esp, 0xc
inc dword [ebx + 0x17b0]
mov dword [ebx + 0x17b4], esi
mov ecx, dword [ebx + 0x17b0]
dec ecx
jne 0x422f2c
push 0x10
mov eax, dword [ebx + 0x1798]
push eax
mov edx, dword [ebx + 0x1810]
push edx
call sub.WSOCK32.DLL_connect
mov edi, eax
xor eax, eax
mov dword [ebp - 8], eax
test edi, edi
jge 0x422e82
call sub.WSOCK32.DLL_WSAGetLastError
cmp eax, 0x2735
je 0x422e82
cmp eax, 0x2733
je 0x422e82
cmp eax, 0x2726
je 0x422e82
cmp eax, 0x2748
jne 0x422e82
xor edi, edi
test edi, edi
jl 0x422ecb
mov eax, dword [ebx + 0x1814]
test eax, eax
je 0x422eaa
push 0x4f4a5f
push str.Waiting_Server_Response...
mov edx, dword [ebx + 0x1818]
push edx
call dword [ebx + 0x1814]
add esp, 0xc
push 8
push 0
lea ecx, [ebx + 0x17b8]
push ecx
call fcn.004930bc
add esp, 0xc
inc dword [ebx + 0x17b0]
mov dword [ebx + 0x17b4], esi
jmp 0x422f2c
mov eax, dword [ebx + 0x17b4]
cmp esi, eax
jb 0x422ede
mov edx, dword [ebp + 0xc]
add eax, edx
cmp esi, eax
jbe 0x422efe
mov dword [ebx + 0x38], 0x4f4a71
mov ecx, dword [ebx + 0x1810]
push ecx
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov dword [ebx + 4], eax
or eax, 0xffffffff
jmp 0x4234ee
mov edx, dword [ebp - 8]
test edx, edx
je 0x422f25
mov dword [ebx + 0x38], 0x4f4aa2
mov ecx, dword [ebx + 0x1810]
push ecx
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov dword [ebx + 4], eax
or eax, 0xffffffff
jmp 0x4234ee
xor eax, eax
jmp 0x4234ee
mov edx, dword [ebx + 0x17b0]
cmp edx, 2
jne 0x423104
push 0
lea ecx, [ebx + 0x17b8]
push 8
push ecx
mov eax, dword [ebx + 0x1810]
push eax
call fcn.0042295c
add esp, 0x10
cmp eax, 8
jne 0x4230ca
mov dl, byte [ebx + 0x17b8]
test dl, dl
je 0x42309c
lea edi, [ebx + 0x17c0]
mov word [edi], 0x23
mov eax, dword [ebx + 0x100]
mov dword [edi + 4], eax
push 0x20
mov edx, dword [ebx + 0x17a8]
push edx
lea ecx, [edi + 0xa]
push ecx
call fcn.004014d0
add esp, 0xc
lea eax, [edi + 0x2a]
push 0x20
push eax
mov edx, dword [ebx + 0x17ac]
push edx
call fcn.00420ffc
add esp, 0xc
mov ecx, dword [ebx + 0x1824]
test ecx, ecx
je 0x422fbc
mov word [edi + 8], 1
jmp 0x422fc2
mov word [edi + 8], 0
mov eax, dword [ebx + 0x1720]
test eax, eax
je 0x422fd1
or word [edi + 8], 2
mov edx, dword [ebx + 0x6cc]
test edx, edx
je 0x422fe0
or word [edi + 8], 4
mov cl, byte [0x4a6562]
test cl, cl
je 0x422fef
or word [edi + 8], 8
lea eax, [edi + 0x2a]
add edi, 0xa
mov dword [ebp - 0xc], eax
xor edx, edx
mov eax, edx
cmp edx, 0x1f
mov dword [ebp - 0x14], edi
jge 0x42304a
lea ecx, [eax + ebx + 0x17b8]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov cl, byte [ecx]
xor byte [edi], cl
mov ecx, edx
mov edi, dword [ebp - 0xc]
and cl, 0xff
inc edx
xor byte [edi], cl
mov ecx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov cl, byte [ecx]
xor byte [edi], cl
inc dword [ebp - 0xc]
inc dword [ebp - 0x14]
lea ecx, [eax + 1]
and ecx, 0x80000007
jns 0x423043
dec ecx
or ecx, 0xfffffff8
inc ecx
mov eax, ecx
cmp edx, 0x1f
jl 0x423004
push 8
lea eax, [ebx + 0x17b8]
push eax
lea edx, [ebx + 0x63c]
push edx
call fcn.0049304c
add esp, 0xc
mov eax, dword [ebx + 0x1814]
test eax, eax
je 0x423086
push 0x4f4aea
push str.Sending_Login_Information...
mov edx, dword [ebx + 0x1818]
push edx
call dword [ebx + 0x1814]
add esp, 0xc
xor ecx, ecx
mov dword [ebx + 0x180c], ecx
inc dword [ebx + 0x17b0]
mov dword [ebx + 0x17b4], esi
jmp 0x423104
mov dword [ebx + 0x38], str.New_login_not_accepted.
push 2
mov eax, dword [ebx + 0x1810]
push eax
call sub.WSOCK32.DLL_shutdown
mov edx, dword [ebx + 0x1810]
push edx
call sub.WSOCK32.DLL_closesocket
xor ecx, ecx
or eax, 0xffffffff
mov dword [ebx + 4], ecx
jmp 0x4234ee
mov eax, dword [ebx + 0x17b4]
cmp esi, eax
jb 0x4230dd
mov edx, dword [ebp + 0xc]
add eax, edx
cmp esi, eax
jbe 0x4230fd
mov dword [ebx + 0x38], 0x4f4b4a
mov ecx, dword [ebx + 0x1810]
push ecx
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov dword [ebx + 4], eax
or eax, 0xffffffff
jmp 0x4234ee
xor eax, eax
jmp 0x4234ee
mov edx, dword [ebx + 0x17b0]
cmp edx, 3
jne 0x423229
mov edi, dword [ebx + 0x180c]
cmp edi, 0x4c
jge 0x423148
mov eax, 0x4c
push 0
sub eax, edi
add edi, ebx
add edi, 0x17c0
push eax
push edi
mov edx, dword [ebx + 0x1810]
push edx
call fcn.00422938
add esp, 0x10
add dword [ebx + 0x180c], eax
jmp 0x42318d
mov ecx, dword [ebx + 0x1824]
test ecx, ecx
je 0x42318d
mov eax, dword [ebx + 0x1948]
cmp eax, 0x120
jge 0x42318d
push 0
mov edx, 0x120
mov edi, dword [ebx + 0x1948]
sub edx, edi
add edi, ebx
add edi, 0x1828
push edx
push edi
mov eax, dword [ebx + 0x1810]
push eax
call fcn.00422938
add esp, 0x10
add dword [ebx + 0x1948], eax
mov edx, dword [ebx + 0x180c]
cmp edx, 0x4c
jl 0x4231e1
mov ecx, dword [ebx + 0x1824]
test ecx, ecx
je 0x4231af
mov eax, dword [ebx + 0x1948]
cmp eax, 0x120
jl 0x4231e1
mov edx, dword [ebx + 0x1814]
test edx, edx
je 0x4231d3
push 0x4f4b99
push str.Waiting_Login_Response...
mov ecx, dword [ebx + 0x1818]
push ecx
call dword [ebx + 0x1814]
add esp, 0xc
inc dword [ebx + 0x17b0]
mov dword [ebx + 0x17b4], esi
jmp 0x423229
mov eax, dword [ebx + 0x17b4]
cmp esi, eax
jb 0x4231f4
mov edx, dword [ebp + 0xc]
add eax, edx
cmp esi, eax
jbe 0x423222
mov dword [ebx + 0x38], 0x4f4ba9
push 2
mov ecx, dword [ebx + 0x1810]
push ecx
call sub.WSOCK32.DLL_shutdown
mov eax, dword [ebx + 0x1810]
push eax
call sub.WSOCK32.DLL_closesocket
xor edx, edx
or eax, 0xffffffff
mov dword [ebx + 4], edx
jmp 0x4234ee
xor eax, eax
jmp 0x4234ee
mov edx, dword [ebx + 0x17b0]
cmp edx, 4
jne 0x423368
push 0
lea ecx, [ebp - 0x17]
push 3
push ecx
mov eax, dword [ebx + 0x1810]
push eax
call fcn.0042295c
add esp, 0x10
cmp eax, 3
jne 0x423320
mov al, byte [ebp - 0x17]
test al, al
jne 0x423266
mov dl, byte [ebp - 0x16]
test dl, dl
je 0x4232d6
xor ecx, ecx
mov cl, al
xor eax, eax
mov al, byte [ebp - 0x16]
shl eax, 8
or ecx, eax
mov dword [ebx + 0x1794], ecx
xor eax, eax
mov al, byte [ebp - 0x15]
test al, 1
jne 0x4232a6
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x423294
mov dl, byte [0x4a6562]
test dl, dl
jne 0x423299
cmp eax, 2
jne 0x4232c5
push 1
push ebx
mov ecx, dword [ebx]
call dword [ecx + 0x38]
add esp, 8
jmp 0x4232c5
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x4232b7
mov dl, byte [0x4a6562]
test dl, dl
je 0x4232ba
dec eax
jne 0x4232c5
push 2
push ebx
mov ecx, dword [ebx]
call dword [ecx + 0x38]
add esp, 8
inc dword [ebx + 0x17b0]
mov dword [ebx + 0x17b4], esi
jmp 0x423368
mov al, byte [ebp - 0x15]
test al, al
jbe 0x4232f1
cmp al, 0x18
ja 0x4232f1
xor edx, edx
mov dl, al
mov ecx, dword [edx*4 + 0x4f3544]
mov dword [ebx + 0x38], ecx
jmp 0x4232f9
mov eax, dword [str.Other_Failure]
mov dword [ebx + 0x38], eax
push 2
mov edx, dword [ebx + 0x1810]
push edx
call sub.WSOCK32.DLL_shutdown
mov ecx, dword [ebx + 0x1810]
push ecx
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov dword [ebx + 4], eax
or eax, 0xffffffff
jmp 0x4234ee
mov eax, dword [ebx + 0x17b4]
cmp esi, eax
jb 0x423333
mov edx, dword [ebp + 0xc]
add eax, edx
cmp esi, eax
jbe 0x423361
mov dword [ebx + 0x38], 0x4f4be6
push 2
mov ecx, dword [ebx + 0x1810]
push ecx
call sub.WSOCK32.DLL_shutdown
mov eax, dword [ebx + 0x1810]
push eax
call sub.WSOCK32.DLL_closesocket
xor edx, edx
or eax, 0xffffffff
mov dword [ebx + 4], edx
jmp 0x4234ee
xor eax, eax
jmp 0x4234ee
mov edx, dword [ebx + 0x17b0]
cmp edx, 5
jne 0x4234e9
mov byte [ebp - 0x3c], 0
push 0
lea ecx, [ebp - 0x3c]
push 0x1e
push ecx
mov eax, dword [ebx + 0x1810]
push eax
call fcn.0042295c
add esp, 0x10
cmp eax, 0x1e
jne 0x42349f
push 0
push 0
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebx + 0xd8]
push ecx
call fcn.0040d468
add esp, 0x10
mov dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x1c]
lea edx, [ebp - 0x4c]
push eax
push edx
mov ecx, dword [ebx + 0x1810]
push ecx
call sub.WSOCK32.DLL_getsockname
mov ax, word [ebp - 0x4a]
push eax
call sub.WSOCK32.DLL_ntohs
movzx edx, ax
mov dword [ebx + 0xdc], edx
push 0
call fcn.0049f19c
pop ecx
mov dword [ebx + 0xe8], eax
mov ecx, dword [ebx + 0x1814]
test ecx, ecx
je 0x423412
push 0x4f4c2c
push str.Login_Success...
mov eax, dword [ebx + 0x1818]
push eax
call dword [ebx + 0x1814]
add esp, 0xc
mov edx, dword [ebx + 0x6cc]
test edx, edx
jne 0x423442
mov ecx, dword [ebx + 0x1810]
mov dword [ebx + 0x634], ecx
mov ax, word [ebx + 0x1794]
mov word [ebx + 0x173a], ax
mov dword [ebx + 0x179c], 1
jmp 0x423496
push 0
lea edx, [ebx + 0x6d0]
push 0xf
push edx
mov ecx, dword [ebx + 0x1810]
push ecx
call fcn.0042295c
add esp, 0x10
mov esi, eax
push 2
mov eax, dword [ebx + 0x1810]
push eax
call sub.WSOCK32.DLL_shutdown
mov edx, dword [ebx + 0x1810]
push edx
call sub.WSOCK32.DLL_closesocket
cmp esi, 0xf
je 0x423496
xor ecx, ecx
xor eax, eax
mov dword [ebx + 0x1794], ecx
mov dword [ebx + 0x38], 0x4f4c38
mov dword [ebx + 4], eax
or eax, 0xffffffff
jmp 0x4234ee
mov dword [ebx + 4], 1
jmp 0x4234e9
mov eax, dword [ebx + 0x17b4]
cmp esi, eax
jb 0x4234b2
mov edx, dword [ebp + 0xc]
add eax, edx
cmp esi, eax
jbe 0x4234e5
xor ecx, ecx
mov dword [ebx + 0x1794], ecx
mov dword [ebx + 0x38], 0x4f4c75
push 2
mov eax, dword [ebx + 0x1810]
push eax
call sub.WSOCK32.DLL_shutdown
mov edx, dword [ebx + 0x1810]
push edx
call sub.WSOCK32.DLL_closesocket
xor ecx, ecx
or eax, 0xffffffff
mov dword [ebx + 4], ecx
jmp 0x4234ee
xor eax, eax
jmp 0x4234ee
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret