Function at 0x414490
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Get socket status

Disassembly:
mov eax, 0x3548
call fcn.0043ae00
mov eax, dword [esp + 0x354c]
mov edx, dword [0x51a850]
push ebx
mov ebx, dword [esp + 0x3554]
lea eax, [eax + eax*2]
push ebp
push esi
push edi
lea ebp, [eax + eax*4]
mov al, byte [ebx + 1]
mov esi, ecx
lea ebp, [ebp + ebp*4]
mov dword [esp + 0x10], esi
shl ebp, 2
cmp al, 1
mov edi, dword [edx + ebp]
mov dword [esp + 0x14], edi
jne 0x414916
push 1
push 0
push 0
push 0
push 1
push 2
mov byte [ebx], 0
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov ecx, dword [0x51a850]
mov dword [ecx + ebp + 4], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x41451c
push 8
push ebx
push edi
mov ecx, esi
mov byte [ebx + 1], 0x5b
call fcn.00411190
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov al, byte [0x473aa0]
mov ecx, 0xff
mov byte [esp + 0x14c], al
xor eax, eax
lea edi, [esp + 0x14d]
mov dx, word [ebx + 2]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 4]
mov word [esp + 0x22], dx
stosw word es:[edi], ax
push ecx
stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 6
mov eax, ecx
mov esi, edi
mov edi, edx
push str.0.0.0.
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x154]
push ecx
call fcn.00445b80
add esp, 0xc
test eax, eax
jne 0x414655
lea edx, [ebx + 8]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, dword [0x51a850]
not ecx
dec ecx
add edx, ecx
mov ecx, dword [eax + ebp + 0x18]
mov esi, edx
mov dword [esp + 0x18], edx
sub esi, ebx
inc esi
cmp ecx, 2
jne 0x41461d
lea edi, [esi + ebx]
jmp 0x4145c2
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push 8
push ecx
mov ecx, dword [esp + 0x18]
push edi
push edx
mov dword [esp + 0x2c], 1
call fcn.004112c0
test eax, eax
je 0x414d0b
cmp byte [edi], 0
je 0x414619
inc esi
inc edi
mov dword [esp + 0x1c], edi
lea edi, [ebx + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfe
cmp esi, ecx
jg 0x414d0b
mov eax, dword [0x51a850]
cmp dword [eax + ebp + 0x18], 2
je 0x4145be
mov edx, dword [esp + 0x18]
mov ecx, dword [0x51a850]
cmp dword [ecx + ebp + 0x18], 2
jne 0x414d0b
lea edi, [edx + 1]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cl, byte [0x473aa0]
xor eax, eax
mov byte [esp + 0x54c], cl
mov ecx, 0x400
lea edi, [esp + 0x54d]
rep stosd dword es:[edi], eax
mov eax, dword [0x51a850]
mov ecx, dword [eax + ebp + 0xc]
mov eax, dword [eax + ebp + 0x20]
cmp eax, 0xffffffff
je 0x4146b3
mov edx, eax
shl edx, 5
add edx, eax
mov eax, dword [0x4f4398]
lea edx, [eax + edx*4]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea eax, [esp + 0x554]
push str._s__s_SOCKS4
push eax
call fcn.0043afc4
add esp, 0x10
jmp 0x4146d0
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x550]
push str._s_unknown_SOCKS4
push ecx
call fcn.0043afc4
add esp, 0xc
mov eax, dword [0x501cf0]
test eax, eax
je 0x414757
mov dl, byte [0x473aa0]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x1551]
mov byte [esp + 0x1550], dl
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x22]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 0xffff
lea ecx, [esp + 0x14c]
push eax
push ecx
lea edx, [esp + 0x1558]
push str.CONNECT__s:_d
push edx
call fcn.0043afc4
lea edi, [esp + 0x1560]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x54c]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x54c]
push eax
call fcn.0040a330
mov ecx, dword [0x51a850]
add esp, 4
mov eax, dword [ecx + ebp + 0x20]
cmp eax, 0xffffffff
je 0x414853
mov edx, eax
shl edx, 5
add edx, eax
mov eax, dword [0x4f4398]
mov ecx, dword [eax + edx*4 + 0x74]
cmp ecx, 0xffffffff
je 0x414853
mov eax, ecx
mov edx, dword [0x4f43b0]
shl eax, 5
add eax, ecx
shl eax, 3
sub eax, ecx
lea ecx, [eax + eax*2]
shl ecx, 4
lea eax, [ecx + edx]
mov ecx, dword [ecx + edx + 0x313c]
test ecx, ecx
je 0x414853
cmp dword [eax + 0x314c], 1
jne 0x414853
mov esi, dword [esp + 0x10]
add eax, 0x31
push eax
lea eax, [esp + 0x150]
push eax
mov ecx, esi
call fcn.004199f0
test eax, eax
je 0x414857
mov edx, dword [0x4f944c]
test edx, edx
jne 0x41482c
lea ecx, [esp + 0x14c]
push ecx
push 0x4f904c
push ebx
call fcn.0043afc4
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x14]
not ecx
dec ecx
push ecx
push ebx
push edx
mov ecx, esi
call fcn.00411190
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x14]
not ecx
dec ecx
push ecx
push edx
push eax
mov ecx, esi
call fcn.00411190
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x22]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 0xffff
lea edx, [esp + 0x150]
push eax
mov eax, dword [0x51a850]
push edx
mov ecx, dword [eax + ebp + 4]
push ecx
mov ecx, esi
call fcn.00419740
test eax, eax
jne 0x4148a7
mov edx, dword [esp + 0x14]
push 0xa
push ebx
push edx
mov ecx, esi
mov byte [ebx + 1], 0x5c
call fcn.00411190
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov edx, dword [0x51a850]
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0x10
push eax
mov eax, dword [edx + ebp + 4]
lea ecx, [esp + 0x3c]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x14]
mov dx, word [esp + 0x3a]
push 8
mov dword [ebx + 2], ecx
push ebx
push edi
mov ecx, esi
mov byte [ebx + 1], 0x5a
mov word [ebx + 4], dx
call fcn.00411190
mov eax, dword [0x51a850]
mov edx, dword [esp + 0x355c]
push 0
push edi
mov ecx, dword [eax + ebp + 4]
push ecx
push edx
mov ecx, esi
call fcn.00417ca0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
cmp al, 2
jne 0x414d0b
mov al, byte [0x473aa0]
mov ecx, 0x400
mov byte [esp + 0x54c], al
xor eax, eax
lea edi, [esp + 0x54d]
rep stosd dword es:[edi], eax
mov eax, dword [edx + ebp + 0xc]
mov edx, dword [edx + ebp + 0x20]
cmp edx, 0xffffffff
je 0x414979
mov ecx, edx
mov esi, dword [sym.imp.WS2_32.dll_inet_ntoa]
shl ecx, 5
add ecx, edx
mov edx, dword [0x4f4398]
lea ecx, [edx + ecx*4]
push ecx
push eax
call esi
push eax
lea edx, [esp + 0x554]
push str._s__s_SOCKS4
push edx
call fcn.0043afc4
add esp, 0x10
jmp 0x414998
mov esi, dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call esi
push eax
lea eax, [esp + 0x550]
push str._s_unknown_SOCKS4
push eax
call fcn.0043afc4
add esp, 0xc
mov eax, dword [0x501cf0]
xor edi, edi
cmp eax, edi
je 0x414a75
mov dl, byte [0x473aa0]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x2555]
mov byte [esp + 0x2554], dl
mov byte [esp + 0x1550], dl
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x1551]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 4]
push ecx
call esi
test eax, eax
je 0x414a09
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1550]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cx, word [ebx + 2]
mov word [esp + 0x3a], cx
mov edx, dword [esp + 0x3a]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 0xffff
lea ecx, [esp + 0x2554]
push eax
lea eax, [esp + 0x1554]
push eax
push str.BIND__s:_d
push ecx
call fcn.0043afc4
lea edi, [esp + 0x2564]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x54c]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
lea eax, [esp + 0x54c]
push eax
call fcn.0040a330
add esp, 4
mov byte [ebx], 0
push 1
push edi
push edi
push edi
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov ecx, dword [0x51a850]
mov dword [ecx + ebp + 4], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x414acd
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push 0xa
push ebx
push edx
mov byte [ebx + 1], 0x5b
call fcn.00411190
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov ecx, dword [0x51a850]
mov word [esp + 0x22], di
mov word [esp + 0x20], 2
mov dword [esp + 0x24], edi
mov edx, dword [ecx + ebp + 4]
lea eax, [esp + 0x20]
push 0x10
push eax
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x414d0b
mov eax, dword [0x51a850]
push 5
mov ecx, dword [eax + ebp + 4]
push ecx
call dword [sym.imp.WS2_32.dll_listen]
mov ecx, dword [0x51a850]
lea edx, [esp + 0x18]
mov dword [esp + 0x18], 0x10
push edx
mov edx, dword [ecx + ebp + 4]
lea eax, [esp + 0x24]
push eax
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
mov cx, word [esp + 0x22]
mov eax, dword [0x502114]
mov esi, dword [esp + 0x14]
push 8
mov word [ebx + 2], cx
mov ecx, dword [esp + 0x14]
push ebx
push esi
mov dword [esp + 0x30], eax
mov byte [ebx + 1], 0x5a
mov dword [ebx + 4], eax
call fcn.00411190
test eax, eax
je 0x414d0b
mov eax, dword [0x51a850]
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], edi
cmp dword [eax + ebp + 0x18], 2
jne 0x414d0b
mov dword [esp + 0x48], 0
mov edx, dword [eax + ebp + 4]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x48], 1
xor eax, eax
lea ecx, [esp + 0x4c]
cmp dword [ecx], esi
je 0x414bab
inc eax
add ecx, 4
cmp eax, 1
jb 0x414b9e
cmp eax, 1
jne 0x414bbc
mov dword [esp + 0x50], esi
mov dword [esp + 0x48], 2
lea eax, [esp + 0x30]
lea ecx, [esp + 0x48]
push eax
push 0
push 0
push ecx
push 0x40
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x414bf4
mov eax, dword [0x502140]
cmp eax, 0xffffffff
je 0x414c33
lea eax, [eax + eax*2]
inc edi
lea edx, [eax + eax*4]
shl edx, 2
cmp edi, edx
jg 0x414d0b
jmp 0x414c33
xor edi, edi
test eax, eax
jl 0x414d0b
mov ecx, dword [0x51a850]
lea eax, [esp + 0x48]
push eax
mov edx, dword [ecx + ebp + 4]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x414c50
mov ecx, dword [0x51a850]
lea eax, [esp + 0x48]
push eax
mov edx, dword [ecx + ebp]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x414ce9
mov eax, dword [0x51a850]
cmp dword [eax + ebp + 0x18], 2
je 0x414b80
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov ecx, dword [0x51a850]
mov dword [esp + 0x18], 0x10
lea eax, [esp + 0x38]
mov edx, dword [ecx + ebp + 4]
mov ecx, dword [esp + 0x10]
push eax
push edx
call fcn.00411780
mov edi, eax
test edi, edi
je 0x414d0b
mov ax, word [esp + 0x3a]
mov ecx, dword [esp + 0x3c]
mov byte [ebx], 0
mov byte [ebx + 1], 0x5a
mov word [ebx + 2], ax
mov dword [ebx + 4], ecx
mov edx, dword [0x51a850]
push 8
push ebx
mov ebx, dword [esp + 0x18]
mov eax, dword [edx + ebp]
mov ecx, ebx
push eax
call fcn.00411190
test eax, eax
jne 0x414cc2
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov ecx, dword [esp + 0x355c]
push 0
push esi
push edi
push ecx
mov ecx, ebx
call fcn.00417ca0
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8
mov eax, dword [0x51a850]
lea edx, [esp + 0x18]
mov dword [esp + 0x18], 0x1000
push 0
mov ecx, dword [eax + ebp]
push edx
push ebx
push ecx
mov ecx, dword [esp + 0x20]
call fcn.004112c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3548
ret 8