Function at 0x420142
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
push 0x10
call fcn.0043e388
add esp, 4
mov dword [ebp - 0x18], eax
mov ebx, eax
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
add ebx, 0xc
push ebx
push 0x10
call fcn.0043e388
add esp, 4
pop ebx
mov dword [ebx], eax
mov edi, eax
mov esi, 0x46e883
lodsd eax, dword [esi]
stosd dword es:[edi], eax
lodsd eax, dword [esi]
stosd dword es:[edi], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x10
call fcn.0043e388
add esp, 4
mov dword [ebp - 0x1c], eax
mov ebx, eax
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
add ebx, 0xc
push ebx
push 0x10
call fcn.0043e388
add esp, 4
pop ebx
mov dword [ebx], eax
mov edi, eax
mov esi, 0x46e883
lodsd eax, dword [esi]
stosd dword es:[edi], eax
lodsd eax, dword [esi]
stosd dword es:[edi], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x20], esp
push 4
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
xor eax, eax
call dword [sym.imp.KERNEL32.dll_RtlMoveMemory]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x420243
push 0
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
fild dword [ebp + 8]
fstp qword [ebp - 0x24]
fld qword [ebp - 0x24]
fadd qword [0x46e821]
fstp qword [ebp - 0x2c]
mov dword [ebp - 0x30], esp
push 4
fld qword [ebp - 0x2c]
call fcn.00401272
push eax
lea eax, [ebp - 8]
push eax
xor eax, eax
call dword [sym.imp.KERNEL32.dll_RtlMoveMemory]
nop
nop
cmp dword [ebp - 0x30], esp
je 0x420290
push 0xed
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
fild dword [ebp + 8]
fstp qword [ebp - 0x24]
fld qword [ebp - 0x24]
fadd qword [0x46e829]
fstp qword [ebp - 0x2c]
mov dword [ebp - 0x30], esp
push 4
fld qword [ebp - 0x2c]
call fcn.00401272
push eax
lea eax, [ebp - 0xc]
push eax
xor eax, eax
call dword [sym.imp.KERNEL32.dll_RtlMoveMemory]
nop
nop
cmp dword [ebp - 0x30], esp
je 0x4202dd
push 0x153
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
cmp dword [ebp + 0x34], 0x3e8
jge 0x4202f1
mov dword [ebp + 0x34], 0xbb8
mov dword [ebp - 0x20], esp
push 1
push 0
push 0
push 6
push 1
push 2
xor eax, eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x420338
push 0x1ff
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x420896
push 1
push 0
push dword [ebp - 0x10]
call fcn.0042090e
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x420397
mov dword [ebp - 0x20], esp
push dword [ebp - 0x10]
xor eax, eax
call dword [sym.imp.WS2_32.dll_closesocket]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x42038d
push 0x2b2
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov eax, 0
jmp 0x4208ce
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x20], esp
push 4
lea eax, [ebp - 0x14]
push eax
push 4
push 0xffff
push dword [ebp - 0x10]
xor eax, eax
call dword [0x46fa9d]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x4203dd
push 0x320
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
push reloc.WS2_32.dll_connect
push 0
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
jne 0x4203f2
mov eax, 0x46a2f3
push eax
push 1
mov ebx, 0x178
call fcn.004406e0
add esp, 0x10
mov dword [ebp - 0x20], eax
push 0x46a2f3
push dword [ebp - 0x20]
call fcn.004010c1
add esp, 8
cmp eax, 0
mov eax, 0
sete al
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x420436
push ebx
call fcn.0043e38e
add esp, 4
cmp dword [ebp - 0x24], 0
je 0x42045e
mov eax, str.0.0.0.0
push eax
mov ebx, dword [ebp + 0xc]
mov ebx, dword [ebx]
test ebx, ebx
je 0x420458
push ebx
call fcn.0043e38e
add esp, 4
pop eax
mov ebx, dword [ebp + 0xc]
mov dword [ebx], eax
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 0x20]
mov word [ebx], 2
mov ebx, dword [ebp - 0x18]
add ebx, 4
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], esp
push dword [ebp + 0x14]
xor eax, eax
call dword [sym.imp.WS2_32.dll_htons]
nop
nop
cmp dword [ebp - 0x24], esp
je 0x4204a1
push 0x470
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov ebx, dword [ebp - 0x20]
mov word [ebx], ax
mov ebx, dword [ebp - 0x18]
add ebx, 8
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], esp
mov ebx, dword [ebp + 0xc]
push dword [ebx]
xor eax, eax
call dword [sym.imp.WS2_32.dll_inet_addr]
nop
nop
cmp dword [ebp - 0x24], esp
je 0x4204de
push 0x4ad
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov ebx, dword [ebp - 0x20]
mov dword [ebx], eax
mov dword [ebp - 0x20], esp
push 4
mov edx, 0
mov eax, 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
lea eax, [ebp - 0x28]
push eax
push 0xffffff7f
push 6
push dword [ebp - 0x10]
xor eax, eax
call dword [0x46faa1]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x420532
push 0x643
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov dword [ebp - 0x20], esp
push 0x10
mov eax, dword [ebp - 0x18]
push eax
push 0x10
call fcn.0043e388
add esp, 4
mov edi, eax
pop ebx
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push ebx
mov ebx, dword [ebx]
add ebx, 8
mov ecx, 8
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
pop ebx
add ebx, 4
push dword [ebp - 0x10]
xor eax, eax
call dword [sym.imp.WS2_32.dll_bind]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x4205b4
push 0x6b1
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
push eax
mov ebx, dword [ebp - 0x24]
push ebx
mov edi, dword [ebp - 0x28]
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push ebx
push edi
push 1
mov eax, 2
call fcn.0043ec80
add esp, 4
pop edi
pop ebx
push ebx
push edi
mov edi, dword [edi]
mov ecx, dword [edi]
add edi, 4
test ecx, ecx
je 0x42060b
mov eax, dword [edi]
add edi, 4
dec ecx
je 0x420609
imul eax, dword [edi]
jmp 0x4205fe
mov ecx, eax
cmp ecx, 8
jle 0x420615
mov ecx, 8
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
pop edi
pop ebx
add edi, 4
add ebx, 8
call fcn.0043e38e
add esp, 4
pop eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x420637
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 0x20]
mov word [ebx], 2
mov ebx, dword [ebp - 0x1c]
add ebx, 4
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], esp
push dword [ebp + 0x24]
xor eax, eax
call dword [sym.imp.WS2_32.dll_htons]
nop
nop
cmp dword [ebp - 0x24], esp
je 0x42067a
push 0x76d
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov ebx, dword [ebp - 0x20]
mov word [ebx], ax
mov ebx, dword [ebp - 0x1c]
add ebx, 8
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], esp
mov ebx, dword [ebp + 0x1c]
push dword [ebx]
xor eax, eax
call dword [sym.imp.WS2_32.dll_inet_addr]
nop
nop
cmp dword [ebp - 0x24], esp
je 0x4206b7
push 0x7aa
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov ebx, dword [ebp - 0x20]
mov dword [ebx], eax
mov dword [ebp - 0x20], esp
push 0
push 0
push 0
push 0
push 0x10
mov eax, dword [ebp - 0x1c]
push eax
push 0x10
call fcn.0043e388
add esp, 4
mov edi, eax
pop ebx
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov word [edi], ax
add edi, 2
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push ebx
mov ebx, dword [ebx]
add ebx, 8
mov ecx, 8
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
pop ebx
add ebx, 4
push dword [ebp - 0x10]
xor eax, eax
call dword [sym.imp.WS2_32.dll_WSAConnect]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x420752
push 0x7fc
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
push eax
mov ebx, dword [ebp - 0x24]
push ebx
mov edi, dword [ebp - 0x28]
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov ax, word [ebx]
add ebx, 2
mov dword [edi], eax
add edi, 4
mov eax, dword [ebx]
add ebx, 4
mov dword [edi], eax
add edi, 4
push ebx
push edi
push 1
mov eax, 2
call fcn.0043ec80
add esp, 4
pop edi
pop ebx
push ebx
push edi
mov edi, dword [edi]
mov ecx, dword [edi]
add edi, 4
test ecx, ecx
je 0x4207a9
mov eax, dword [edi]
add edi, 4
dec ecx
je 0x4207a7
imul eax, dword [edi]
jmp 0x42079c
mov ecx, eax
cmp ecx, 8
jle 0x4207b3
mov ecx, 8
mov esi, ebx
rep movsb byte es:[edi], byte [esi]
pop edi
pop ebx
add edi, 4
add ebx, 8
call fcn.0043e38e
add esp, 4
pop eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x42083e
mov dword [ebp - 0x20], esp
xor eax, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x4207fe
push 0x8c7
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov ebx, dword [ebp + 0x3c]
mov dword [ebx], eax
mov ebx, dword [ebp + 0x3c]
cmp dword [ebx], 0x2733
je 0x42081c
mov eax, 0
jmp 0x4208ce
push dword [ebp + 0x34]
push dword [ebp - 0x10]
call fcn.00420989
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 1
je 0x42083e
mov eax, 0
jmp 0x4208ce
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp + 0x2c]
mov dword [ebx], eax
mov dword [ebp - 0x20], 0
push 0
push dword [ebp - 0x20]
mov dword [ebp - 0x24], 0
push 0
push dword [ebp - 0x24]
push dword [ebp - 0x10]
call fcn.00420b9f
mov eax, dword [ebp - 0x10]
jmp 0x4208ce
mov dword [ebp - 0x20], esp
xor eax, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
nop
nop
cmp dword [ebp - 0x20], esp
je 0x4208bf
push 0xc0a
push 0x402ecdb
push 6
call fcn.0043e37c
add esp, 0xc
mov ebx, dword [ebp + 0x3c]
mov dword [ebx], eax
mov eax, 0
jmp 0x4208ce
push eax
mov ebx, dword [ebp - 0x18]
push ebx
add ebx, 0xc
push ebx
mov ebx, dword [ebx]
push ebx
call fcn.0043e38e
add esp, 4
pop ebx
call fcn.0043e38e
add esp, 4
mov ebx, dword [ebp - 0x1c]
push ebx
add ebx, 0xc
push ebx
mov ebx, dword [ebx]
push ebx
call fcn.0043e38e
add esp, 4
pop ebx
call fcn.0043e38e
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x3c