Function at 0x410240
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d0
mov eax, dword [0x481a58]
xor eax, ebp
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18c]
push eax
lea ecx, [ebp - 0x58]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00452c70
add esp, 0xc
mov dword [ebp - 0x60], 0
call fcn.0040d640
cmp eax, 1
jne 0x410283
mov eax, dword [0x481354]
mov dword [ebp - 0x60], eax
push 6
push 1
push 0x17
call fcn.00453050
add esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x410598
cmp dword [ebp - 0x60], 6
je 0x4102ae
cmp dword [ebp - 0x60], 7
jne 0x4103c6
push str.Use_SOCKS5_BIND
call fcn.00456e80
add esp, 4
mov ecx, dword [ebp + 0xc]
push ecx
push 0x1c
lea edx, [ebp - 0x18c]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00453540
add esp, 0x10
cmp eax, 0xffffffff
je 0x4103c1
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.00410970
add esp, 8
test eax, eax
jne 0x41030c
mov eax, dword [ebp - 0x10]
push eax
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x10]
jmp 0x41065d
movzx ecx, word [ebp - 0x56]
push ecx
push 0x4854d0
lea edx, [ebp - 0x50]
push edx
mov eax, dword [0x485524]
push eax
push 2
lea ecx, [ebp - 0x170]
push ecx
call fcn.00410740
add esp, 0x18
mov dword [ebp - 0xc], eax
mov byte [ebp - 0x2cf], 0xff
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0xc]
push eax
lea ecx, [ebp - 0x170]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.00410810
add esp, 0x10
cmp eax, 1
jne 0x410382
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x2d0]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.00410860
add esp, 0xc
cmp eax, 1
jne 0x410382
movsx eax, byte [ebp - 0x2cf]
test eax, eax
je 0x4103af
push str.TCP_IPv6
movsx ecx, byte [ebp - 0x2cf]
push ecx
push str.SOCKS.__Err_d____s_
call fcn.00456c30
add esp, 0xc
mov edx, dword [ebp - 0x10]
push edx
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x2cc]
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x2bc]
mov dword [ebp - 4], ecx
jmp 0x410596
push str.Use_normal_BIND
call fcn.00456e80
add esp, 4
push 0
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1c2], ax
mov edx, 0x17
mov word [ebp - 0x1c4], dx
push 0x10
push 0
lea eax, [ebp - 0x1bc]
push eax
call fcn.0045b070
add esp, 0xc
push 0x1c
lea ecx, [ebp - 0x1c4]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x410557
mov dword [ebp - 0x64], 0x1c
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x1c4]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x41052e
push 1
mov eax, dword [ebp - 0x10]
push eax
call fcn.00453620
add esp, 8
test eax, eax
jne 0x410505
mov dword [ebp - 0x64], 0x1c
lea ecx, [ebp - 0x64]
push ecx
lea edx, [ebp - 0x1a8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x41048d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.getsockname
call fcn.0044e210
add esp, 8
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 8], ecx
lea edx, [ebp - 0x1c2]
mov dword [ebp - 4], edx
call fcn.00453b50
cmp eax, 1
jne 0x410503
cmp dword [0x481538], 1
jne 0x410503
movzx eax, word [ebp - 0x1c2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
push ecx
lea edx, [ebp - 0x1a0]
push edx
lea eax, [ebp - 0x3c]
push eax
call fcn.00456150
add esp, 8
push eax
call fcn.00453b80
add esp, 8
cmp eax, 1
jne 0x410503
movzx ecx, word [ebp - 0x1c2]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, ax
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00452b40
add esp, 8
jmp 0x41052c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.listen
call fcn.0044e210
add esp, 8
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00453270
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
jmp 0x410555
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.getsockname
call fcn.0044e210
add esp, 8
mov edx, dword [ebp - 0x10]
push edx
call fcn.00453270
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
jmp 0x41057e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.bind
call fcn.0044e210
add esp, 8
mov eax, dword [ebp - 0x10]
push eax
call fcn.00453270
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
cmp dword [ebp - 0x10], 0xffffffff
jne 0x410596
push str.TCP_IPv6
push str.Listen.___s_
call fcn.00456c30
add esp, 8
jmp 0x4105ac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_create
call fcn.0044e210
add esp, 8
cmp dword [ebp - 0x10], 0xffffffff
je 0x41065a
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
and edx, 0xff
shl edx, 8
mov eax, dword [ebp - 4]
movsx ecx, byte [eax + 1]
and ecx, 0xff
or edx, ecx
push edx
mov edx, dword [ebp - 8]
push edx
lea eax, [ebp - 0x3c]
push eax
call fcn.00456150
add esp, 8
push eax
push str.EPRT_2_s_d
mov ecx, dword [ebp + 0xc]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0044d800
add esp, 0x18
cdq
mov ecx, 0x64
idiv ecx
cmp eax, 2
je 0x41065a
push str.TCP_IPv6
push str.PORT.___s_
call fcn.00456c30
add esp, 8
call fcn.00453b50
cmp eax, 1
jne 0x410647
lea edx, [ebp - 0x5c]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00452d20
add esp, 8
cmp eax, 1
jne 0x410647
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.00453c60
add esp, 4
mov edx, dword [ebp - 0x10]
push edx
call fcn.00453270
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0045a968
mov esp, ebp
pop ebp
ret