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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f0
mov eax, dword [0x481a58]
xor eax, ebp
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c8]
push eax
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00452bc0
add esp, 0xc
mov dword [ebp - 0xa8], 0
call fcn.0040d640
cmp eax, 1
jne 0x40fd09
mov eax, dword [0x481354]
mov dword [ebp - 0xa8], eax
push 6
push 1
push 2
call fcn.00453050
add esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x41013d
cmp dword [ebp - 0xa8], 5
jne 0x40fe39
push str.Use_SOCKS4_BIND
call fcn.00456e80
add esp, 4
mov ecx, dword [ebp + 0xc]
push ecx
push 0x10
lea edx, [ebp - 0x1c8]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00453540
add esp, 0x10
cmp eax, 0xffffffff
je 0x40fe34
mov byte [ebp - 0xa0], 4
mov byte [ebp - 0x9f], 2
mov cx, word [ebp - 0x3a]
mov word [ebp - 0x9e], cx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x9c], edx
push 0x48d4d0
lea eax, [ebp - 0x98]
push eax
call fcn.0045ad80
add esp, 8
push 0x48d4d0
call fcn.0045acf0
add esp, 4
add eax, 9
mov dword [ebp - 0xc], eax
mov byte [ebp - 0x2b], 0xff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0xc]
push edx
lea eax, [ebp - 0xa0]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00410810
add esp, 0x10
cmp eax, 1
jne 0x40fdef
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00410930
add esp, 0xc
cmp eax, 1
jne 0x40fdef
movsx edx, byte [ebp - 0x2b]
cmp edx, 0x5a
je 0x40fe19
push str.TCP_IPv4
movsx eax, byte [ebp - 0x2b]
push eax
push str.SOCKS.__Err_d____s_
call fcn.00456c30
add esp, 0xc
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
cmp dword [ebp - 0x28], 0
jne 0x40fe28
mov edx, dword [ebp - 0x1c4]
mov dword [ebp - 0x28], edx
lea eax, [ebp - 0x28]
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x2a]
mov dword [ebp - 4], ecx
jmp 0x41013b
cmp dword [ebp - 0xa8], 6
je 0x40fe4f
cmp dword [ebp - 0xa8], 7
jne 0x40ff68
push str.Use_SOCKS5_BIND
call fcn.00456e80
add esp, 4
mov edx, dword [ebp + 0xc]
push edx
push 0x10
lea eax, [ebp - 0x1c8]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00453540
add esp, 0x10
cmp eax, 0xffffffff
je 0x40ff63
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00410970
add esp, 8
test eax, eax
jne 0x40fead
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x10]
jmp 0x410228
movzx edx, word [ebp - 0x3a]
push edx
push 0x4854d0
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [0x485524]
push ecx
push 2
lea edx, [ebp - 0x1b8]
push edx
call fcn.00410680
add esp, 0x18
mov dword [ebp - 0xc], eax
mov byte [ebp - 0x2ef], 0xff
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
lea edx, [ebp - 0x1b8]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00410810
add esp, 0x10
cmp eax, 1
jne 0x40ff24
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x2f0]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00410860
add esp, 0xc
cmp eax, 1
jne 0x40ff24
movsx ecx, byte [ebp - 0x2ef]
test ecx, ecx
je 0x40ff51
push str.TCP_IPv4
movsx edx, byte [ebp - 0x2ef]
push edx
push str.SOCKS.__Err_d____s_
call fcn.00456c30
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp - 0x2ec]
mov dword [ebp - 8], ecx
lea edx, [ebp - 0x2e8]
mov dword [ebp - 4], edx
jmp 0x41013b
push str.Use_normal_BIND
call fcn.00456e80
add esp, 4
push 0
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e6], ax
mov eax, 2
mov word [ebp - 0x1e8], ax
mov dword [ebp - 0x1e4], 0
push 0x10
lea ecx, [ebp - 0x1e8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x4100fc
mov dword [ebp - 0xac], 0x10
lea eax, [ebp - 0xac]
push eax
lea ecx, [ebp - 0x1e8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x4100d3
push 1
mov eax, dword [ebp - 0x10]
push eax
call fcn.00453620
add esp, 8
test eax, eax
jne 0x4100aa
mov dword [ebp - 0xac], 0x10
lea ecx, [ebp - 0xac]
push ecx
lea edx, [ebp - 0x1d8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x410032
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.getsockname
call fcn.0044e210
add esp, 8
lea ecx, [ebp - 0x1d4]
mov dword [ebp - 8], ecx
lea edx, [ebp - 0x1e6]
mov dword [ebp - 4], edx
call fcn.00453b50
cmp eax, 1
jne 0x4100a8
cmp dword [0x481538], 1
jne 0x4100a8
movzx eax, word [ebp - 0x1e6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
push ecx
lea edx, [ebp - 0x1d4]
push edx
lea eax, [ebp - 0x24]
push eax
call fcn.00456100
add esp, 8
push eax
call fcn.00453b80
add esp, 8
cmp eax, 1
jne 0x4100a8
movzx ecx, word [ebp - 0x1e6]
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 0x4100d1
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 0x4100fa
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 0x410123
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 0x41013b
push str.TCP_IPv4
push str.Listen.___s_
call fcn.00456c30
add esp, 8
jmp 0x410151
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 0x410225
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx + 1]
and edx, 0xff
push edx
mov eax, dword [ebp - 4]
movsx ecx, byte [eax]
and ecx, 0xff
push ecx
mov edx, dword [ebp - 8]
movsx eax, byte [edx + 3]
and eax, 0xff
push eax
mov ecx, dword [ebp - 8]
movsx edx, byte [ecx + 2]
and edx, 0xff
push edx
mov eax, dword [ebp - 8]
movsx ecx, byte [eax + 1]
and ecx, 0xff
push ecx
mov edx, dword [ebp - 8]
movsx eax, byte [edx]
and eax, 0xff
push eax
push str.PORT__d__d__d__d__d__d
mov ecx, dword [ebp + 0xc]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0044d800
add esp, 0x28
cdq
mov ecx, 0x64
idiv ecx
cmp eax, 2
je 0x410225
push str.TCP_IPv4
push str.PORT.___s_
call fcn.00456c30
add esp, 8
call fcn.00453b50
cmp eax, 1
jne 0x410212
lea edx, [ebp - 0xa4]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.00452d20
add esp, 8
cmp eax, 1
jne 0x410212
mov ecx, dword [ebp - 0xa4]
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