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

Disassembly:
sub esp, 0x9a4
mov eax, dword [0x594aa4]
xor eax, esp
mov dword [esp + 0x9a0], eax
push ebp
push esi
push edi
mov edi, dword [ebx]
xor ebp, ebp
push 0xff
lea eax, [esp + 0xad]
push ebp
push eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x24], edi
mov byte [esp + 0xb4], 0
call fcn.004804c0
mov esi, dword [edi + 0x354]
mov dword [esp + 0x2c], ebp
mov eax, dword [edi + 0x354]
add esp, 0xc
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], ebp
test eax, eax
je 0x4b69c5
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4b6864
sub eax, edx
cmp eax, 1
jbe 0x4b69c5
mov eax, esi
lea edx, [eax + 1]
jmp 0x4b6880
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4b6880
sub eax, edx
cmp eax, 0x16
jae 0x4b6895
mov eax, 0x16
jmp 0x4b68a9
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4b68a0
sub eax, edx
inc eax
push 1
push eax
call dword [0x595e24]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x4b68d7
pop edi
pop esi
lea eax, [ebp + 0x1b]
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
cmp byte [esi], 0x3a
jne 0x4b697f
mov edi, esi
test edi, edi
je 0x4b694d
push 0x3a
push edi
call fcn.0049dd40
mov esi, eax
add esp, 8
test esi, esi
je 0x4b694d
push 0xa
lea edx, [esi + 1]
push 0
push edx
call fcn.0049c9f5
push eax
call fcn.004c0530
movzx edi, ax
push 0x2d
push esi
mov dword [esp + 0x34], edi
call fcn.0049dd40
xor esi, esi
add esp, 0x18
cmp eax, esi
je 0x4b69bc
push 0xa
inc eax
push esi
push eax
call fcn.0049c9f5
push eax
call fcn.004c0530
movzx eax, ax
add esp, 0x10
mov dword [esp + 0x14], eax
cmp di, ax
jbe 0x4b694d
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], esi
cmp byte [ebp], 0
je 0x4b69c5
mov edx, dword [ebx + 0x38]
mov eax, dword [edx + 4]
push 0x401
lea ecx, [esp + 0x1ac]
push ecx
push ebp
push eax
call fcn.004a9430
add esp, 0x10
test eax, eax
jne 0x4b6a53
mov eax, ebp
jmp 0x4b6a5a
push 0x3a
push esi
call fcn.0049dd40
mov edi, eax
add esp, 8
test edi, edi
je 0x4b69a4
mov ecx, edi
sub ecx, esi
push ecx
push esi
push ebp
call fcn.00485ba0
add esp, 0xc
jmp 0x4b68e2
mov edx, ebp
mov eax, esi
sub edx, esi
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4b69b0
jmp 0x4b694d
movzx eax, di
mov dword [esp + 0x14], eax
jmp 0x4b694d
mov eax, dword [ebx + 0xc8]
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
mov dword [esp + 0x18], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b6a33
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.004c2d00
mov ecx, dword [esp + 0x20]
push eax
push str.getsockname___failed:__s
push ecx
call fcn.004a7c70
add esp, 0x14
test ebp, ebp
je 0x4b6a16
push ebp
call dword [0x595e18]
add esp, 4
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
movzx ecx, word [esp + 0x28]
push 0x401
lea edx, [esp + 0x1ac]
push edx
lea eax, [esp + 0x34]
push eax
push ecx
call fcn.004aca60
add esp, 0x10
lea eax, [esp + 0x1a8]
lea edx, [esp + 0x20]
push edx
push 0
push eax
push ebx
call fcn.0049ecd0
add esp, 0x10
cmp eax, 1
jne 0x4b6a7e
lea eax, [esp + 0x20]
push eax
push ebx
call fcn.004ae260
add esp, 8
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4b6a98
mov ecx, dword [esp + 0x18]
mov esi, dword [eax]
push eax
push ecx
call fcn.0049eec0
add esp, 8
jmp 0x4b6a9a
xor esi, esi
test ebp, ebp
je 0x4b6aa8
push ebp
call dword [0x595e18]
add esp, 4
test esi, esi
jne 0x4b6ad9
mov edx, dword [esp + 0x18]
push str.Curl_resolv_failed__we_can_not_recover_
push edx
call fcn.004a7c70
add esp, 8
pop edi
lea eax, [esi + 0x1e]
pop esi
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
mov edi, dword [sym.imp.WS2_32.dll_socket]
nop
cmp dword [esi + 8], 0
jne 0x4b6aec
mov eax, dword [ebx + 0x70]
mov dword [esi + 8], eax
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push ecx
push edx
push eax
call edi
mov ebp, eax
mov dword [esp + 0x10], ebp
cmp ebp, 0xffffffff
jne 0x4b6b47
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4b6ae0
push eax
push ebx
call fcn.004c2d00
mov ecx, dword [esp + 0x20]
push eax
push str.socket_failure:__s
push ecx
call fcn.004a7c70
add esp, 0x14
pop edi
lea eax, [esi + 0x1e]
pop esi
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x18]
push edx
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.00481e40
mov eax, dword [esp + 0x28]
mov edx, dword [esi + 0x10]
add esp, 0xc
mov dword [esp + 0xc], edx
movzx edi, ax
cmp ax, word [esp + 0x14]
ja 0x4b6cb0
mov ebp, dword [esp + 0x18]
lea esp, [esp]
cmp word [esp + 0x28], 2
jne 0x4b6b94
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4b6ca5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2741
jne 0x4b6c02
push eax
push ebx
call fcn.004c2d00
push eax
movzx eax, di
push eax
push str.bind_port_hu__failed:__s
push ebp
call fcn.004a7c70
mov eax, dword [ebx + 0xc8]
add esp, 0x18
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
mov dword [esp + 0x18], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b6c1f
movzx edi, word [esp + 0x1c]
jmp 0x4b6c0f
cmp eax, 0x2740
je 0x4b6c0e
cmp eax, 0xd
jne 0x4b6c63
inc edi
cmp di, word [esp + 0x14]
jbe 0x4b6b80
jmp 0x4b6cac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.004c2d00
push eax
push str.getsockname___failed:__s
push ebp
call fcn.004a7c70
mov ecx, dword [esp + 0x24]
add esp, 0x14
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
push eax
push ebx
call fcn.004c2d00
push eax
movzx edx, di
push edx
push str.bind_port_hu__failed:__s
push ebp
call fcn.004a7c70
mov eax, dword [esp + 0x28]
add esp, 0x18
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
cmp di, word [esp + 0x14]
jbe 0x4b6ce6
mov ebp, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push str.bind___failed__we_ran_out_of_ports_
push ecx
call fcn.004a7c70
add esp, 8
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
mov edi, dword [esp + 0x10]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x2c]
push eax
push edi
mov dword [esp + 0x18], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b6d47
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.004c2d00
push eax
push str.getsockname___failed:__s
push ebp
call fcn.004a7c70
add esp, 0x14
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebp
mov ecx, dword [esp + 0x9a0]
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4b6d69
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.004c2d00
push eax
push str.socket_failure:__s
jmp 0x4b6d1a
push 0x100
lea ecx, [esp + 0xac]
push ecx
push esi
call fcn.0049eac0
mov edi, dword [esp + 0x9c0]
add esp, 0xc
cmp edi, 2
je 0x4b6dd8
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x28]
cmp dword [ebx + 0x194], 0
jne 0x4b6da3
test edi, edi
je 0x4b6dd2
cmp edi, 1
jne 0x4b6dae
cmp cx, 2
jne 0x4b6dd2
movzx eax, cx
sub eax, 2
jne 0x4b6dd2
mov edx, dword [esp + 0x2a]
push edx
call ebp
movzx esi, ax
test edi, edi
je 0x4b6e2c
cmp edi, 1
je 0x4b6e6a
mov cx, word [esp + 0x28]
inc edi
cmp edi, 2
jne 0x4b6d96
mov esi, dword [esp + 0x24]
mov dword [ebx + 0x3c4], edi
mov eax, dword [ebx + 0xcc]
cmp eax, 0xffffffff
je 0x4b6df4
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0xcc], ecx
mov dword [ebx + 0x174], 1
mov dword [ebx + 0x3d0], 0x1c
mov ecx, dword [esp + 0x9ac]
pop edi
mov eax, esi
pop esi
pop ebp
xor ecx, esp
call fcn.0047ff9f
add esp, 0x9a4
ret
xor edx, edx
cmp word [esp + 0x28], 2
movzx eax, si
setne dl
push eax
lea ecx, [esp + 0xac]
push ecx
lea eax, [ebx + 0x360]
inc edx
push edx
push str.EPRT
push str._s__d_s_hu
push eax
call fcn.004d71c0
mov esi, eax
add esp, 0x18
test esi, esi
je 0x4b6ddc
jmp 0x4b6e12
lea ecx, [esp + 0x5ac]
lea edx, [esp + 0xa8]
mov al, byte [edx]
test al, al
je 0x4b6e8f
cmp al, 0x2e
jne 0x4b6e87
mov byte [ecx], 0x2c
jmp 0x4b6e89
mov byte [ecx], al
inc ecx
add edx, 1
jne 0x4b6e78
movzx eax, si
mov edx, eax
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call fcn.004ad1d0
lea eax, [esp + 0x5c0]
push eax
push str.PORT
lea eax, [ebx + 0x360]
push str._s__s
push eax
call fcn.004d71c0
mov esi, eax
add esp, 0x24
test esi, esi
je 0x4b6ddc
jmp 0x4b6e12