Function at 0x4125e0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Get socket status
Receive data
Receive data on socket
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket

Disassembly:
mov eax, 0x1174
call fcn.0043ae00
mov al, byte [0x473aa0]
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov byte [esp + 0x180], al
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x181]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], eax
mov eax, dword [0x4fb8a4]
test eax, eax
mov dword [esp + 0x1c], ebp
mov esi, 0x4fb8a8
jne 0x412627
mov esi, 0x4fccc4
mov edi, 2
test eax, eax
mov eax, dword [0x4fc0a8]
mov word [esp + 0x44], di
jne 0x41263f
mov eax, dword [0x4ff0c8]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push esi
mov word [esp + 0x4a], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0x48], eax
jne 0x412675
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x41289a
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0x48], eax
mov ebx, dword [esp + 0x118c]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x54]
push 0x10
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_WSAConnect]
test eax, eax
jne 0x41289a
mov eax, dword [0x4fb8a4]
test eax, eax
je 0x4126c6
push 0x46f7a8
push 0x4fbca8
call fcn.0043fa60
add esp, 8
test eax, eax
je 0x4126ed
mov eax, dword [0x4fb8a4]
test eax, eax
jne 0x41289a
mov eax, dword [0x4fc8b4]
test eax, eax
je 0x41289a
push 0x46f7a8
push 0x4fe0c4
call fcn.0043fa60
add esp, 8
test eax, eax
jne 0x41289a
mov eax, dword [0x4fb8a4]
test eax, eax
mov eax, dword [0x4fc0ac]
jne 0x412700
mov eax, dword [0x4ff0dc]
test eax, eax
mov byte [esp + 0x180], 5
je 0x4128bc
lea edx, [esp + 0x180]
push 4
push edx
push ebx
mov ecx, ebp
mov byte [esp + 0x18d], 2
mov byte [esp + 0x18e], 0
mov byte [esp + 0x18f], 2
mov dword [esp + 0x1c], 4
call fcn.00411190
lea eax, [esp + 0x10]
push 8
lea ecx, [esp + 0x184]
push eax
push ecx
push ebx
mov ecx, ebp
mov dword [esp + 0x20], edi
call fcn.004112c0
cmp byte [esp + 0x180], 5
jne 0x41289a
mov al, byte [esp + 0x181]
cmp al, 2
jne 0x4128a9
mov ebp, dword [0x4fb8a4]
mov byte [esp + 0x180], 1
test ebp, ebp
mov edi, 0x4fc0b0
jne 0x412796
mov edi, 0x4ff4ec
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x4fc0b0
mov edx, ecx
test ebp, ebp
mov byte [esp + 0x181], dl
jne 0x4127b7
mov edi, 0x4ff4ec
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea esi, [esp + 0x182]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x14], esi
mov esi, edi
mov edi, dword [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
add edx, 2
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test ebp, ebp
mov edi, 0x4fc4b0
jne 0x4127f2
mov edi, 0x5008ec
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x4fc4b0
test ebp, ebp
mov byte [esp + edx + 0x180], cl
jne 0x412811
mov edi, 0x5008ec
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea esi, [esp + edx + 0x181]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x14], esi
mov esi, edi
mov edi, dword [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test ebp, ebp
mov edi, 0x4fc4b0
jne 0x412849
mov edi, 0x5008ec
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov esi, dword [esp + 0x1c]
not ecx
dec ecx
lea eax, [edx + ecx + 1]
lea ecx, [esp + 0x180]
push eax
push ecx
push ebx
mov ecx, esi
mov dword [esp + 0x1c], eax
call fcn.00411190
lea edx, [esp + 0x10]
push 8
lea eax, [esp + 0x184]
push edx
push eax
push ebx
mov ecx, esi
mov dword [esp + 0x20], 2
call fcn.004112c0
mov al, byte [esp + 0x181]
test al, al
je 0x412918
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1174
ret 0x18
test al, al
je 0x41291c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1174
ret 0x18
lea ecx, [esp + 0x180]
push 3
push ecx
push ebx
mov ecx, ebp
mov byte [esp + 0x18d], 1
mov byte [esp + 0x18e], 0
mov dword [esp + 0x1c], 3
call fcn.00411190
lea edx, [esp + 0x10]
push 8
lea eax, [esp + 0x184]
push edx
push eax
push ebx
mov ecx, ebp
mov dword [esp + 0x20], edi
call fcn.004112c0
cmp byte [esp + 0x180], 5
jne 0x41289a
mov al, byte [esp + 0x181]
test al, al
jne 0x41289a
jmp 0x41291c
mov ebp, dword [esp + 0x1c]
mov esi, dword [sym.imp.WS2_32.dll_getsockname]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x5c]
push ecx
push edx
push ebx
mov byte [esp + 0x18c], 5
mov byte [esp + 0x18d], 3
mov byte [esp + 0x18e], 0
mov byte [esp + 0x18f], 1
mov dword [esp + 0x1c], 0x10
call esi
mov eax, dword [esp + 0x60]
lea ecx, [esp + 0x10]
mov dword [esp + 0x184], eax
mov eax, dword [esp + 0x1188]
push ecx
lea edx, [esp + 0x60]
lea eax, [eax + eax*2]
push edx
lea eax, [eax + eax*4]
lea edi, [eax + eax*4]
mov eax, dword [0x51a850]
shl edi, 2
mov ecx, dword [edi + eax + 4]
push ecx
call esi
mov dx, word [esp + 0x5e]
mov esi, 0xa
lea eax, [esp + 0x180]
push esi
push eax
push ebx
mov ecx, ebp
mov word [esp + 0x194], dx
mov dword [esp + 0x1c], esi
call fcn.00411190
lea ecx, [esp + 0x10]
push 8
lea edx, [esp + 0x184]
push ecx
push edx
push ebx
mov ecx, ebp
mov dword [esp + 0x20], esi
call fcn.004112c0
cmp byte [esp + 0x180], 5
jne 0x41289a
mov al, byte [esp + 0x181]
test al, al
jne 0x41289a
xor eax, eax
mov edx, dword [esp + 0x48]
mov dword [esp + 0x34], eax
mov ecx, 2
mov dword [esp + 0x38], eax
xor ebp, ebp
mov dword [esp + 0x3c], eax
mov word [esp + 0x34], cx
mov dword [esp + 0x40], eax
mov ax, word [esp + 0x188]
mov word [esp + 0x36], ax
mov eax, dword [0x51a850]
mov dword [esp + 0x38], edx
mov dword [esp + 0x54], 1
mov dword [esp + 0x58], ebp
mov edx, dword [edi + eax]
mov esi, dword [edi + eax + 4]
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
mov edx, dword [edi + eax + 0x18]
mov dword [esp + 0x24], ebp
cmp edx, ecx
jne 0x412c7c
mov edx, 1
mov dword [esp + 0x80], esi
mov dword [esp + 0x7c], edx
xor eax, eax
lea ecx, [esp + 0x80]
mov ebp, dword [esp + 0x20]
cmp dword [ecx], ebp
je 0x412a7b
inc eax
add ecx, 4
cmp eax, 1
jb 0x412a6a
cmp eax, 1
jne 0x412a90
mov edx, 2
mov dword [esp + 0x84], ebp
mov dword [esp + 0x7c], edx
xor ebp, ebp
xor eax, eax
cmp edx, ebp
jbe 0x412aab
lea ecx, [esp + 0x80]
cmp dword [ecx], ebx
je 0x412aab
inc eax
add ecx, 4
cmp eax, edx
jb 0x412a9f
cmp eax, edx
jne 0x412ac4
cmp edx, 0x40
jae 0x412ac4
mov dword [esp + eax*4 + 0x80], ebx
mov eax, dword [esp + 0x7c]
inc eax
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x54]
lea ecx, [esp + 0x7c]
push eax
push ebp
push ebp
push ecx
push 0x40
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebp
jne 0x412b09
mov eax, dword [0x502140]
cmp eax, 0xffffffff
je 0x412bee
mov ecx, dword [esp + 0x24]
lea eax, [eax + eax*2]
inc ecx
lea edx, [eax + eax*4]
mov dword [esp + 0x24], ecx
shl edx, 2
cmp ecx, edx
jg 0x41289a
jmp 0x412bee
cmp eax, ebp
mov dword [esp + 0x24], ebp
jl 0x412c7c
lea eax, [esp + 0x7c]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x412bcc
mov eax, 0xff6
lea ecx, [esp + 0x18a]
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], eax
push ebp
lea edx, [esp + 0x34]
mov dword [esp + 0x30], ecx
push ebp
lea eax, [esp + 0x74]
push edx
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
lea eax, [esp + 0x40]
push 1
push eax
push esi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x54], 0x10
call dword [sym.imp.WS2_32.dll_WSARecvFrom]
mov eax, dword [esp + 0x18]
cmp eax, ebp
jbe 0x412c11
mov ecx, dword [esp + 0x2c]
push eax
push ecx
call fcn.0040eee0
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x119c]
add esp, 8
cmp edx, eax
jne 0x412bb0
mov ax, word [esp + 0x6e]
cmp ax, word [esp + 0x1192]
jne 0x412bb0
push 0x10
lea ecx, [esp + 0x38]
jmp 0x412bb9
push 0x10
lea ecx, [esp + 0x1194]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
push ecx
push ebp
push edx
push eax
push esi
call dword [sym.imp.WS2_32.dll_sendto]
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x7c]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x412c26
lea eax, [esp + 0x7c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x412c5c
mov ecx, dword [0x51a850]
cmp dword [edi + ecx + 0x18], 2
je 0x412a51
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1174
ret 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1174
ret 0x18
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x10]
push ebp
lea eax, [esp + 0x184]
push edx
push eax
push ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x20], 0x1000
call fcn.004112c0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1174
ret 0x18
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x10]
push ebp
lea eax, [esp + 0x184]
push edx
push eax
push ebx
mov dword [esp + 0x20], 0x1000
call fcn.004112c0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1174
ret 0x18